Reports for WPF | ComponentOne
Task Based Help / Add image field / Creating bound image
In This Topic
    Creating bound image
    In This Topic

    Bound images are images stored in database fields. To display these images in your reports, add a field to the report and set its Picture property to a string containing the name of the column where the image is stored.

    Using the C1ReportDesigner

    To add bound image fields to your report using the C1ReportDesigner, complete the following:

    1. In Design mode of the C1ReportDesigner, click the Add Bound Picture button  located in the Fields group of the Design tab.

    This shows a menu with all binary fields in the current data source.

    1. Select the field you want to add to the report.

    In Code

    If the field "Photo" in the database contains embedded OLE objects or raw image streams, and the report contains a field called "fEmployeePhoto", then the following code would display the employee photo in the field:

    Visual Basic
    Copy Code
    fEmployeePhoto.Picture = "Photo"
    
    C#
    Copy Code
    fEmployeePhoto.Picture = "Photo";
    

     

    Sample Report Available

    For the complete report, see report "04: Bound Images" in the CommonTasks.xml report definition file, which is available for download from the CommonTasks sample on the ComponentOne HelpCentral Sample page.