Ieshna
IS-IT--Management
- Jan 25, 2006
- 20
Please help, I am trying to create a stacked line chart in Crystal Reports for .NET Framework 4.0 (bundled with Visual Studio Pro 2010) and am running up against a wall.
I have two tables relevant to this problem. The first is a table relating to top level information about a test called TestBed_CACHE:
TestBed_CACHE:
UID int Sequence number for the Experiment (foreign key)
TestID int The sequence number of this test in the experiment
Product_Code nvarchar(64) The name of the test
... some other stuff that doesnt matter (Dates and such)
I have another table with the actual test results for the test ID called TestBedPoint_CACHE:
TestBedPoint_CACHE:
UID int Deferenced experiment sequence number
TestID int Sequence number of this test
DataPointID int Sequence number of the data point in the test this represents
DataValue int the datavalue of this point
If I create a new crystal report I add these two tables and link them on UID and TestID and add a parameter that will obtain the UID for the record selection formula (so that we see only the results for the experiment we want to look at).
Now heres what I need to do: For each Test, show the data points in a series. So for instance if there are three tests for this experiment, the data points for each test should be on the same line (three lines total). In the end I need to color code them and display the Product_Code for the test in the legend. I cannot get the graph to display properly however. Heres what I do:
In the group formula for the report, I group by TestBedPoint_CACHE.UID and TestBedPoint_CACHE.TestID.
I add a new Stacked Line Chart to the report header. I choose the 'For Each Record' option and Show Value(s) for TestBedPoint_CACHE.DataValue. Instead of getting three series though, the data shows up one after another. To get around this I change the dropdown to 'On Change Of' and choose TestBedPoint_CACHE.TestID, but now the show value wants to due a SUM summary operation on the DataValue, which I do not want.
Could someone please shed some light on what I am doing wrong? I would greatly appreciate it as I am trying to get this report wrapped up.
I have two tables relevant to this problem. The first is a table relating to top level information about a test called TestBed_CACHE:
TestBed_CACHE:
UID int Sequence number for the Experiment (foreign key)
TestID int The sequence number of this test in the experiment
Product_Code nvarchar(64) The name of the test
... some other stuff that doesnt matter (Dates and such)
I have another table with the actual test results for the test ID called TestBedPoint_CACHE:
TestBedPoint_CACHE:
UID int Deferenced experiment sequence number
TestID int Sequence number of this test
DataPointID int Sequence number of the data point in the test this represents
DataValue int the datavalue of this point
If I create a new crystal report I add these two tables and link them on UID and TestID and add a parameter that will obtain the UID for the record selection formula (so that we see only the results for the experiment we want to look at).
Now heres what I need to do: For each Test, show the data points in a series. So for instance if there are three tests for this experiment, the data points for each test should be on the same line (three lines total). In the end I need to color code them and display the Product_Code for the test in the legend. I cannot get the graph to display properly however. Heres what I do:
In the group formula for the report, I group by TestBedPoint_CACHE.UID and TestBedPoint_CACHE.TestID.
I add a new Stacked Line Chart to the report header. I choose the 'For Each Record' option and Show Value(s) for TestBedPoint_CACHE.DataValue. Instead of getting three series though, the data shows up one after another. To get around this I change the dropdown to 'On Change Of' and choose TestBedPoint_CACHE.TestID, but now the show value wants to due a SUM summary operation on the DataValue, which I do not want.
Could someone please shed some light on what I am doing wrong? I would greatly appreciate it as I am trying to get this report wrapped up.