Runtime Page Break In RDLC

tularamtularam Member Posts: 97
edited 2012-03-06 in NAV Three Tier
Hi all,
I got a serious problem for a client on RTC Report design. All Groping and filtering is done in the report. Let me clarify the senerio.
A report on based on Item and item ledger entry of the customer. Like in classic if user want to see report customer per page then he turns on the boolean field on the request form and the report is printed for customer per page. On designing the RTC layout where and how to put the check on the report run? Is there any solution for the dynamic control for page break (Like if user wants to see the customer per page report then the report is displayed as so and if not the report is displayed normal).

Regards,
Tularam

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    You have to take 2 tables one behind the other and develop the report..
    Check existing reports 120 or 121
  • tularamtularam Member Posts: 97
    You have to take 2 tables one behind the other and develop the report..
    Check existing reports 120 or 121
    Thanks Mohana!!!!
    Problem Solved.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    tularam wrote:
    You have to take 2 tables one behind the other and develop the report..
    Check existing reports 120 or 121
    Thanks Mohana!!!!
    Problem Solved.
    Welcome :)
  • deV.chdeV.ch Member Posts: 543
    BTW, you can do a conditional page break by using an expression in the "Group on" Field of your group
    Instead of a static "=Fields!YourField.Value" you would do this:
    =Iif(Fields!PrintOnePagePerResource.Value = "True", Fields!Resource__No__.Value, "")
    

    This way your group is conditional
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    deV.ch wrote:
    BTW, you can do a conditional page break by using an expression in the "Group on" Field of your group
    Instead of a static "=Fields!YourField.Value" you would do this:
    =Iif(Fields!PrintOnePagePerResource.Value = "True", Fields!Resource__No__.Value, "")
    

    This way your group is conditional
    really interesting, I need something similar.
    I tested it in this way.
    1. created a group with the following expression:
    =""
    
    2. created few lines
    3. set "Page break at start" on this group
    I expected no page break since I'm grouping on nothing... this is what I understood from your post.
    but unluckily a page break is placed before lines.
    Am I missing something?
    ~Rik~
    It works as expected... More or Less...
  • deV.chdeV.ch Member Posts: 543
    I used that code some time ago but from what i remember you need to set "Fit Table On One Page if Possible". because one page break is always done, because even when you group on "nothing" you have records, so this set of records os kind of a "group". It's like when you want to show sales lines and you group those lines on the sales header document no., you will get kind of no grouping because all sales lines have the same document no. but in fact it is one group (all lines) so you get one page break.

    I hope this was written understandable...

    Let me know if "fit on one page" helped you
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    deV.ch wrote:
    I used that code some time ago but from what i remember you need to set "Fit Table On One Page if Possible". because one page break is always done, because even when you group on "nothing" you have records, so this set of records os kind of a "group". It's like when you want to show sales lines and you group those lines on the sales header document no., you will get kind of no grouping because all sales lines have the same document no. but in fact it is one group (all lines) so you get one page break.

    I hope this was written understandable...

    Let me know if "fit on one page" helped you
    Hi deV.ch it's very clear what you said thanks!
    I added in my test the "fit on one page" property for my table but the page break comes anyway.
    :-k
    ~Rik~
    It works as expected... More or Less...
  • deV.chdeV.ch Member Posts: 543
    Is it possible for you to have page break at end instead of page break at start? If so, is there any element after the table? If no more element comes after the table, the fit to one page trick should work...
    If it does not please attach a screenshot of the layout :)
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    deV.ch wrote:
    Is it possible for you to have page break at end instead of page break at start? If so, is there any element after the table? If no more element comes after the table, the fit to one page trick should work...
    If it does not please attach a screenshot of the layout :)
    This is our custom Sales Invoice:

    What I want to do is to switch on and off a page break before the summary of the lines (the yellow table).
    I can't have a page break at the end because my need is to avoid that the summary is splitted on 2 pages.
    The following are 2 screenshots of the table and property of the group.

    ~Rik~
    It works as expected... More or Less...
  • deV.chdeV.ch Member Posts: 543
    hmm in this scenario i would try a rectangle with "page break after" in the footer section of the lines table and show this footer row only when you need it.

    I think you can't achieve it with my previous solution because there will be always a pagebreak, fit on one page unfortunatly only works when nothing comes before and after the table :(
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    deV.ch wrote:
    hmm in this scenario i would try a rectangle with "page break after" in the footer section of the lines table and show this footer row only when you need it.

    I think you can't achieve it with my previous solution because there will be always a pagebreak, fit on one page unfortunatly only works when nothing comes before and after the table :(

    \:D/ solved in this simple way (suggested by my colleague Belias):
    I placed the yellow table in a rectangle. in this way the system realy automatically if the rectangle fits in one page and if not does a page break.
    No other groups and page break needed.
    It's a cool trick!
    Thanks deV.ch for your time!
    ~Rik~
    It works as expected... More or Less...
  • deV.chdeV.ch Member Posts: 543
    uuh that one sounds nice :D thanks for sharing!
Sign In or Register to comment.