Wednesday, March 21, 2012

Reports without Dataset ?

Hi,

I want to create SQL reports without using typedDataset.

Here is my scenario..

I am building a 3-tier arch website. On my web layer I want to display few reports and as a datasource I want to use my business objects which lays in buisness layer classes as methods. These methods returns DataTable.

I want to use this methods as datasource for my reports without getting dataset in picture. My problem is that while desinging report, it is taking Dataset as default datasource and its building it in App code. I don't want this, instead, I want to point my reports to Object Data Source and ODS to my business objects.

Is it possible to get rid of DataSet completly while designing reports? If yes than How to do it?

Thanks in advance

Regards,

ND

Hi,

From your description, it seems that you want to use the dataset as the datasource of your report project, right?

Based on my understanding, you can create a webservice which returns the dataset, and then regard the dataset as the datasource of your report. And then, in that webservice, you can call the methods which comes from your business layer to get the data you need.

For detail:

1. Create a webservice project, and create a webmethod, and then add the reference of your business class, and invoke the methods to get the data, create an dataset which is used to contain the data from your business layer. After that, you should deploy the webservice in your IIS.
2. Create a reporting service project, and then crate a new datasource in the SharedDataSource, set the Type to XML, assign the connection String property with the webservice address you created just now.
3. Create a new report, assign the Query String as:
<Query xmlns="http://Eric.org/">
<SoapAction>http://Eric.org/GetDataSource</SoapAction>
</Query>

For more usage about QueryString, seehttp://msdn2.microsoft.com/en-us/library/ms345251.aspx

Thanks.

|||

Thanks for the details..

Actually I don't want to use Dataset for my reports, How to achieve this?

While designing reports, It always creates Dataset and then display all the fields from the connected source. Instead of that, I want something what you mentioned in your reply but, WITHOUT using XML.

My scenario is the same, Its 3-tiers application, Fetching data by using WebService methods.

Regards,

ND

No comments:

Post a Comment