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!

Return "O" when no value

Status
Not open for further replies.

sprog

IS-IT--Management
Sep 12, 2002
48
NZ
Hi there
I have written a report, where I am wanting to show all "Payment Names" and the hours paid for each pay period.

Because all payments are not used every fortnight, the payment name is omitted, but I would like it to show up with a zero value.

Example of my current formula: if {pay element.id} in [261,265] then "annual leave" else if {pay element.id} in {267.367.989} then "other" else {pay element.name}.

This is grouping together some names that I want lumped together, and the end part of my formula, means to print all others.

Hope you can understand this. Any help much appreciated.

Thanks
Julie
 
This is grouping together some names that I want lumped together

Whats wrong with that? Isn't that what a group is?

Please show sample data, current results and desired results. Also provide your version of crystal and database type.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
If you're linking a table of payment name to a table of hours, you need to make the link left-outer. Then you'll get records in the first table that have nothing in the second. But this will only work if you don't do any record selections on the second table.

Links are adjusted using Database > Datebase Expert > Links for Crystal 10. It's useful to give your Crystal version, though in this case it makes little difference.

Does this help?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
If you want all group instances to appear even if there are no records, you will need to use running totals where you use an evaluation formula like:

{@yourgroupingformula} = "annual leave"

Reset never (or on change of group if you are summarizing at the group level).

You would create one running total for each possible result of your formula, and place the running totals in a footer section with identifying text boxes.

-LB
 
Thank you for all of your replies. I am sorry that I have missed out information.
I am using Crystal 9.2 and my report is a crosstab.

I want it to look like:

P/E 01/07/07 P/E 15/07/07
Ordinary Time 250 253
Orientation 12 23
Training 0 0
Overtime 36 34

I am currently able to get this, but where Training has no value, this payment type is being left out of my report, and I want it to still show, with a zero figure.

Hopefully this explains it better.

Thanks
Julie
 
You can't have zero columns or rows in a crosstab. You could get the same effect using a 'Mock-Crosstab' - use Search for existing advice on these. Or you can use groups and group totals, as detailed above.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Even a manual crosstab won't work for this, since when you group on the row field, there would be no records for the training group instance. Try the running total suggestion.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top