travelerII
Technical User
I have created a report that shows Inventory on hand, Safety Stock required, product being built, product to be sold and average monthly usage. I had to use subreports to get the inventory on hand and the average montly usage. All the data are in the details section. I then group on the product and sum the data into the group header section. I have placed the subreports in the group header This all works great but now I need to write a formula that looks at the data and lets us know how much to build in the next month, etc.
The data from the subreports is not available to use in formulas in the main report. I have searched threads regarding shared variables and have tried to copy them but they don't seem to work. I am using Crystal 10 and have put the following formula in the subreport for average monthly usage.
whileprintingrecords;
shared numbervar AvgMonthlyUsage := {@Avg Monthly Usage}
when I place it in the subreport it returns the correct number.
I placed the following formula in the main report.
whileprintingrecords;
shared numbervar AvgMonthlyUsage;
I then moved the subreport up into the page header and placed the shared variable formula for average monthly usage in the group header but all I get is 0.00 on all lines instead of the average monthly usage.
Any help is greatly appreciated.
The data from the subreports is not available to use in formulas in the main report. I have searched threads regarding shared variables and have tried to copy them but they don't seem to work. I am using Crystal 10 and have put the following formula in the subreport for average monthly usage.
whileprintingrecords;
shared numbervar AvgMonthlyUsage := {@Avg Monthly Usage}
when I place it in the subreport it returns the correct number.
I placed the following formula in the main report.
whileprintingrecords;
shared numbervar AvgMonthlyUsage;
I then moved the subreport up into the page header and placed the shared variable formula for average monthly usage in the group header but all I get is 0.00 on all lines instead of the average monthly usage.
Any help is greatly appreciated.