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

How to use value of a textbox in other textbox in other section (value not expression))

5 Answers 181 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rabih
Top achievements
Rank 1
Rabih asked on 07 Feb 2013, 03:08 PM
Hello,
I have a textbox in pageheader that have an expression to fill it's value
and i have another textbox in GroupHeaderSection.
the expression is working fine in header, but in groupheadersection it don't get data correctly.
i am trying to set the value of second textbox to equal first textbox, but i am not able to do so.
it is always getting me the expression of the first textbox.

How can this be done ? and at what stage or time expression is evaluated ?

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 08 Feb 2013, 03:19 PM
Hello Rabih,

As stated in the Report Life Cycle help article:
  • On Processing: Evaluates all Expressions except page header and footer section items.
  • On Rendering: Item expressions are evaluated in the page header and footer sections for every page.
In addition, messing with report textBox items values is not recommended outside the context of expressions, after the data processing begins. Please, try rearranging your data and build the same expression for the second textBox instead of using the value of the first one. If your point is to get the PageNumber object, notice that it is calculated on a later stage of the report life cycle and so cannot be used in expressions outside of the scope of the page header and footer.

Let us know if you have further questions.

Kind regards,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Rabih
Top achievements
Rank 1
answered on 09 Feb 2013, 08:44 AM
Dear Stef,

Yes indeed i am trying to add page numbers for each Group.
Each group will have its own sequence starting from 1.
as far as i understand after your reply and a lot of research achieving such functionality inside groupheader is not possible.
I can achieve needed result only in page header.
Is there any workarounds ?

Thank you.
0
Steve
Telerik team
answered on 11 Feb 2013, 12:05 PM
Hi Rabih,

There is no out of the box way for what you're trying to accomplish, but it can be done with some code as shown in the Reset PageNumber per Report Group blog post.

All the best,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Rabih
Top achievements
Rank 1
answered on 11 Feb 2013, 12:49 PM
Dear Steve,

I am already using the code that is written in the link you provided, but it is only working in page header not group header.

Regards.
0
Steve
Telerik team
answered on 14 Feb 2013, 12:58 PM
Hi Rabih,

As already explained, the pagination in Telerik Reporting is determined long after the report has been processed. That's why there is no way to reference any page information from the report's body. Page sections are the only items that are processed during the paging of the report and where we can perform any page related calculations and access the page information.

The reason for the separation of the processing and the pagination of the reports is that we can apply different page layout strategies on the same report according to the specifics of the output media. For example we use an "interactive" layout for the displaying the reports in the viewers, a page oriented layout for printing and exporting to page oriented document formats (PDF, MS Word, PowerPoint, RTF); for rendering the reports in MS Excel we have a dedicated "grid" layout that arrange the items according to the rows and columns in the worksheet; and at the end for exporting the report to CSV we skip the layout phase as we need just the data.

So to summarize, displaying such information in the page header is the correct and only viable solution you can use.

All the best,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Rabih
Top achievements
Rank 1
Answers by
Stef
Telerik team
Rabih
Top achievements
Rank 1
Steve
Telerik team
Share this question
or