Hello,
I work for a fairly small construction company that uses Timberline and Crystal Reports. I'm not terribly proficient with Crystal but for the most part I've gotten by pretty well for our needs. I'm hoping my current problems are kind of glaringly obvious and someone can set me straight easily enough. I've attached an image below to give you an idea of the basic structure I'm working with. I've done a number of searches on this forum for "Shared variables" but nothing seemed to click for me.
I have a primary report setup like this:
Group 1 Header by Cost Code
Details with Subreport
Group 1 Footer with data & variable
Basically, if there’s a cost code on the main report with no activity on the subreport, the main report's variable on that line uses the last reported variable number. In the picture, you see this for cost code 03-500, where $1,717.00 repeats itself from the previous Concrete line.
Currently, the Subreport is "Linked" through that dialogue box by Cost Code fields from one table to the next. If I don’t use the Subreport Link option, then the variables on the main report all return a value of 500.00, which is the last value assigned to the variable in the subreport.
The formula in the subreport for the variable is as follows:
Shared NumberVar Adjust;
Adjust := Sum ({DOCUMENT_PJD_POTENTIAL_CO_DETAIL.Total_Cost}, {DOCUMENT_PJD_POTENTIAL_CO_DETAIL.Cost_Code})
The subreport is also grouping by cost code.
I have to imagine there is something very straight forward with this I just missing. I'd greatly appreciate some assistance! Thank you.
Edited by jaylit - 15 Feb 2011 at 4:39pm