I want to tie my application's data into Stimulsoft. I think I figured several ways to do this, but I am not sure I am doing it correctly. My data is calculated on the fly and can be time-intensive. The schema is fixed and I want the user to be able to design the report just using the schema. If they run the report then I want my application to do the calculations. The way I did it (I use ArrayList as my list of objects), Stimulsoft wants to load all data once RegData() is called. Basically I want it to work in a similar fashion with a SQL table as a data source. We design with table schema but data is only loaded when the report is run.
How to use time-intensive business objects
How to use time-intensive business objects
Hello,
If we understand your task correctly then, yes, you can use RegData() method for your task.
Also you can use the following code for check the used datasources in report:
Thank you.
If we understand your task correctly then, yes, you can use RegData() method for your task.
Also you can use the following code for check the used datasources in report:
Code: Select all
StiDataSourceHelper.GetUsedDataSourcesNames(report);
StiBusinessObjectHelper.GetUsedBusinessObjectsNames(report);
How to use time-intensive business objects
I don't I explained my problem that well. I want to use data that is generate by my application. I have a schema for the data. I can call RegData() to register my data. But the issue I am running into is that RegData() is reading all the data, which in my case takes some time.
class MyDataList : IEnumerable
class MyDataEnum : IEnumerator
The MyDataList and MyDataEnum are written to do a lot of calculations against a lot of historic data - so it can take some time.
Now I want the user to be able to at least design the report:
report.RegData(new MyDataList());
report.Dictionary.Synchronize();
report.Design();
The problem in the above code is that RegData() then does the entire reading of data, when all I want is to design with the schema. I am wondering what the best way to do this is.
The way I worked through it but I don't know if there is a better way.
I create DataSet.
I load the schema into the DataSet.
I call report.RegData() with the DataSet. At this point there is no data in the DataSet.
I added a static public function in my code called LoadData() that will use MyDataList to create the data and copy the into the DataSet.
I add code to the Report.BeginRender event: MyStaticPublic.LoadData()
So when designing there is no data being read, which is what I wanted. When the user renders the report, it will call LoadData() which loads the data into DataSet and produces data for the report.
class MyDataList : IEnumerable
class MyDataEnum : IEnumerator
The MyDataList and MyDataEnum are written to do a lot of calculations against a lot of historic data - so it can take some time.
Now I want the user to be able to at least design the report:
report.RegData(new MyDataList());
report.Dictionary.Synchronize();
report.Design();
The problem in the above code is that RegData() then does the entire reading of data, when all I want is to design with the schema. I am wondering what the best way to do this is.
The way I worked through it but I don't know if there is a better way.
I create DataSet.
I load the schema into the DataSet.
I call report.RegData() with the DataSet. At this point there is no data in the DataSet.
I added a static public function in my code called LoadData() that will use MyDataList to create the data and copy the into the DataSet.
I add code to the Report.BeginRender event: MyStaticPublic.LoadData()
So when designing there is no data being read, which is what I wanted. When the user renders the report, it will call LoadData() which loads the data into DataSet and produces data for the report.
How to use time-intensive business objects
Hello.
If you try to register Business Objects, you should use next code:
3 is a nested level.
Thank you.
If you try to register Business Objects, you should use next code:
Code: Select all
rep.RegBusinessObject("Demo", ds);
rep.Dictionary.SynchronizeBusinessObjects(3);
Thank you.