Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Breaks by Button

Status
Not open for further replies.

gazza11

Technical User
Jan 12, 2003
46
0
0
AU
I have created a Crystal report (8.5) and have used group by Name, with details following. I have also checked the box that forces a page break before each group, this allows each persons details to be displayed/printed on a separate page.
I would like to be able to perform the initial report preview to that the records are still grouped by Name but without page breaks until a button on the report forces the page break format.
Can anyone help me with the code to do this.
 
Try grouping on the following formula:

If Minute({datetimefield}) < 30 then
Time(Hour({datetimefield}),00,00)
else
Time(Hour({datetimefield}),30,00)

Or round however you see fit.

-k
 
Sorry - I cannot see how this will help. I suppose I was a bit short with my description of what I am trying to do.
I am using VB6 to present a report (.rpt) and as default I currently have selected 'Format Section' and then selected Group header (that which I am grouping on, and selected 'New Page before'. This ensures that each personnels details are listed on a new page. Good for printing out details for a particular person but an awful waste of paper if we want to print out everyones details.
So what I would like to do is set the default as to remove the 'new page before' BUT have a button on the form somewhere (ie in toolbar) that allows me to insert the new page before IF they want to print an individuals details. I now how to activate the toolbar but I am not sure on the code to allow the insertion of the new page before.

 
you could do this throught he use of a Parameter

{?PageBreak} String values = &quot;Y&quot; or &quot;N&quot;

It would require you running the report twice though

The user selects the option to use or not use page breaks in the report.

This parameter is then used in the Conditional &quot;New Page Before&quot;

hope this helps Jim Broadbent
 
Thanks Jim i will try it and see if I can get it to work. I am still a novice when it comes to parameters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top