Report.RegData()

Stimulsoft Ultimate discussion
Post Reply
beso
Posts: 34
Joined: Wed Jun 23, 2010 7:32 am
Location: GEORGIA

Report.RegData()

Post by beso »

Hello,
I use Stimulsoft Reports.Ultimate 2010.1

It is My code.:

Dim Report As StiReport = New StiReport()
Report.RegData("A", DS)
StiWebDesigner1.Design(Report)

and result is ... see attach please..

"A" - hev error .... And the report not work ....

This code correqtli working in StiRep. 2008 release...
Why... and can i do something ? Thank you.
Attachments
482.RRR.doc
(134.5 KiB) Downloaded 403 times
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Report.RegData()

Post by Vladimir »

Hello,

There are two ways to preview a report that would work correctly:

1. Add a new connection to the database. Please use the following code:

Code: Select all

string connString = "Data Source=127.0.0.1;Initial Catalog=master;Integrated Security=True";
StiSqlDatabase database = new StiSqlDatabase(dataset.DataSetName, connString);
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(database);
2. Connect data directly to the report in the GetPreviewDataSet event:

Code: Select all

protected void StiWebDesigner1_GetPreviewDataSet(object sender, StiWebDesigner.StiPreviewDataSetEventArgs e)
{
    string appDirectory = HttpContext.Current.Server.MapPath(string.Empty);

    DataSet data = new DataSet();
    data.ReadXml(appDirectory + "\\Data\\Demo.xml");
    data.ReadXmlSchema(appDirectory + "\\Data\\Demo.xsd");

    e.PreviewDataSet = data;
}

Thank you.
Post Reply