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

Zero's in Group Footer if no data in details section 2

Status
Not open for further replies.

ajaysadey

Programmer
Jun 10, 2003
13
0
0
US
I posted this question sometime ago but I need some more ideas please.

I am using Cr 8.5.216. Database connectivity: ODBC to Progress 9.1D using Merant 32-bit SQL 92 driver. I dont know if I have choice in setting outer join or equal join. I just link them based on the indexes and primary keys available in the data dictionary.

I am selecting the records based on this formula {PORel.DueDate} in {?Beg Date} to {?End Date} and {Vendor.GroupCode} in {?Vendor Type}

I am selecting records of vendors who belong to a category between two dates. I am grouping vendors by their name and I am suppressing the details of their records in the details section of the report but I am displaying running totals and summary fields in the group footer. It works fine. But I would like display zero's for counts and summaries if there are no details available for that vendor in that period.

The report is based on details in the group. Report is grouped on Vendor_Name. These lines are group footers based on details which are suppressed. The totals, early, late are running totals. Late% and Early% are formulas based on the running totals.

Is there a way to display zero's in summary fields in group foooter if no details are available in the details section.


Sample Expected Results:
Vendor_Name Late% Early% Total Early Late
name1 33.3 66.6 9 6 3
name2 25.0 75.0 12 8 4
name3 00.0 00.0 0 0 0

In the present report line 3 does not show up if the vendor did not have any POs during the date range.

How can I show the 0.0 in the footers totals if there are no group details.

Thanks in advance for your replies
 
I am assumming you are not getting all the vendors because not all vendors actually buy within the time fram of the report.

If this is the case you need a table with every single vendor name in it, left outer joined to table with the late/early data. The create formulas for each of your columns 2 thru 6 as follows:

if isnull({Column1Data}) then 0 else {Column1Data}

If a give vendor did not have activity during the time frame of your report, then this will create detail lines of zero and then a zero group footer.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
dgillz's solution is optima if you are allowed to create a new table, or can easily get one created to your specifications.

If you aren't, an alternative is to create running totals for all possible vendors. Show them in the report footer when the total is zero.

Another solution is to include a wider range of date in your data, one that will include something for every vendor. Then suppress printing for those outside of the date range, showing just the group header or footer. This is an inefficient use of machine-time but might be the simplest solution from your point of view.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top