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

Extra pages

Status
Not open for further replies.

RealityCheque

Technical User
Apr 1, 2004
41
GB
SUMMARY:

I'm using Crystal 9 to report on 2 tables, one of which has a many->one relationship with the other (I have also tried this with one table, producing the same results). I have no idea what is causing this problem so I'm going to go into as much detail as possible below.

The long and the short of it is that when the report is run it adds additional pages onto the end. While in crystal or a 3rd party viewer the extra pages are not viewable - for example you cannot view past page 5 of 8 - but they are there when the report is printed, complete with duplicate data to the previous pages.

Needless to say, I need to get rid of these additional pages, aside from anything else they're messing up my manual running totals!

DETAILS:

The records are selected using 2 parameters {?StartDate} and {?Future}, and 2 formulas {@DateDiff1) and {@CTargetDate}.

{@CTargetDate} just converts a string from the table into a date format, {@DateDiff1} calculates the difference between said converted string and the date parameter selected. The select expert itself selects any record where the difference is between '1' and the {?Future} parameter. The records are sorted by groups of {@DateDiff1}, giving the result of each days records together.

FORMULAS:

{@DateDiff1}:
Local DateTimeVar d2 := {@CTargetDate};
Local DateTimeVar d1 := {?StartDate};
DateDiff ("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday)

Select Expert:
{@DateDiff1} in 1.00 to {?Future}

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
Silly question but have you checked the section expert for the following:

1. Keep together options
2. New page after options
3. New page before options

-- Jason
"It's Just Ones and Zeros
 
They are not blank sections, but repeated groups.

None of the 'new page' or 'keep together' options are selected.

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
Do you mean you have group headers with no details? This is a common problem, and is solved by suppressing the header if none of the details would qualify

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
When the report is viewed there are unaccessable pages despite the report being complete, but when the report is printed the pages are visible and contain already displayed data.

For example it displays:

05/10/04
<sample data>

06/10/04
<sample data>

07/10/04
<sample data>

08/10/04
<sample data>

09/10/04
<sample data>

10/10/04
<sample data>

05/10/04
<identical data>

06/10/04
<identical data>

07/10/04
<identical data>

08/10/04
<identical data>

09/10/04
<identical data>

10/10/04
<identical data>

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
BTW in the above example only the days 05/10/04 - 10/10/04 are expected on the report, there is no missing data merely duplicated.

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
Do you have an outer group that you are suppressing? This would cause a repeat of the inner date groups.

-LB
 
I should have said "could cause"--if there were two instances of the outer group, e.g., a null and some value, or two values, you would get the inner date groups repeated.

-LB
 
Nope, there is only the date group :(

I've now tried both conditionally supressing the records with an unwanted {@DateDiff1} value and using the select expert to filter them out, and both give the same results.

I'm pretty sure there's nothing wrong with the data itself as if the report was working correctly there would just be duplicate data under each group rather than multiple groups.

Supressing duplicates also has no effect.

Today's printout is even more interesting, the dates go:

06/10
07/10
2nd half of 06/10
07/10
08/10
07/10
08/10
11/10
12/10
08/10
11/10
12/10

This report is driving me crazy...

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
Is the date group actually a date-time group? Make sure the group is set to only print once per DAY.

Also, is the date group set to order ascending or descending? It appears that it is set to original or specified order.
 
It's set to ascending order, while the group is by difference between {?StartDate} and the date in the table.

Although I have now just tried grouping by the date in the table and supressing any groups with a {@DateDiff1} of less than 1 or more than {?Future} and the results are still the same.

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
I have now tried hardcoding a variable for {?Future} and as expected the results are the same.

Simon

"I do not have to forgive my enemies. I have had them all shot."
- Ramon Maria Narvaez
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top