mibuso.com

Microsoft Business Solutions online community
It is currently Wed Jun 19, 2013 4:59 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Runtime Page Break In RDLC
PostPosted: Sat Mar 03, 2012 7:26 pm 
Offline

Joined: Sun Feb 13, 2011 7:58 am
Posts: 53
Country: Nepal (np)
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


Top
 Profile E-mail  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Sun Mar 04, 2012 5:07 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4252
Location: New Delhi
Country: India (in)
You have to take 2 tables one behind the other and develop the report..
Check existing reports 120 or 121

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Sun Mar 04, 2012 7:06 am 
Offline

Joined: Sun Feb 13, 2011 7:58 am
Posts: 53
Country: Nepal (np)
mohana_cse06 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.


Top
 Profile E-mail  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Sun Mar 04, 2012 8:46 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4252
Location: New Delhi
Country: India (in)
tularam wrote:
mohana_cse06 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 :)

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Mon Mar 05, 2012 10:04 am 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 498
Location: Switzerland
Country: Switzerland (ch)
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:
Code: Select all
=Iif(Fields!PrintOnePagePerResource.Value = "True", Fields!Resource__No__.Value, "")


This way your group is conditional

_________________
My Blog


Top
 Profile  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Mon Mar 05, 2012 8:35 pm 
Offline

Joined: Mon Dec 20, 2010 10:25 am
Posts: 531
Location: Bergamo
Country: Italy (it)
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:
Code: Select all
=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:
Code: Select all
=""

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...


Top
 Profile E-mail  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 9:10 am 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 498
Location: Switzerland
Country: Switzerland (ch)
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

_________________
My Blog


Top
 Profile  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 9:57 am 
Offline

Joined: Mon Dec 20, 2010 10:25 am
Posts: 531
Location: Bergamo
Country: Italy (it)
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...


Top
 Profile E-mail  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 10:02 am 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 498
Location: Switzerland
Country: Switzerland (ch)
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 :)

_________________
My Blog


Top
 Profile  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 10:14 am 
Offline

Joined: Mon Dec 20, 2010 10:25 am
Posts: 531
Location: Bergamo
Country: Italy (it)
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:
Attachment:
Capture1.PNG
Capture1.PNG [ 28.61 KiB | Viewed 1202 times ]

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.
Attachment:
Capture2.PNG
Capture2.PNG [ 19.74 KiB | Viewed 1202 times ]

Attachment:
Capture3.PNG
Capture3.PNG [ 30.25 KiB | Viewed 1202 times ]

_________________
~Rik~
It works as expected... More or Less...


Top
 Profile E-mail  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 10:32 am 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 498
Location: Switzerland
Country: Switzerland (ch)
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 :(

_________________
My Blog


Top
 Profile  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 10:52 am 
Offline

Joined: Mon Dec 20, 2010 10:25 am
Posts: 531
Location: Bergamo
Country: Italy (it)
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...


Top
 Profile E-mail  
 
 Post subject: Re: Runtime Page Break In RDLC
PostPosted: Tue Mar 06, 2012 12:10 pm 
Offline

Joined: Mon Sep 08, 2008 10:25 am
Posts: 498
Location: Switzerland
Country: Switzerland (ch)
uuh that one sounds nice :D thanks for sharing!

_________________
My Blog


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: