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

Shared variables are zero on chart

Status
Not open for further replies.

LVW

Programmer
Mar 22, 2001
2
US
In Crystal Reports 8, shared variable data from subreports are printing correctly in my main report, but on my bar chart, they're showing up as zeroes! The other data from my main report is charting correctly. How can I fix this? I followed Seagate's Knowledge Base article c2007600 to set up the shared variables.
 
Shared variables are always WhilePrintingRecords and I don't think you can chart a value unless it is calculated WhileReadingRecords.

I am surprised you could even use the field in the chart. Describe the settings for the chart "Data" tab, and give the formulas for any fields used. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
ken, thanks for the insight. The data tab in Chart Expert shows my 2 formulas @MainFormula and @NewFormula (ref: Seagate article c2007600) which contain the shared variables. In "show values" I have data from my main report (which are summary operations and are charting OK). I also have @MainFormula and @NewFormula (with the "don't summarize values" box checked). I don't get any error msgs., just that the data is zero on the chart, but correct in the printed report.
 
If you followed the article, your "New formula doesn't have an evaluation time.

The printing copy of the formula will work fine, since it occurs after the subreport has run. But, the chart is using this formula before the report prints and at that point, the value hasn't been passed yet.

Bottom line, there are some limits on what you can do with subreport values.

If you describe your business case there may be another approach that doesn't require subreports. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top