display reporting services report into asp.net web form - reporting-services

Hello everyone here you see my report in when i run it into my web service URL
but when i run it in an asp.net web form, it display like the second one why please
Here is a sample of my code:
MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
MyReportViewer.ServerReport.ReportServerUrl = New Uri("jean-daniel/ReportServer_SQLEXPRESSADDD") ' Report Server URL
MyReportViewer.ServerReport.ReportPath = "/Report Project2/Auction" ' Report Name
MyReportViewer.ShowParameterPrompts = True MyReportViewer.ShowPrintButton = True
MyReportViewer.ShowToolBar = False MyReportViewer.ServerReport.Refresh()

The charts are images and set to store one per session in cache. So if user a and user b access the same chart then it will come back as chart a. - a caching issue. I found a workaround noted below:
Workaround

Related

SSRS: Next and Previous page buttons don't work

I have a vs2012 web project using NET 3.5 and the SSRS reportviewer control (v11) running on MSSQL 2008. When the report displays the next page button doesn't work. It appears to respond to the click (ie the button is enabled and the page load event in the code behind is called) but it doesn't display a new page. When I access the report directly thru the SSRS reportserver URL, I get the same page but it works without any problems. Also, when I export the report to a PDF using the built in export option on the same screen, the correct, entire report is there. I believe viewstate is enabled...no mvc. Here is the relevant code:
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri(WebConfigurationManager.AppSettings["SSRSUrl"]);
param[0] = new ReportParameter("SubTitle", subTitle);
param[1] = new ReportParameter("Query", query);
param[2] = new ReportParameter("Parameters", reportParameterString);
param[3] = new ReportParameter("Title2", title2);
ReportViewer1.ShowParameterPrompts = false;
if (!IsPostBack) ReportViewer1.ServerReport.SetParameters(param);
ReportViewer1.ServerReport.Refresh();

Telerik Reporting - Passing object to UriReportSource Html5 reporting

