Page 1 of 1

Chart with data from DataSet

Posted: Mon Sep 08, 2008 6:53 am
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

Chart with data from DataSet

Posted: Mon Sep 08, 2008 8:00 am
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.

Chart with data from DataSet

Posted: Mon Sep 08, 2008 8:25 am
by Nateksi
Thank you for the reply Edward.

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

Screenshot here

/Anette


Chart with data from DataSet

Posted: Tue Sep 09, 2008 5:12 am
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.

Chart with data from DataSet

Posted: Tue Sep 09, 2008 7:32 am
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?

Chart with data from DataSet

Posted: Tue Sep 09, 2008 7:58 am
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.

Chart with data from DataSet

Posted: Tue Sep 09, 2008 8:08 am
by Nateksi
Thank you!! :biggrin: It works now!

Chart with data from DataSet

Posted: Tue Sep 09, 2008 12:49 pm
by Edward
Good news! :)

Thank you.