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

Creating Gaps between details 1

Status
Not open for further replies.

isjorg

IS-IT--Management
Mar 20, 2007
15
BE
Hi,

2 questions :

1) How do you set in Crystal that he has to make a second page after eg. 10 detail records?

2) On the second page Crystal must make after 9 detail records a gap (1 or 2 empty records) and than start with nr. 10 until max. 22 records

thanks for helping me

jm
 
Crystal likes to handle pages itself, but there are ways round. You could do it by a 'new page after' for every 10th record. Right click > Section Expert > New Page After x+2 and enter:
Code:
 remainder(recordnumber, 10) <> 0
I suggest you get that working first. Then adjust to make a gap after the first page. Similar method, some test like Pagenumber=1

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hi,

I did what you gave me and it works, but the main thing is the "Gap".

My form has allways 2 pages and the Gap is allways on the second page and never (!) on the first.
+
on the second page I allways (again) have 22 records and between record 09 and 10 I have that :mad: GAP.

thank for helping me

jm
 
I should have put = rather than <>, assume you corrected that. For the later pages:
Code:
if pagenumber = 1 
then remainder(recordnumber, 10) = 0 
else remainder((recordnumber-1), 9) = 0

For the 'gap', have an extra detail section that is supressed using the formula remainder((recordnumber-1), 9) = 0

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
somebody gave me more info and the form has more than 2 pages.

so I did what you gave me and everything is OK, but only the second page is wrong ?? Page 1 = OK and from page 3 till.... is everything OK.

The thing is that on the first page I need 10 records and from page 2 I allways need 22 records.

page 1 = 10 records = OK
page 2 = 12 records (??) = NOT OK
page 3 = 22 records = OK
page 4 = OK
...... = OK

jm
 
Adjust the formula till it does what you want, special test for page 2. Trial-and-error is the best method for Crystal.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
All the tips you gave me works fine (incl. the remainder((recordnumber-1), 9) = 0 for the 'Gap').

just 1 extra about the 'Gap' : every page has 22 records (from page 2 till...) standard, but I only need 1 'Gap'/page to make a 'gap'.

eg:
record 1
record 2
record 3
record 4
record 5
record 6
record 7
record 8
record 9
GAP
record 10 untill record 22 without a 'Gap'
Next page : the same 'Gap' after the 9th record and than no 'Gap' untill the next page on record 9 .....

jm
 
If you use my suggestion in your other post, where you reset the count on each page, you could insert an extra detail section and then use section suppression with a formula like:

pagenumber = 1 or
{@cnt} <> 9

Expand the detail_b section to the desired size of the gap.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top