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

Need to show field names even if the values are null or zero

Status
Not open for further replies.

kenndot

Programmer
May 15, 2001
316
US
I've got a report only based on one table. (Nice, huh?)

I had a bunch of fields that I was totaling, however, I needed to create a formula to group these fields before totaling because my customer wanted to have a total that consisted of the values of three or four fields and then the name the user sees on the report for that total is different from what was in the database.

ex. sun, moon, stars needed to be totaled and on the report the name of the total of those three fields was "planet"... you get the point... I categorized them with a formula (thanks Kenhamady, it worked beautifully) and now I have this problem...

I end up with 5 different fields showing totals, which as I mentioned above, do not have corresponding names in the db... I need to show these names on the report ("planet") whether or not there is a value there. But, currently, I guess by default ( I don't really know enough about crystal to say) the report only shows the field if there is a value, and since there is only one table, I can't just change the join, is there another option to force the created row names to show regardless of whether there is a value in it? (There won't necessarily be a zero there for me to grab from the db)

Thanks
 
You have to use a different approach.
When you use grouping, you can't get totals to appear unless there is at least one record in the group.

What you need are conditional totals. These are hard coded, one for every group. See my FAQ on conditional totals in the general CR forum. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
I forgot to paste the formula here:

Should this work to make the titles appear with an empty record?

if {hd_incident.owner_grp} in ["HARDWARE", "HELPDESK"] or {hd_incident.owner_grp} in ["HARDWARE", "HELPDESK"] AND {hd_incident.sla_min_resp} = 0
then "HD"
else if {hd_incident.owner_grp} in ["SENIOR HELPDESK", "SOFTWARE","NETWORK"] or {hd_incident.owner_grp} in ["SENIOR HELPDESK", "SOFTWARE","NETWORK"] and {hd_incident.sla_min_resp} = 0
then "Other"
 
why are you repeating the first condition of each 3 condition set. That is redundant. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top