Hi,
I am trying to create a local report that retrieves the data from a web
service in my business layer application but I can't figure out how to get
this dataset into my report.
Here is what I do:
I have 3 projects in my solution:
Project1.
A class library which contains a typed dataset 'myTypedDataSet'.
Project2.
A web service application with one method that returns 'myTypedDataSet'
Project3.
A windows application that contains one form and one report.
- I open my report in the designer
- Added a new datasource based on my webservice method (and 'myTypedDataSet'
showed up in the data source explorer view)
- I added the fields from 'myDataSet' to my report.
- I created a button with a click event where I call my web service that
returns an object of 'myTypedDataSet'.
Now - how can I assign this dataset to the report? I can't see anything
documented about how to do this.
Kind Regards
ThomasAhh, this is different than I thought you were asking. The thread
2005 SQL Reporting Service XML Data Source (WebService)
talks about using a web service as a source for a server based report. Your
question really has nothing to do with a web service, rather if I understand
you correctly you are wanting to use the Winform control and give it the
dataset. I have just started using this control but so far in server mode. I
know that the way the control works in local mode is you give it the dataset
and the report to use. If no one answers I suggest posting with the subject:
How do you assign dataset for Winform Control
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Thomas Andersson" <1qa2ws3ed4rf5tg6yh@.newsgroup.nospam> wrote in message
news:8B4AD63D-6CF0-4BCB-A3E0-0B1EDE447659@.microsoft.com...
> Hi,
> I am trying to create a local report that retrieves the data from a web
> service in my business layer application but I can't figure out how to get
> this dataset into my report.
> Here is what I do:
> I have 3 projects in my solution:
> Project1.
> A class library which contains a typed dataset 'myTypedDataSet'.
> Project2.
> A web service application with one method that returns 'myTypedDataSet'
> Project3.
> A windows application that contains one form and one report.
> - I open my report in the designer
> - Added a new datasource based on my webservice method (and
> 'myTypedDataSet'
> showed up in the data source explorer view)
> - I added the fields from 'myDataSet' to my report.
> - I created a button with a click event where I call my web service that
> returns an object of 'myTypedDataSet'.
> Now - how can I assign this dataset to the report? I can't see anything
> documented about how to do this.
> Kind Regards
> Thomas|||Hi Bruce,
> I have just started using this control but so far in server mode. I
> know that the way the control works in local mode is you give it the dataset
> and the report to use.
But how do you do this in runtime with a dataset retrieved from a web
service? This must be a very common scenarion when you use the report in
local mode.
Actually - I have implemented a solution that does this but I am not happy
with the way I do it.
On my winform button click event:
//Create an inctance of my web service proxy class and get the dataset
wsASPService myService = new wsASPService();
DataSet ds = myService.GetSalesName();
//Loop through the records of the first tables in the returned dataset and
add those
//records to my report's dataset 'dsSalesName'
//('dsSalesName' is a dataset created in this winform project)
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
dsSalesName.Tables[0].Rows.Add(ds.Tables[0].Rows[i].ItemArray[0],
ds.Tables[0].Rows[i].ItemArray[1]); //Only 2 columns in my table
reportViewer2.Refresh();
This works ok but in this solution I have created my typed dataset in my win
forms project and this is a poor design. I want to keep this dataset in a
separate project so I can share my typed dataset definitions to be used
across my solution (see my first post in this thread where I have the dataset
in a class library project).
Any ideas?
Thanks
Thomas Andersson|||I would not think you should have to copy from one dataset to another. I
would think you could just set the data source for the control to this
dataset.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Thomas Andersson" <1qa2ws3ed4rf5tg6yh@.newsgroup.nospam> wrote in message
news:D78561C5-D531-409D-93EB-48AAFBA386CD@.microsoft.com...
> Hi Bruce,
>> I have just started using this control but so far in server mode. I
>> know that the way the control works in local mode is you give it the
>> dataset
>> and the report to use.
> But how do you do this in runtime with a dataset retrieved from a web
> service? This must be a very common scenarion when you use the report in
> local mode.
> Actually - I have implemented a solution that does this but I am not happy
> with the way I do it.
> On my winform button click event:
> //Create an inctance of my web service proxy class and get the dataset
> wsASPService myService = new wsASPService();
> DataSet ds = myService.GetSalesName();
> //Loop through the records of the first tables in the returned dataset and
> add those
> //records to my report's dataset 'dsSalesName'
> //('dsSalesName' is a dataset created in this winform project)
> for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
> dsSalesName.Tables[0].Rows.Add(ds.Tables[0].Rows[i].ItemArray[0],
> ds.Tables[0].Rows[i].ItemArray[1]); //Only 2 columns in my table
> reportViewer2.Refresh();
> This works ok but in this solution I have created my typed dataset in my
> win
> forms project and this is a poor design. I want to keep this dataset in a
> separate project so I can share my typed dataset definitions to be used
> across my solution (see my first post in this thread where I have the
> dataset
> in a class library project).
> Any ideas?
> Thanks
> Thomas Andersson|||> I would not think you should have to copy from one dataset to another. I
> would think you could just set the data source for the control to this
> dataset.
I get this error message when I try to do that: "Value does not fall within
the expected range."
wsASPService myService = new wsASPService();
DataSet ds = myService.GetSalesName();
reportViewer2.LocalReport.DataSources[0] = new
Microsoft.Reporting.WinForms.ReportDataSource("dsSalesName", ds);
Is this the right way of doing it? Can you get it to work if you do a quick
sample?
Kind Regards
Thomas|||Hi Thomas,
You may use the code like below
reportViewer.LocalReport.DataSources.Add(
new ReportDataSource("DataSet1_Orders", LoadOrdersData()));
LocalReport.SubreportProcessing Event
http://msdn2.microsoft.com/en-us/library/microsoft.reporting.winforms.localr
eport.subreportprocessing.aspx
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Got it to work. First, the datasource needs to be a table, not a dataset
(remember, datasets can have multiple tables).
Here is working code (in my case I have a dataset with a single table that
gets the data from Sybase, doesn't matter though, works the same once you
have a dataset).
Dim dsReport As New Microsoft.Reporting.WinForms.ReportDataSource()
dsReport.Value = ds.Tables(0) 'ds is your dataset
dsReport.Name = "DatasourcenameYourReport is expecting"
Me.ReportViewer1.LocalReport.DataSources.Add(dsReport)
Me.ReportViewer1.RefreshReport()
If you add it by the wrong datasource name the reportviewer will tell you.
If you are not sure of the datasource name then add a break point and use
this in immediate window:
?me.ReportViewer1.LocalReport.GetDataSourceNames(0).ToString
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Thomas Andersson" <1qa2ws3ed4rf5tg6yh@.newsgroup.nospam> wrote in message
news:A6EFD849-F73F-4435-A7FF-118319B16449@.microsoft.com...
>
>> I would not think you should have to copy from one dataset to another. I
>> would think you could just set the data source for the control to this
>> dataset.
> I get this error message when I try to do that: "Value does not fall
> within
> the expected range."
> wsASPService myService = new wsASPService();
> DataSet ds = myService.GetSalesName();
> reportViewer2.LocalReport.DataSources[0] = new
> Microsoft.Reporting.WinForms.ReportDataSource("dsSalesName", ds);
> Is this the right way of doing it? Can you get it to work if you do a
> quick
> sample?
> Kind Regards
> Thomas
Showing posts with label business. Show all posts
Showing posts with label business. Show all posts
Saturday, February 25, 2012
Thursday, February 16, 2012
Can Reporting Serivces do THIS?
Hi, we have a business need that would
1. allow a user to select and order the columns from a table in the UI
2. The user would then provide filtering on those columns (CLIENT SIDE)
3. User will then execute this report to return data based on criteria
** The initial UI screen will have data driven from a Stored Procedure
The filtering should be done on the client side, showing only the columns
that have been selected in the order that they were selected
4. User can then have this ad hoc query saved
Is there a process of method that Reporting Services provides out of the box
to have this functionality?
--
MCSD.NETI suggest reading up on Report Builder in RS 2005 (released in November). It
is a new addition to the product that is web based end user reporting. It
sounds close to what you want.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ramzi" <Ramzi@.discussions.microsoft.com> wrote in message
news:A419C5CB-370A-4678-9D58-BAA69E9006CA@.microsoft.com...
> Hi, we have a business need that would
> 1. allow a user to select and order the columns from a table in the UI
> 2. The user would then provide filtering on those columns (CLIENT SIDE)
> 3. User will then execute this report to return data based on criteria
> ** The initial UI screen will have data driven from a Stored Procedure
> The filtering should be done on the client side, showing only the columns
> that have been selected in the order that they were selected
> 4. User can then have this ad hoc query saved
> Is there a process of method that Reporting Services provides out of the
> box
> to have this functionality?
> --
> MCSD.NET
1. allow a user to select and order the columns from a table in the UI
2. The user would then provide filtering on those columns (CLIENT SIDE)
3. User will then execute this report to return data based on criteria
** The initial UI screen will have data driven from a Stored Procedure
The filtering should be done on the client side, showing only the columns
that have been selected in the order that they were selected
4. User can then have this ad hoc query saved
Is there a process of method that Reporting Services provides out of the box
to have this functionality?
--
MCSD.NETI suggest reading up on Report Builder in RS 2005 (released in November). It
is a new addition to the product that is web based end user reporting. It
sounds close to what you want.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ramzi" <Ramzi@.discussions.microsoft.com> wrote in message
news:A419C5CB-370A-4678-9D58-BAA69E9006CA@.microsoft.com...
> Hi, we have a business need that would
> 1. allow a user to select and order the columns from a table in the UI
> 2. The user would then provide filtering on those columns (CLIENT SIDE)
> 3. User will then execute this report to return data based on criteria
> ** The initial UI screen will have data driven from a Stored Procedure
> The filtering should be done on the client side, showing only the columns
> that have been selected in the order that they were selected
> 4. User can then have this ad hoc query saved
> Is there a process of method that Reporting Services provides out of the
> box
> to have this functionality?
> --
> MCSD.NET
Tuesday, February 14, 2012
Can Not View Report Server Web Pages
I have installed the Business Intelligence Studio on my PC and had no
problems creating a report, but when I go to http:\\localhost\reportserver,
I just see a directory listing in the browser instead of the web interface.
Where should I look to troubleshoot?
TIA
Dean> Where should I look to troubleshoot?
No place -- you're prolly fine.
Try http://localhost/reports if you want the Report Manager interface...
>L<
"Dean" <deanl144@.hotmail.com.nospam> wrote in message
news:%23p6kzVcqHHA.1220@.TK2MSFTNGP04.phx.gbl...
>I have installed the Business Intelligence Studio on my PC and had no
>problems creating a report, but when I go to http:\\localhost\reportserver,
>I just see a directory listing in the browser instead of the web interface.
>Where should I look to troubleshoot?
> TIA
> Dean
>
problems creating a report, but when I go to http:\\localhost\reportserver,
I just see a directory listing in the browser instead of the web interface.
Where should I look to troubleshoot?
TIA
Dean> Where should I look to troubleshoot?
No place -- you're prolly fine.
Try http://localhost/reports if you want the Report Manager interface...
>L<
"Dean" <deanl144@.hotmail.com.nospam> wrote in message
news:%23p6kzVcqHHA.1220@.TK2MSFTNGP04.phx.gbl...
>I have installed the Business Intelligence Studio on my PC and had no
>problems creating a report, but when I go to http:\\localhost\reportserver,
>I just see a directory listing in the browser instead of the web interface.
>Where should I look to troubleshoot?
> TIA
> Dean
>
Sunday, February 12, 2012
Can not see Report Model Template in Business Intelligent Project Templates
Hi all,
I desperately need to setup the AD-HOC reporting on SQL server 2005.
I think one of the templates that I need is in Business Intelligent Project Templets Reporting Model Template in Visual Studio Templates.
But I do not see it in there.
Can some one please let me know where can I get the Reporting Model Template, or a link to where I can download or how to create it.
Thanks or any help.
Abrahim
You need SQL Server Enterprise Edition to deploy Report Builder functionality, and SQL Server Enterprise or Developer Edition to create the models. Installing that will give you the templates and other functionality needed.|||Thanks John!Abrahim
|||Mark as answered, please. Thanks!
Subscribe to:
Posts (Atom)