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

Crystal Reports .NET Help Needed! - Stacked Line Charts

Status
Not open for further replies.

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.
 
The show value wants to do a sum, but you can change that. Click on the value you want to count and the "Change Summary Operation" button below it should become enabled. Then you can specify a Count or Distainct Count.
 
But I do not want a count... I need to show the actual data values.
 
There is also a "Do Not Summarize" button. If you only have one record per data point (which you would have to if you want to show the actual data) then a Sum would be sum of one record, which is what you're looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top