Chart with data from DataSet

Stimulsoft Reports.NET discussion
Post Reply
Nateksi
Posts: 10
Joined: Mon Sep 08, 2008 6:16 am
Location: Denmark

Chart with data from DataSet

Post by Nateksi »

I'm new at this and I'm trying to make a chart with a Clustered Column with data from a dataset, but I can't get it to work... The chart shows up empty...

I made a testreport.mrt with a Clustered Column with two series... I sat the value data column and argument data column (to se if some of it worked) to {vwSurveillanceValue.SecondsOn} where vwSurveillanceValue is the name I declare for my table in the DataSet...

In my code I declare a new DataSet and fill it with data from a database, and then:

Code: Select all

ds.DataSetName = "dxSurveillance";
ds.Tables[0].TableName = "vwSurveillanceValue";
report.Load("C:\\testreport.mrt");
report.RegData(ds);

StiWebViewer1.Report = report;
Is it the right way to set what data the chart should show?

Thanks,
Anette
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Chart with data from DataSet

Post by Edward »

Hello, Annette.

Yes, it is the right way to show of the chart.

Please add the following line:

report.Dictionary.Synchronize();
after RegData().

Also please place testreport.mrt in the folder with your web application and change Load method a little bit:

report.Load(Server.MapPath("testreport.mrt"));

If you still face problems, please send that project to support[at]stimulsoft.com for the analysis.

Thank you.
Nateksi
Posts: 10
Joined: Mon Sep 08, 2008 6:16 am
Location: Denmark

Chart with data from DataSet

Post by Nateksi »

Thank you for the reply Edward.

I made the changes, but the chart is still empty!

Screenshot here

/Anette

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Chart with data from DataSet

Post by Edward »

We have similar behavior before 2007.2 release. But now everything must be rendered in Web as required.

Could you render that report in the Designer.exe in Windows Forms, save it and then load in the stiWebViewer via the following code:

report.Load("myreport.mdc");
stiWebViewer1.Report = report;

You can save into mdc format rendered report directly from the preview window.

Thank you.
Nateksi
Posts: 10
Joined: Mon Sep 08, 2008 6:16 am
Location: Denmark

Chart with data from DataSet

Post by Nateksi »

When I look at the preview in the designer the chart is empty...

I followed your instructions, but now the empty chart doesn't even show... its just a blank page...

If you're interested I have upload a zip file with the testreport.mrt and report.mdc here...

What kind of data does the chart expect?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Chart with data from DataSet

Post by Edward »

Thank you for the files.

You report does not contain any DataSources. Please register it as it is shown in the following flashing tutorial:

here is the page with flash video which might be helpful to you:

http://www.stimulsoft.com/livedemos/Rep ... onary.html

http://www.stimulsoft.com/LiveDemos.aspx

Thank you.
Nateksi
Posts: 10
Joined: Mon Sep 08, 2008 6:16 am
Location: Denmark

Chart with data from DataSet

Post by Nateksi »

Thank you!! :biggrin: It works now!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Chart with data from DataSet

Post by Edward »

Good news! :)

Thank you.
Post Reply