| Author |
Message |
xavendano
Newbie
Joined: 22 Apr 2009
Online Status: Offline
Posts: 9
|

Topic: Reprint (Report Header) after n records. Posted: 22 Apr 2009 at 9:17am |
Greetings,
I have a report with the typical sections of Crystal Report for VS2008.NET In the details section I have a break "New page after" subject to 100 records. Ie, after 100 records printed in the detail begins a new page. The problem is as follows: section 1 (Report Header) there are certain fields that must be filled out by hand when handling the printed sheet.
The Report Header to be printed each time that happens the condition of 100 records. This does not.
What should I do with the shape or section, so that after every 100 records begin on a new page and print again on Report Header records with the next 100?
Thanks for your help
|
IP Logged |
|
|
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 22 Apr 2009 at 9:54am |
I would try putting it in a page header and use something like the following in the Suppress formula for the section:
not OnFirstRecord and RecordNumber\100 > 0
Note that I used a '\' and not a '/'. Where '/' is regular division, '\' is the modulus operator that gives you the remainder value from integer division. So, if the record number is not a multiple of 100, the remainder is greater than 0.
When going to a new page, I don't know whether Crystal stays on the last record of the previous page while its working on the page header or if it moves to the next record to be processed. So, if RecordNumber\0 doesn't work try RecordNumber <> 1.
-Dell
|
|
|
IP Logged |
|
xavendano
Newbie
Joined: 22 Apr 2009
Online Status: Offline
Posts: 9
|

Posted: 22 Apr 2009 at 12:19pm |
Hilfy
First, thank you very much for your prompt response.
Make the changes you suggested about the change of section and the condition to show or hide the section.
It works well but only partially, ie the first 100 records show only the Page Header on the first page. Once you complete the 100 records began on a new page with the Page Header (correct) but the page immediately to the (records of approximately 130 to 156) are again on Page Header (Wrong) and from there the behavior is a little unstable.
The condition is Supress: not onfirstrecord and recordnumber \ 100 <> 1
I applied similar conditions but with the same result.
What could be doing wrong that this behavior creates the report?
Thank you
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 22 Apr 2009 at 12:42pm |
It may have to do with the data and the way your tables are linked. Are you showing your data in a details section or a group section?
Try this:
Create a running total that is a distinct count of some field in your data. This field should be unique for each record that appears on your report. Use that running total field instead of RecordNumber in the suppress formula.
-Dell
|
|
|
IP Logged |
|
xavendano
Newbie
Joined: 22 Apr 2009
Online Status: Offline
Posts: 9
|

Posted: 22 Apr 2009 at 2:01pm |
Yes, I have such a field (Running total) and shows the correct numbers in the detail of 1 to 1.
I also have two sections or groups to stop ordering and grouping of these data, it will have something to do with the condition of choice?
I have revised and developed multiple times by multiple ways and always presents a behavior not expected.
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 23 Apr 2009 at 6:37am |
This is the only way I can think of that might work. I haven't ever had to do this sort of thing, so I wasn't absolutely certain that it would. It may not be possible.
Brian,
Can you think of a way to make this work?
-Dell Edited by hilfy - 23 Apr 2009 at 6:38am
|
|
|
IP Logged |
|
xavendano
Newbie
Joined: 22 Apr 2009
Online Status: Offline
Posts: 9
|

Posted: 23 Apr 2009 at 6:51am |
Good day hilfy,
The record breaking 100 runs perfectly. What is not working well or not is the appearance of the header and Page Header.
Is it possible to apply a kind of trigger to be met at the 100 records and the header (Page Header) is displayed as indicated by the trigger rather than a formula?
Thanks...
|
IP Logged |
|
xavendano
Newbie
Joined: 22 Apr 2009
Online Status: Offline
Posts: 9
|

Posted: 23 Apr 2009 at 8:32am |
hilfy
The condition must be: not onfirstrecord and ({#RecTotal}/100 <> int({#RecTotal}/100)
Something extrange but works for me!!! (y)
Thanks.....
|
IP Logged |
|
|
|