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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Separate data onto different pages by a change in the date field

Status
Not open for further replies.

jcfowl

Programmer
Feb 15, 2002
29
US
I need to Write The Crystal Reports so that the information is separated on different pages by a change in the {Date} field. Is there a formula to insert a page break when the {Date} read from the database is different from the previous. Keep in mind I've been using CR for 2 days.

This is what I want it to look like
ex:
page1:
Date: Phone# : Name: Bill cost:
4-19-01 555-1212 bill $20
4-19-01 555-1313 jeff $40
4-19-01 555-1414 bob $30
- page break -
page2:
Date: Phone# : Name: Bill cost:
5-20-01 555-1212 bill $20
5-20-01 555 1313 jeff $30
and so on........
any help is much appreciated,
 
Hi,

There is actually a really easy way to do this. all you need to do is insert a group into your report based upon the date field. To do this select Group from the Insert menu. You then select the database field and now you have a group on the date field, you will see new sections inseted around the details section. The one above is the group header and the one below is the group footer.

Now select group from the format menu and select the group footer section, on the right hand side you will see a series of options, one of which is "new page after." Check that and preview your report and you should see that the records are grouped by the time field and that a new page is occurring on each change of group.

The 'new page after' function has one draw back in that it will create a blank page at the end of your report. If you don't want this then format the section and next to the 'new page after' checkbox there is a formula icon. Click the icon and enter 'not onlastrecord' This will suppress the extra page.

If you run into any troubles or want to know a lot more on groups there are some tutorials available within the FAQ section of this formum

Hope this helps

Paulos
 
Thanks for the help, i really appreciate it.

jcfowl
 
The method I prefer for a page break is to supress the report header and use "New Page Before" on the group header.

If you want to use New Page after in the Group footer, suppress the report footer section, and the blank alst page won't appear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top