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!

Group duplicating on report 3

Status
Not open for further replies.

ajharn

IS-IT--Management
Jun 8, 2002
71
0
0
US
Hello,

I have a fairly simple report that is behaving oddly in CRXI

It is based on a single table.
Two fields are Grouped
Group 1 = Location (sorted ascending, Keep together)
Group 2 = Job # (sorted ascending, keep together).
Group 1's Name value is displayed in GH1.
Details are suppressed.
Group 2 has many fields displayed in GF2a, GF2b, GF2c. (i.e., it is displaying the only items in the last record of the Job # group).

When I run the report, some of the groups repeat on different pages.

That is Location1 appears on page 1 of the report, with 5 differing Job # items beneath it, then the Location2 group starts, etc, and all is well.

Then you get to Page 2, and suddenly the Location1 group is listed again, with the exact same data (verified the same records are being displayed a 2nd time).

I'm not sure what to look for as a cause here. Not a join issue. Fairly straight-foward grouping. Any suggestions appreciated!

Thanks,
AJ
 
Hold off. This may simply be the result of a syntax problem with OR usage in the selection statement. Added some () to specify some distinction and it seems to have solved it.

Cheers.
 
Okay, then. Opening this back up.

The problem does still exist. It seems to somehow be related to page breaks. Records are listing like this

Location 1
--data
--data
--data
Location 2
--data
--data
Location 3
--data
===PAGE BREAK===
Location 2
--data
--data
Location 3
--data
Location 3
--data
--data
--data
Location 4
--data
--data
Location 5
--data
--data
====PAGE BREAK===
--data (Location 5 continued)
--data
Location 3
Location 3
--data
--data
--data
Location 4
--data
--data
Location 5
--data
--data

Etc. Etc.

Not consistent, and generally weird.

Any advice appreciated.

Thanks,

 
Do a test version in which you don't suppress the details. That may explain it.

It may be that the software is classifying 'Location' as two groups when you see it as one, invisible characters can cause that.

Also check the 'Repeat Group Header' setting.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
I would try recreating the report from scratch. It sounds like the report has become corrupt.

-LB
 
@ Mawdawc,
Goo thought, I'll look at that. But I don't think it is the problem, because the same data is repeated in both groups. So it seems more like the data is simply being displayed twice.

@ lbass,
I did try that yesterday, and it went well for a while. I was trying to make one change at a time to see when it would go bad. At one point, all seemed well,and I had made all changes and it looked great. Then it suddenly went bad again, same problem. I believe the last change I made was to click "Keep Together" on Group # 1(Location) in Group expert.

Thanks for the input. Please let me know if anything else rings a bell.

 
Quick further note on behavioral weirdness.

When I change the selection criteria of the report and it asks to refresh the data, this first run is always correct. If I press F5 to refresh (even though the data hasn't changed) the problem suddenly occurs.

Also, when running the report inside CR while it is displaying the problem, it starts having trouble when I push the next page button. It shows that I'm on page 1 of 7, but it won't let me next page past page 3. I can see that on page 3 I should really only have 1 more page of data, but if I push Next page on Page 3....it jumps back to page 1!.

Ring any bells? I've clearly made it angry.
 
Are you using page N of M? What happens if you remove that?

-LB
 
@lbass

I was using it previous to posting, but I had already removed it before making the first post here. And when I rebuilt the report from scratch, I never inserted it.

Here's extra weirdness. I can F5 to refresh the report, and sometimes it comes out right, and sometimes it comes out with the problem. No data changes, it just suddenly starts duplicating some groups across pages, and then suddenly stops again. Weird, right?



 
I have no more thoughts on this. Sorry.

-LB
 
I have seen strange things like this occur when the conditional suppression, "can grows" and "keep togethers" get really complex and CR starts to lose track. But I don't think I have ever seen the report output change when the data hasn't changed.

Are their subreports in this report?

If you put the special field 'record number' on the 'data' section does the number actually get lower when the previous group repeats?

Any chance this one "table" is a really a view or stored procedure?

Any chance the data is changing in the database between refreshes?

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Hi Ken,

Thanks very much for your post.

This is definitely related to conditional suppression.

-No Subreports
-The Record Number DOES actually get lower when group repeats, so it is the same data, redisplayed.
-The table is just a straight Access table. No views or stored procedures.
-No data changing between refreshes.

I discovered earlier that if I turned the suppression off, that the problem didn't occur. So I started trying different suppression combinations, and I believe the problem is solved now.

Basically, for some reason that I no longer remember when designing the report, I chose to use the "Suppress Blank Section" option for GF2b (GF2 had 3 total sections). And to make that work I had to apply suppression to individual fields in that section. I removed all of those conditionals and used a formula on the "Suppress (no drill down)" for GF2b instead and that seems to have cleared it up. I think I was afraid to use the no-drill-down option initially because I was worried that something wouldn't calculate correctly. But there are no such calculations in this report anyway.

This problem appears to be solved. Thanks to all for your feedback.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top