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

Dynamic content in header

1 Answer 409 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hin
Top achievements
Rank 1
Hin asked on 23 May 2008, 09:29 PM
I'm using Telerik reporting, and I have to create a report with many sections that are configurable. So I've made a main report with subreports for each section. In my main report, I'd like to use the header, to set the title of each section. How do I set a textbox's value dynamically in the header of the main report, based on the subreport displayed on the current page?

I've seen in the expression editor that there's a Global Object ReportItem, is there example on how to use that ? Could that be used to get what I want ?

Thanks a lot.

1 Answer, 1 is accepted

Sort by
0
Milen | Product Manager @DX
Telerik team
answered on 26 May 2008, 03:36 PM
Hi Hin,

In the context of the page sections you do not have access to the items in the current page or any fields. What you have, are the global objects PageNumber and  PageCount and you can use only them to determine what text to show in the page header.

For example you can use the expression:

=Iif(PageNumber < 3, "Subreport 1", "Subreport 2")

This approach is applicable only if you know in front what content will be displayed on what page.

Other approach is to put the title of the subreport in the report header of the definition of the subreport, as advised in this forum thread.

Similar scenario with proposed solutions you can find in the forum thread Page Footer Expression Problem.
Also, please follow the links from the thread above for additional information about purpose and usage of all sections in a Telerik Report.

Let us know if you need any further help.

Regards,
Milen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Hin
Top achievements
Rank 1
Answers by
Milen | Product Manager @DX
Telerik team
Share this question
or