Loop by TextBox in RDLC report header

LyuchinLyuchin Member Posts: 23
edited 2011-11-10 in NAV Three Tier
Hi all,

I need to make a loop by header of the RDLC report. The header contains static data (e.g. company information), which will be repeated on every report sequence page and changeable data from the report's dataitem, which should be iterated in the header throughout the report (actualy the data, which would have to be in a body, but in the design it should be in the header area). One option is to put a rectangle into table's header (and set RepeatOnNewPage property in true) and place inside of this rectangle the fields which should be included into loop. Is there any other option how to implement this? Once more, I mean something like a table or a list, but with header related information (that is the fields which normally would be placed into report's header, but because there are some fields with iterated content, all this set of fields should be somehow refactored in the RDLC design).

Any help appreciated. Thanks.

Comments

  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Lyuchin wrote:
    Hi all,

    I need to make a loop by header of the RDLC report. The header contains static data (e.g. company information), which will be repeated on every report sequence page and changeable data from the report's dataitem, which should be iterated in the header throughout the report (actualy the data, which would have to be in a body, but in the design it should be in the header area). One option is to put a rectangle into table's header (and set RepeatOnNewPage property in true) and place inside of this rectangle the fields which should be included into loop. Is there any other option how to implement this? Once more, I mean something like a table or a list, but with header related information (that is the fields which normally would be placed into report's header, but because there are some fields with iterated content, all this set of fields should be somehow refactored in the RDLC design).

    Any help appreciated. Thanks.
    Have you already tried the following?
    You could write a VB script function that stores passed values (your values that change according to the body) into variables.
    Then in Report Header you could call another VB script function that gives-back variables' values.

    If it's not clear I'll explain better.
    ~Rik~
    It works as expected... More or Less...
  • LyuchinLyuchin Member Posts: 23
    Have you already tried the following?
    You could write a VB script function that stores passed values (your values that change according to the body) into variables.
    Then in Report Header you could call another VB script function that gives-back variables' values.

    If it's not clear I'll explain better.

    Hi, thanks for reply. Do you mean SetData, GetData functions like in standard sales reports? If no, can you please explain in more details.
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Lyuchin wrote:
    Have you already tried the following?
    You could write a VB script function that stores passed values (your values that change according to the body) into variables.
    Then in Report Header you could call another VB script function that gives-back variables' values.

    If it's not clear I'll explain better.

    Hi, thanks for reply. Do you mean SetData, GetData functions like in standard sales reports? If no, can you please explain in more details.

    Yes the idea is the same of SetData and Getdata.
    ~Rik~
    It works as expected... More or Less...
  • LyuchinLyuchin Member Posts: 23
    I'm aware about these functions. It is not a problem to get fields content in report's header. But the question was how to make a loop by report's header...
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Lyuchin wrote:
    I'm aware about these functions. It is not a problem to get fields content in report's header. But the question was how to make a loop by report's header...
    I'm sorry but I don't get what you mean with loop by report's header.
    ~Rik~
    It works as expected... More or Less...
  • LyuchinLyuchin Member Posts: 23
    Lyuchin wrote:
    I'm aware about these functions. It is not a problem to get fields content in report's header. But the question was how to make a loop by report's header...
    I'm sorry but I don't get what you mean with loop by report's header.

    I need something like table or list (that is iterated data) but in !report header!, not body. Like if you run some sales report (for example ID 205) you can see company information in the header. And now imagine that in the left side of this report header I need some data (for example Location name/address) which are not static for each report page, but changing (iterating) according to report dataitem.

    So, something like this.

    Page1 of report.
    Location Blue, Address1 Company Info

    Page2.
    Location Red, Address2 Company Info

    Page3.
    Location Green, Address3 Company Info


    So, I need the same number of pages in the report as a number of locations. And mention please, that all this information placed in header.
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Lyuchin wrote:
    Lyuchin wrote:
    I'm aware about these functions. It is not a problem to get fields content in report's header. But the question was how to make a loop by report's header...
    I'm sorry but I don't get what you mean with loop by report's header.

    I need something like table or list (that is iterated data) but in !report header!, not body. Like if you run some sales report (for example ID 205) you can see company information in the header. And now imagine that in the left side of this report header I need some data (for example Location name/address) which are not static for each report page, but changing (iterating) according to report dataitem.

    So, something like this.

    Page1 of report.
    Location Blue, Address1 Company Info

    Page2.
    Location Red, Address2 Company Info

    Page3.
    Location Green, Address3 Company Info


    So, I need the same number of pages in the report as a number of locations. And mention please, that all this information placed in header.

    Maybe I'm stupid but in my opinion (if I understood well) the following should be the solution to your needs:
    1. create a group based on locations.
    2. Set the flag "Page Break at the End" on this group (in this way there will be a page break at then end of each location)
    3. Pass values with SetData as I suggest you before (I would do the call to the function in the body of your table)
    4. GetData in header and you'll get what SetData wrote

    In my opinion should work.
    ~Rik~
    It works as expected... More or Less...
  • manikandanmanikandan Member Posts: 160
    Hi,
    i Face the Same Problem. I found out the Solution .
    1.In Body Section all Control with in a Single ListBox.
    2.In ListBox you have Create a Grouping (for example "Document No."). :thumbsup:

    Note:
    Kindly Ref to Report 206 (UK Database).
Sign In or Register to comment.