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

don't suppress group if no records found

Status
Not open for further replies.

mythprod

Technical User
Nov 6, 2008
4
US
A client would like to show all of his group 1 and groups within that group even if the value is zero. CR is automatically filtering out all records and I end up with a blank report, instead of a report listing his group item by item with a value of zero. Is there an easy way to accomplish this? Would it be with a selection formula?

Thanks!

 
You might show us a sample of the type of data being grouped.

Also what Version of Crystal are you using? What kind of database is it?

 
You would have to use a table that had all group records in it, and then use that as your master table, using left joins FROM that table TO any other tables, with no selection criteria on the other tables. Then insert the group on the field in the master table.

-LB
 
I'm using Crystal Reports 2008. The database is a Derby SQL database. Group 1 and 2 are pulling from tables within the same SQL database.

Group 1 is a list of computers by their computer name. The 2nd group is a list of files those computers have played over the course of the time range defined by parameters. So the structure is:

PC-Name-1
File1 Played: 23
File2 Played: 56

PC-Name-2
File1 Played: 48
File2 Played: 97
File3 Played: 55
File4 Played: 34

I'd love it to be able to do the following:

PC-Name-1
File1 Played: 23
File2 Played: 56
File3 Played: 0
File4 Played: 0
File5 Played: 0

PC-Name-2
File1 Played: 48
File2 Played: 97
File3 Played: 55
File4 Played: 34
File5 Played: 0

 
So what is the {table.field} you are grouping on (specify the table in each case) for each group? What {table.field} are you summarizing, with what kind of summary?

-LB
 
Group 1 Header: Computer_Name
Group 2 Header: File_Name
Details (suppressed)
Group 2 Footer: File_Name
Group 1 Footer: Computer_Name

Ideally every Group 1 Computer_Name would show up, regardless as to whether it played the files or not. Right now if group 1 has a computer that didn't play the file at all it's just not there - I'd like it to be there along with the filename under it with the number of plays which would be 0.

I'm basing the search criteria on the filename being chosen in the parameters field - right now my select expert has file_name={?Files}.

Your questions has made me think of the reason I'm not getting it pull up in my report, everytime a file plays it generates a line in the database that I'm searching for called play_time. If there's no play_time log data in which to find it ignores that computer completely.

So I guess what I really need is some sort of formula to run whileprintingrecords maybe that checks for no records and if it finds nothing to go ahead and display the computer name and file(s) (as chosen in the parameters window) with zero counts next to them. Am I on the right track?

 
You didn't respond to my questions. What tables are you using? Please specify the fields you are grouping on by using this convention: {table.field}.

Also, is the filename your only selection criteria?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top