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!

groups By Formula

Status
Not open for further replies.

usercrystal2

Programmer
Dec 16, 2010
1
PE

Hi, i'm using a cross-tab
and grouping (in columns) by formula

@GroupIncident
if {HPD_HD.Assig_Group} = "GO BSS" then "Back Office"
else if {HPD_HD.Assig_Group} = "GO NSS" then "Front Office"
else if {HPD_HD.Assig_Group} = "GO AAE" then "Middle Office"

But in results:

Total Back Office Front Office
10 4 6


Column "Middle Office" will should printing with value "0":



Total Back Office Front Office Middle Office
10 4 6 0


Any help is greatly appreciated

Thanks
 
Are you able to get tables / datasets added to the database? Or link to an Excel spreadsheet? If you got a table with the three slots set up, this could be linked to the activity using LEFT OUTER and you'd still get a slot when there was no activity. (But note that LEFT OUTER does not work if you also do a selection on the table receiving the LEFT OUTER link.)

If you can't add a table, you'll be stuck with creating a 'Mock Crosstab'. Crosstabs are fine if you don't mind the absence of rows or columns with no data, but you said you wanted empty slots to show.

A 'Mock Crosstab' is something that looks like a Crosstab, but in fact you define each column yourself, normally as a running total. This would need to go in the report footer, because running totals count as the reports 'run' and they will not be complete until then. Crystal should have included an example along with the Crosstabs.

You can save a little time by doing a paste to a dummy report, changing the name and then pasting back. In Crystal 11.5, you can also duplicate formula fields using the Field Explorer.

PS. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options. In this case, it probably makes no difference.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top