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

Using Parameters to change group-bys and sums 1

Status
Not open for further replies.

sniggih

Technical User
Jan 23, 2002
22
0
0
US
I need to create a report that the user has the ability to select what field to group by. I know that a parameter field can't return a database or formula-field name but I can create a formula based on the parameter field. Then use that formula as the group-by field in the report. The problem that I am having however is with the subtotals on my report. I will need the ability to change my sums on my report. I had the following formula...Sum({Profile:_Stage_II.erpaid_ibnr},{Profile:_Stage_II.Provider ID})/Sum({Profile:_Stage_II.Membership},{Profile:_Stage_II.Provider ID}) and that works fine. (Provider Id is a column in my database.)
I tried using that parameter I created ({?Report Group By Selection}. I tried to change my formula to...Sum({Profile:_Stage_II.erpaid_ibnr},{?Report Group By Selection})/Sum({Profile:_Stage_II.Membership},{?Report Group By Selection}) This is the error I am getting...."The Summary/Running field could not be created.

How can I get around this?

 
Your formula based on the parameter field should be like this:

If {?ParmField} = 1 then {field1} else {field2}

Then you group by this formula field:
Sum({FieldtobeSummed},{@FormulaField})

Try this and let me know if you have any problems Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top