This is a migrated thread and some comments may be shown as answers.

Dynamic Images (PictureBox) for each Report Page Header

6 Answers 539 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan Free
Top achievements
Rank 1
Jonathan Free asked on 25 Jan 2011, 08:55 PM
I need a way to display a different image on each report page in the report header.

I am generating a 2D barcode with a different 3rd party control and storing as a PNG in path on user workstation. I need to display each unique image for a given page in the header to facilitate forms processing. I need to set a PiciureBox on each report page to the unique barcode image associated with that specific page.

I am using VB.Net 2008 with Telerik Reporting Q3 2010. Telerik Reporting supports 1D barcodes, but my requirements call for using a 2D Datamatrix barcode image.

6 Answers, 1 is accepted

Sort by
0
Jonathan Free
Top achievements
Rank 1
answered on 28 Jan 2011, 02:02 AM
Surely with all the brilliant minds at Telerik, someone has an answer for me.
0
Peter
Telerik team
answered on 28 Jan 2011, 11:26 AM
Hello Jonathan Free,

Thank you for the appraisal :)

About your inquiry you can set the PictureBox.Value dynamically with a Binding to an User Function as the following one:

public static Image GetBarcode(int pageNumber)
{
    Image image = new Bitmap("barcode" + pageNumber + ".jpg");
     
    return image;
}

In a such User Function you can find the concrete barcode for a given page and return it as an Image to the PictureBox item.

Kind regards,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
sunil
Top achievements
Rank 1
answered on 13 Apr 2011, 02:45 AM

 

Hello,
I have similar question for report header picture display, the difference is I have main report and multiple sub report on that report. Currently I have picture on the main report header and it display perfectly on all sub reports.

We have new requirements to display different image on the first page (main report page) and rest of the report will get the same image. I am loading image from the database.

Please provide example.

Thanks in advance.

0
sunil
Top achievements
Rank 1
answered on 14 Apr 2011, 07:33 PM
I did not receive any response from my previous post. It is very important for us to finish this task ASAP.

Thanks for your help in advance.
0
Peter
Telerik team
answered on 15 Apr 2011, 05:19 PM
Hello sunil,

Based on your description our suggestion is to use the main report's page header and set the PictureBox.Value with Bindings and the following User Function:

public static Image GetPageImage(int pageNumber)
{
        if(pageNumber==1)
                return ImageForPage1
        else
                return ImageForPage2
}

Your PictureBox Binding should look like:

Property Path 

Value 

 Value

 = GetPageImage(Parameters.OrgLogo.Value, PageNumber)


Give it a try and if you need additional assistance we will appreciate if you elaborate further and send us some screenshots that illustrate your goal.

Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sunil
Top achievements
Rank 1
answered on 15 Apr 2011, 05:24 PM
Thanks fory your reply, But I find out the way to use report header and page header, and make report header property
Visible on the first page as false.

It work perfact as I want.

Thanks,
Sunil.


Tags
General Discussions
Asked by
Jonathan Free
Top achievements
Rank 1
Answers by
Jonathan Free
Top achievements
Rank 1
Peter
Telerik team
sunil
Top achievements
Rank 1
Share this question
or