Create report using webservices

Stimulsoft Reports.NET discussion
Post Reply
rmeshksar
Posts: 12
Joined: Thu Oct 18, 2007 4:39 pm
Location: Toronto

Create report using webservices

Post by rmeshksar »

Is it possible to use webservices as datasource to create report with Stimulsoft Report?
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Create report using webservices

Post by Vital »

Please provide more information about your webservice's.

Thank you.
rmeshksar
Posts: 12
Joined: Thu Oct 18, 2007 4:39 pm
Location: Toronto

Create report using webservices

Post by rmeshksar »

Suppose that I have a webservice returning an XML as a result.
Now I want to be able in Stimulsoft report designer call that webservice by its url and get the returning XML and create a report based on that.
Is it possible?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Create report using webservices

Post by Edward »

rmeshksar wrote:Suppose that I have a webservice returning an XML as a result.
Now I want to be able in Stimulsoft report designer call that webservice by its url and get the returning XML and create a report based on that.
Is it possible?
Yes, it is possible. Inside the designer any own defined functions are possible. Here an example on how to use them:

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

Report templates can be stored and loaded in/from string via the following methods:

Code: Select all

string s = report.SaveToString();
report.LoadFromString(string);
So you can use a data from any source for sending/receiving data or the report templates.

Thank you.
rmeshksar
Posts: 12
Joined: Thu Oct 18, 2007 4:39 pm
Location: Toronto

Create report using webservices

Post by rmeshksar »

Sorry, It seems my questions have not been that clear.
I want to design a report JUST by using standalone report designer and not inside VS2005.
My datasource is a webservice that has a link and returns a typed dataset.
In stanalone report designer, How can I use that webservice as a datasource?
As an example use the following like to get some result

http://xoap.weather.com/weather/local/N ... =xoap&par=[your-partner-id]&key=[your-license-key]

Now I want to design a report using the returned result from the link above.
Thanks.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Create report using webservices

Post by Vital »

For example you can use following code:

Code: Select all

DataSet dataSet = new DataSet();
dataSet.ReadXml(xmlSource);//Read your typed dataset for example from string which you get from webservice

StiReport report = new StiReport();
report.RegData(typedDataSet);//Register created dataset

report.Dictionary.Synchronize();
report.Design();//Call report designer
Thank you.
Post Reply