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

Grouping And summaries

Status
Not open for further replies.

ganjass

Technical User
Dec 30, 2003
154
GB
CR10
SQL server 2000

Hi ALL, I used a select case statement based on 4 fields from 4 database tables, selected through a paramater, to create selective grouping for a report. The four tables consist of the primary table C and the 3 lookup tables with left outer joins. Within these groups i have 4 summaries based on the if a = b then 1 else 0 format. Out of the 4 groups, 2 groupings are working ok, but the other 2 are giving me blank headings for the group and blank aggregates on the report and ideas as to why??

Thanks in advance
 
Your Select Case statement is not matching the parameter value for what to Group By in those 2 cases.

Make sure you are using the EXACT spelling of the parameter default values (and use the data values, not the Description values of the partameter default values).

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Hi Ido

Thanks for the response Ido. maybe i was a little bit ambiguous with my description, i have been guilty of this in the past. For the paramters i'm using the numbers 1 to 4 so as to avoid the issues that you describe.

For the 2 groupings i'm getting blanks for, i am getting aggregates back for certain parts of certain groups but i'm not getting them all ie. i should get 4 aggregates per group, in some i'm getting 2 some 3, some 1. If there is a value, ie if the criteria is met then i get a sumary value, if there are no values that meet the criteria, i should get a 0, but i'm getting a blank instead. This problem i can easily rectify as i can add to the conditional formulas to substitue a 0 if they are null.

But with the group headings, i should have 6 groups, which correspond to the 6 entries in the table, in which there are no null values. But for some unknown reason, the first header is blank and the other 5 are populated as you would expect. The group with the blank header has aggregate values
corresponding to it, but its not taking the entry in the table, any ideas?
 
Did you customize the Group Name in any way (in the Group options dialog)? Sounds like this is where the problem is.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top