I'm wondering how to passing the object data source into html5 report viewer.
I have view like this:
#{
var theData = new UriReportSource();
theData.Uri = "TestingReport.trdx";
//this is should passing the data right?
theData.Parameters.Add("passing", Model.pasing);
theData.Parameters.Add("anotherPassing", Model.another);
}
#(
Html.TelerikReporting().ReportViewer()
.TemplateUrl("../ReportViewer/templates/telerikReportViewerTemplate.html").Id("ReportId")
.ReportSource(theData)
.ViewMode(ViewModes.PRINT_PREVIEW)
.ScaleMode(ScaleModes.SPECIFIC)
.Scale(1.0)
.ServiceUrl("/api/reports/")
)
I already wired up the .trdx report into object data source.
And this documentation is not helping, it's use TypeDataSource.
.ServiceUrl() is what your looking for.
Url.Content("/api/reports/") is what Telerik has in their examples as the argument to ServiceUrl. It assumes the api is implemented in the same application as the client (viewer).
To go across domains the server has to apply CORS to the API
e.g.
.ServiceUrl(Url.Content("(prefix + server):9176/api/reports/"))` (a different web api application on localhost) is the call to make on the client.

HOw to remove SSRS section to ask credentials

How to remove this prompt when viewing SSRS report in ASP.net
Can we pass these as two parameters?
The answer would depend on what kind of data provider you have.
Assuming this is an MS SQL data provider:
Go to the SSRS Report Manager, find your data source and open its properties.
Then, depending on the authentification method set up in your SQL server and the database, set the appropriate parameters:
"(o) Credentials stored securely in the report server" - if your server/database require the authorization and you want to provide the user name and password
"[x] Use as Windows credentials when connecting to the data source" - check this checkbox if your server/database configured for windows authentification, otherwise leave it unchecked.
"( ) Windows integrated security" - select this option if you'd like to use the current windows credentials of the report user
"( ) Credentials are not required" - in case if your data provider and data source don't require the authorization (which is unlikely though)
Hope it helps.
Best regards,
Alexey
www.kudinov.ru
You could also programmatically set the credentials of the data sources using the ReportViewer.ServerReport.SetDatasourceCredentials method. e.g.
// Set credentials
DataSourceCredentials cred = new DataSourceCredentials();
ReportDataSourceInfoCollection dataSource = this.ReportViewer.ServerReport.GetDataSources();
cred.Name = dataSource.First().Name;
cred.UserId = "userid";
cred.Password = "password";
this.ReportViewer.ServerReport.SetDataSourceCredentials(new DataSourceCredentials[] { cred });
this.ReportViewer.ServerReport.Refresh();
// Hide credential prompt
ReportViewer.ShowCredentialPrompts = false;

How do I access the reporting services 2005 web service if it has an instance name

I am trying to access a reporting services 2005 web service but I am unable to figure out how to do it. I have reporting services 2005 running on a server and it uses the instance name SQL2005.
The URL to access the reports manager is http://myserver/Reports$SQL2005/Pages/Folder.aspx. I tried going to http://myserver/Reports$SQL2005/ReportService2005.asmx and it didn't work. I tried various other combinations that didn't work.
I am able to access a reporting services web service for a 2008 web service on another server using the URL http://otherserver/ReportServer/ReportService2008.asmx. I am saying this to show that I am not completely stupid and unable to find a web service.
I believe that the instance name is somehow responsible for not being able to get the right URL for the web service.
Can anyone please tell me what URL I should be using to access the reporting services 2005 web service?
This is a pretty old question, but to help others I believe the correct URL for the web service on a SQL 2005 named instance is:
http://yourserver/ReportServer$instancename/ReportService2005.asmx
To browse the report manager, like you say it is:
http://yourserver/Reports$instancename
One thing I'm not sure about in your question is your link for a 2008 web service. I believe under SQL 2008 it still uses a web service called ReportService2005.asmx.
It should be along the lines of this
http://servername/reportserver/ReportService2005.asmx
I know that this has worked for me in the past so double check the instance name and server path
To get to the server:
https://myserver/ReportServer/ReportService2005.asmx
which the report would be something like:
https://myserver/ReportServer/ReportService2005.asmx/folder/myreport
Also note that you'll want to make this a Web Rerference and not a Service Reference.
to ge all of the subscriptions for a report:
VB:
Dim rs As New reports.ReportingService2005()
rs.Credentials = New NetworkCredential(_userName, _passWord)
Dim subscriptions() As reports.Subscription = rs.ListSubscriptions(_reportName, "<DOMAIN>\" & _userName)
C#:
NetworkCredential credentials = new NetworkCredential(_userName, _passWord);
reports.ReportingService2005 rs = new reports.ReportingService2005();
rs.Credentials = credentials;
List<reports.Subscription> subscriptions = new List<reports.Subscription>();
foreach (reports.Subscription x in rs.ListSubscriptions("<report name>", "<domain>\<username>"))
subscriptions.Add(x);
http://[server name]/[report instance name]/ReportService2005.asmx?wsdl
this must work, that give lot of report server method

Passing parameters to service by URL - How do I discover the parameter names?

I have a report to which I have execute-only access - I don't have the access to the RDL file. This report exposes several parameters which I would like to set from URL.
I've successfully changed some parameters using the standard param=data form (as explained here: http://msdn.microsoft.com/en-us/library/ms153586.aspx). However, some parameters don't have the same parameter-prompt and parameter-name.
Unfortunately, to pass parameter values by URL I must know the name of the parameter and I don't see how I can deduct from the report and its parameters prompt text. I've tried to inspect the source and post-data but to no avail.
Anyone has an idea?
Thanks
P.S I also stumbled on this: http://odetocode.com/Articles/123.aspx. However, I wasn't able to connect to the web-services of my report server.
Ugh. I'm replying to myself, hopefully someone can learn from it:
I did it, eventually, using Reporting Services web service as described here and here. A point to remember here is that the name of the service has been changed (I believe from SQL server 2005 and onward) endpoint is ReportService2005.asmx.
After adding the web reference I was still having various problems. To summarize, this is the code that eventually worked for me (note: I am in domain and the IIS I'm connecting to requires domain windows auth).
ReportParameter[] parameters;
const string historyId = null;
const bool forRendering = true;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = new DataSourceCredentials[] {};
ReportingService2005SoapClient c = new ReportingService2005SoapClient();
c.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("USERNAME", "PASSWORD", "DOMAIN");
c.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation;
c.GetReportParameters
(
"/CycleStatus/Builds Score",
historyId,
forRendering,
values,
credentials,
out parameters
);
However, I was plagued by the following error:
"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'"
To handle that you need to change, in your app.config the security node, like so:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
After that everything worked fine.