Setting datasource on a Reporting Service report - sql-server

i have a drop down list contains the name of reports and each report have a value (1,2,3...) and i have a popup window that appears when user click on view report button
this popup is a web page that contains the report viewer ,,in cs of this popup page i have a swtich that takes int which is the value of the report eg.if i want to display the first report so i chose the first one in the drop down list and the selected value is 1 and it is passed to the page that contains the report viewer in a session variable and pass it to switch then case 1;........break
so i want to know how to create an object of type report and bind it to the report viewer in each case ,,i have made something like that but i used crystal reports and crystal report viewer which has a
CrystalReportViewer1.ReportSource = rpt;
CrystalReportViewer1.DataBind();
and i have a report object
rpt.SetDataSource(dt);
ReportDocument rpt;
but i cant do anything like that when i used reporting service
so please help
thanks

You are talking about the Microsoft SQL Server Reporting Services (SSRS), right?
The approach is a bit different than with Crystal - basically, SSRS is by default a server-based reporting engine, e.g. your application (Winforms or ASP.NET or whatever it is) doesn't actually render the report locally, and also it doesn't supply the data locally.
In SSRS, this is typically handled by the report itself and on the server. You typically only simply show the report (possibly configured with some report parameters), but all in all, the Reporting server will grab the data, format it, render the report, and your application really only shows the output in the end.
If you want to render a SSRS report locally, you need to have a *.rdlc file - do you have this, are you familiar with that option?
If you do - once you're into locally rendering the report, of course, you will also have to provide the data locally. If you use the ASP.NET or Winforms ReportViewer control, you can do this something like this:
ReportViewer reportViewer = new ReportViewer();
reportViewer.ProcessingMode = ProcessingMode.Local;
reportViewer.LocalReport.ReportPath = "Report1.rdlc"; // supply path to the RDLC file
reportViewer.LocalReport.DataSources.Add(.........)
reportViewer.RefreshReport();
Basically, you need to tell the ReportViewer control that you're dealing with local rendering, and then you need to give it the path to the RDLC file, and you can add as many data sources to the ReportViewer.LocalReport collection as you need to have for your report.
Does that help at all? Otherwise, please clarify your question a bit more.
See a VB.NET sample of retrieving data for a local report from a web service here.

I tried doing this a while ago. I gave up because it wasn't that important, but my idea was this:
Use web service to create a new datasource
Use the web service to change the data source on the report
Render the report in ReportViewer
Switch DataSource back to original using web service.
My knowledge of ssrs is limited, but might be worth a shot.

Related

SSRS Button in App Embedded Report Sends to a SSRS Server Link

I have successfully embedded an SSRS report into my application and on the report I have a table with some data. I have grouped some columns and indicated in details group properties that it can be collapsible like so:
(If anyone is wondering the expression on the month is just doing this =Left(MonthName(Fields!monthNumber.Value), 3) and works as expected.
Preview result is something like this which in SSRS builder preview behaves as expected.
Now the problem is, when I go on and try to press the button to collapse or show some of the months in my live app, the report I am assuming tries to reload and instead the buttons send me to an SSRS link that is a completely irrelevant page to my webapp and the page looks something like this:
Get help button just sends me to a Microsoft site that is kind of useless.
I AM forced to use a rather old and meh IDE called "Alpha Anywhere" and I am not exactly sure if it is just the IDE quick. I don't think it should be, something credential-wise is probably going weird.
The report itself is configured to use a shared data source from SQL Server that is accessed using security credentials I created specifically for SSRS.
Basically everything is working fine, just the collapse buttons are acting unexpectedly.
Any help would be appreciated!

Angular Single Page application and SSRS reports

We are creating a SPA with AngularJs and want to integrate our existing SSRS reports in this application. We have SSRS reports already consumed by our WPF application using .Net Report Viewer but, we are not sure how we will be able to that in this web application.
One thought we have is that we can create a ASP.Net application which will have a app folder that contains all the templates of our application and for reports we can have normal aspx page and add a report view control on that page.
But, we dont want to use ASP.net just for this purpose.
Does anyone has any idea if we can render SSRS reports in simple HTML page and have basic functionality like save, print which are there in report viewer
Thanks for the help
I know that this is an old question, but just in case somebody else will still came upon it, here can be a possible solution for the problem. The solution described here will allow you to display the report as PDF, having the possibility to print or save it.
Integrating SQL Server Reporting Services (SSRS) with Web-API and AngularJS by Chris Briggs
http://blog.chrisbriggsy.com/the-first-step-towards-integration
http://blog.chrisbriggsy.com/How-to-Integrate-SSRS-and-WebAPI
http://blog.chrisbriggsy.com/AngularJS-SSRS-Pdf-integration
Best,
Razvan

how to use BIDS to show SSRS report from Window form

Hello friends I want to display SSRS report in my local Window form.
IN report viewer i don't want to display it from URL. I want to show reports without deplyoing it.
Can anyone give me idea for that?
You will need to configure your Report Viewer control to use Local Processing. Be aware that this does change the behavior of the control, as it removes the need for a Report Server. See this page for tips on getting started, and some of the pitfalls to watch out for:
http://msdn.microsoft.com/en-us/library/ms251704.aspx
I do it after a longtime.
this way i am calling remote report to local machine and use it on windows form as on web.
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer1.ServerReport.ReportServerUrl = new Uri(textBox1.Text);
reportViewer1.ServerReport.ReportPath = textBox2.Text;
reportViewer1.RefreshReport();

Menu Creation in SSRS

I am created one report service in that 5 different report is there,means report1,report2,report3,report4,report5.So I need to create a menu for these report,means its look like one menu,if I click report1 I need report1 details like that..I am very new in this field so please help me as simple way.
Often SSRS reports are wrapped up within a small app (often created with c# / vb.net) to provide additional security and navigation options. With a simple web page, you will be able create you report menu, style it accoridngly and use Microsoft.Reporting.WebForms to trigger displaying the report

SQL 2005 SSRS Report Manager changes

How can the Report Manager interface be changed to view only from the gray bar right below the four tabs, view, properties, history and subscription?
It can't except va URL access direct to the ReportServer service where you have the options to specify which bars you want displayed.
Report Manager has no options or settings to control layout.
Edit:
Report Manager is another application that gives a GUI to manager reports. It simply uses the Report Server web service in the /ReportServer folder. You can not configure Report Manager layout at all.
URL Access does not use Report Manager: it goes directly to the web service. You can decide which tool bars you want when using URL Access.
If you want to link to a report without showing the top portion of the Report Manager window, you can use the following path.
http://MyServer/ReportServer?/MyFolder/MyReport
You can pass other parameters to set additional options such as show/hide toolbar, zoom, etc. See the following link for more info.
msdn.microsoft.com/en-us/library/ms152835.aspx

Resources