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!

Naming Sub-total fields for later use within a report

Status
Not open for further replies.

hnts

IS-IT--Management
Dec 9, 2003
65
US
I've written a report that details billing codes and the programs the pertain to. The report works fine but now I've been asked to add the Priority fields and the non-priority fields. I have the sub-totals in the report already but now I need to add the Priority vs, the non. I suspect I can do this by naming each UNIQUE sub-total field and displaying them at the end of a report via a formula. Can anyone give me some idea as to how to how to proceed?

Thanks
 
Please provide more information. This information hardly explains what your are trying to achieve. CR version, Database used, Sample data, expected out put would get you to your desired solution faster.

Kchaudhry
 
I am using Crystal Reports 8.5. I am querying data from a D-base 5 database. The report I am writing is a report to identify the total dollars we billed/collected on a particular program type. The data I query includes the billfile name, contract #, Client Name, to date, from date, Service code, units of service, rate, billcode, amount billed and amount paid. Additionally, I included several groupings (1: Group by contract number and 2: Group by bill code within each contract number) This part was easy and works well. However, now I am trying to improve this report to include all of the things we had to do manually (i.e. Add up the bill codes that are Priority 1 vs. Priority 2). The problem is that these are intermingled between the two contracts and so I figured I could define each Billcode subtotal and add them up in a formula and display them at the end of the report.

For example:

Contract # 1 only has one billcode G0701 and they're all Priority 1. As such I wanted to define the Sub-total for that grouping as (Contract#, Billcode, P status) or 6629-G0702-P1.

Contract # 2 has 6 Billcodes of which 3 are Priority 1 and 3 are Non-priority and my thought were to name each sub-total (907-G0702-P1, 907-G0740-P1, 907-G0742-P1, 907-G0702-NP, 907-G0740-NP, 907-G0742-NP)

Once these are defined I figured I could add up and display my totals respectively on the last page of my report. That's what I'm trying to accomplish. Please let me know if you need any additional information to help understand my question.

Regards


 
You lean towards talking about how you want to create the report instead of supplying example data and expected output and allowing others to assist with the implementation.

Specifics as to what the original data looks like, and what and where you intend to display is what's most imposrtant.

Presumably you've concatenated fields into one formula, and you're intending to supply counts of each of those.

Where might these counts be, in the report footer?

Consider a crosstab report in the group footer which uses the concatenated field as the row, and a count of each.

Otherwise please supply information about your data.

-k
 
If your goal is really just getting the summaries of Priority 1 vs. Priority 2 bills in the report footer, then you can insert two running totals, using the running total expert. Choose {table.billamt} (substitute the field you want to sum), sum, evaluate based on a formula:

{table.billcode} = "Priority 1"

Reset never.

Repeat for the second running total, changing the formula to "Priority 2".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top