Navigation:  Contents > Graphic information output >

StimulReport.Net User Manual

Print this Topic Previous pageReturn to chapter overviewNext page

How to transfer an image to the StiImage component

The StiImage component is used to output images in the report. The way of loading of the image can be chosen using the editor of component properties. This editor can be called with double click on the StiText component or using the button of the designer calling of the Image property in the Property Editor.

The following ways on how to load images to the StiImage component:

1. Load an image when creating this component in the designer. The Open button allows loading an image to the StiText component in the designer. When saving the file of a report the image will be saved with the report code. The Remove button allows deleting selected images from the designer.

 

 

2. From the data base field. Select the field of the data source and in run time an image will loaded to the StiImage object of a report.

 

 

3. From variable. Create variable in the Data Dictionary with the Image type. This variable can be used in run time for working with images.

 

 

Notice. Instead of a variable, the expression which returns an image as a result, can be used.

 

4.4. By the internet link. Also this way work in runtime.

 

 

5. From the file. File selection allows loading images from files of images. Images of standard Bitmap types and *.emf and *.wmf metafiles are supported. The image is not serialized in code.

 

 

Also it is possible to load images from the code of application before report rendering:

 

C#

 

StiReport report = new StiReport();

report.Load("D:\\myimage.mrt");

StiImage image = new StiImage();

image.Image = Image.FromFile("d:\\SomeImage.jpg");

report.Compile();

report["MyImage"] = image;

report.Show();