suburbanites
Programmer
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
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