Gets or sets a picture to display on the field.

Namespace:  C1.C1Report
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

C#
[DefaultValueAttribute(null)]
public Object Picture { get; set; }
Visual Basic
<DefaultValueAttribute(Nothing)> _
Public Property Picture As Object
	Get
	Set

Remarks

You may set this property to three types of object:

1) Regular .NET Image objects.

2) Strings containing image file names or Urls.

3) Strings containing names of image fields in the report data source.

Options 1 and 2 are used to create unbound images, such as logos. These images do not depend on the report data.

Option 3 is used to create bound images, such as product or employee pictures. These are images stored with the report data.

Examples

The following code creates an unbound image:

Copy CodeVisual Basic
theField.Picture = PictureBoxLogo.Image
theField.Picture = "c:\mycorp\pictures\logo.gif"
Copy CodeC#
theField.Picture = PictureBoxLogo.Image;
theField.Picture = "c:\mycorp\pictures\logo.gif";

The following code creates a bound image:

Copy CodeVisual Basic
c1r.DataSource.ConnectionString = "dsn=NorthWind"
c1r.DataSource.RecordSource = "Employees"
theField.Picture = "Photo"
Copy CodeC#
c1r.DataSource.ConnectionString = "dsn=NorthWind";
c1r.DataSource.RecordSource = "Employees";
theField.Picture = "Photo";

See Also