regData not work

Stimulsoft Reports.JS discussion
Post Reply
pall
Posts: 17
Joined: Mon Nov 02, 2015 1:15 pm

regData not work

Post by pall »

var dataSet = new System.Data.DataSet("SimpleDataSet");
dataSet.readJsonFile("Demo.json");
var report = new Stimulsoft.Report.StiReport();
report.regData(dataSet.dataSetName, "", dataSet);

download trail ver,run the code in web page,new a designer,but the designer can''t show dataset below dataSource
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: regData not work

Post by Jan »

Hello,

Sorry for troubles with our product. We have changed our namespace from "System.Data" to "Stimulsoft.System.Data" to fix some problems with compatibility.
So please use following code:

Code: Select all

var dataSet = new Stimulsoft.System.Data.DataSet("SimpleDataSet");
dataSet.readJsonFile("Demo.json");
var report = new Stimulsoft.Report.StiReport();
report.regData(dataSet.dataSetName, "", dataSet);
Please contact us if you need any help.

Thank you.
pall
Posts: 17
Joined: Mon Nov 02, 2015 1:15 pm

Re: regData not work

Post by pall »

downloaded http://js.stimulsoft.com/ stimulsoft.*.js,try new code in demo,after designer showed,[dataSources] node still empty ,regData not work.
report.dictionary.dataSources.add(dataSet) show me an error

so,user can't design the report! just a test

var dt = new Stimulsoft.Report.Dictionary.StiDataTableSource("test0", "test1", "test1");
var report = new Stimulsoft.Report.StiReport();
report.dictionary.dataSources.add(dt);

the designer show db:test0,table:test1
but dt can't load data,it's empty table
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: regData not work

Post by HighAley »

Hello.

We have reproduced the issue.
We need some additional time to make an improvement.

Thank you.
Andrew
Posts: 4107
Joined: Fri Jun 09, 2006 3:58 am

Re: regData not work

Post by Andrew »

Hello,

We have made some improvements. Please download the new version from our web site at http://www.stimulsoft.com/en/downloads/reports-js

Please use the following code

Code: Select all

var dt = new Stimulsoft.Report.Dictionary.StiDataTableSource("test0", "test1", "test1");
var report = new Stimulsoft.Report.StiReport();
report.dictionary.dataSources.add(dt);
and use report.dictionary.synchronize(); to automatically fill the dictionary.

Please let us know whether this helped you.
Thank you.
pall
Posts: 17
Joined: Mon Nov 02, 2015 1:15 pm

Re: regData not work

Post by pall »

but how to load data into StiDataTableSource?

just downloaded new version,====>report.dictionary.synchronize(); OK
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: regData not work

Post by HighAley »

Hello.
pall wrote:but how to load data into StiDataTableSource?
Where do you need to load data from?

Thank you.
pall
Posts: 17
Joined: Mon Nov 02, 2015 1:15 pm

Re: regData not work

Post by pall »

designer show DataSet data,give up DataTable ^-^
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: regData not work

Post by HighAley »

Hello, Pall.

Sorry, maybe we don;t understand your question.
Could you describe it more detailed?

Thank you.
Post Reply