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!

Charting from a shared numbervar array

Status
Not open for further replies.

JasonDecHer

Technical User
May 24, 2002
19
US
I have a shared numbervar array in the main report that i am trying to graph in a subreport. I can get the array to display in the detail section but only the first record is showing up in the chart, which leads me to believe that it is not steping through the array properly. I have tried to use a for-loop but was unsucessful. I will email anyone a copy of the report if they wish. Thanks in advance.
Jason
 
Shared variables can't be used for charting, because they occur "WhilePrinting", which is after the charts are done.

However, you may be able to pass the values down to the subreport using links, and then use those values in formulas, and then use the formulas in an advanced charte. I am pretty sure that you will need to turn the array into separate formulas. How big is the array? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
the array will hold 12 numbers, can you explain how to put my array into formulas(plural), i put my array into one formula but am having trouble stepping through the array in the chart. I can only get one number of the array to display in the chart at one time. Thanks.
 
You would need 12 formulas, one for each element of the array.
Then you might be able to use those 12 formulas in your chart. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I have the fomulas that each on looks like...
Shared Numbervar Array myarray[1];
next formula
Shared Numberar Array myarray[2];
I place all of them into the show values of advanced chart and each formula displays on a separated line(on a line graph) for every Change of Date. How can I get the values in my array to display on one line? And how do I get the values in my array to only display for the appropriate date instead of every date?
 
What do you mean by appropriate date?
Which section (main) contains this subreport?
Which section (sub) contains the chart? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I am trying to create a line graph of values calculated by a formula in the group footer #1. This formula uses shared variables which I have been told can’t be graphed in a main report and must be graphed in a subreport. When I tried graphing the shared formula it only displayed the last value in that formula, so I put each of the values of this formula into an array. My group #1 is date, by day. So in my subreport, for each change of date, group #1 I want the chart to display the appropriate value calculated by the formula in the group footer #1.
The subreport is in the report footer of the main report and the graph of the subreport is in the report header a. I can change these if that would help.
Thanks.
 
You wouldn't need a shared variable before you had a subreport. Post your original formulas, the one from group footer 1 (I assume this is GF1 in the main report. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top