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

On Change of Formula for Charting purposes 1

Status
Not open for further replies.

suburbanites

Programmer
Aug 16, 2007
75
US
Hi,

I am using Crystal XI. I have been reading about how to create a chart based on print-time formulas but I am not sure how to create a OnChangeOf formula. I have 5 fields that I need to be the basis of the change in records - Company, Fiscal Year, Accounting Unit, Account and SubAccount. I tried the following creating this formula in the main report:
whileprintingrecords;
shared stringvar onchgof := onchgof + totext({COMPANY}) + totext({FISCAL_YEAR}) +
totext({ACCT_UNIT}) + totext({ACCOUNT}) + totext({SUB_ACCOUNT}) + "^";
I then used this formula to link to a subreport where I want to create my chart.
In the subreport, I tried to do a record selection using the following:
totext({COMPANY} in split({?Pm-@OnChangeOf},"^"))
and
totext({FISCAL_YEAR} in split({?Pm-@OnChangeOf},"^"))
and
totextACCT_UNIT} in split({?Pm-@OnChangeOf},"^"))
and
totext({ACCOUNT} in split({?Pm-@OnChangeOf},"^"))
and
totext({SUB_ACCOUNT} in split({?Pm-@OnChangeOf},"^"))

but I get an error when I save : "A number range is required here" and it is pointing to split({?Pm-@OnChangeOf},"^"))

I am not sure how to resolve. Any help would be appreciated.

Thanks

 
Why do you think you need to use this method? I don't see anything here that would require it. Try charting directly in your main report, but note that you won't be able to use more than two "on change of" fields. You might want to consider whether it would make sense to group on these fields, and then use the chart at some group level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top