Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Wednesday, March 28, 2012

RSClientPrint.Print method

Does anyone know the ReportService web service API calls that are made by
this method?
RSClientPrint.Print(ReportServerURL, ReportPath, ShortReportNameForPrinter);
RSClientPrint.Print('http://servername/ReportServer',
'%2fReport1%2fSalesOrders', 'SalesOrders');It is using URL access to render a report (
http://msdn2.microsoft.com/en-us/library/ms154493.aspx )
You can see all those requests in IIS log
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"brian" <brian@.discussions.microsoft.com> wrote in message
news:D3AFC98A-CF64-481B-8936-0366DA032CDC@.microsoft.com...
> Does anyone know the ReportService web service API calls that are made by
> this method?
> RSClientPrint.Print(ReportServerURL, ReportPath,
> ShortReportNameForPrinter);
> RSClientPrint.Print('http://servername/ReportServer',
> '%2fReport1%2fSalesOrders', 'SalesOrders');

RSClientPrint.dll

After importing the RSClientPrint.dll type library into Delphi 7.0
Enterprise. A simple test app which calls then RSClientPrint .Print() method
returns these errors;
Error loading resource libraray. (0x80004002)
&
No such interface supported.Guess we have to get all SOAPed up to get this to work.

Tuesday, March 20, 2012

rs.exe - SetReportDataSources error

Hi,
I wanted to ask if anyone else has found a problem with rs.exe when trying to use the SetReportDataSources method.
The line appears as RS.SetReportDataSources(fullpath, dataSources)
The error is BC30456 - 'SetReportDataSorces' is not a member of 'Microsoft.SqlServer.ReportingServices2005.ReportingService2005'.
The aim is to design a single set of reports, that will be deployed to different folders with a different datasource per folder. Each datasource connects to an cube that is set up on a database of client data. There is therefore one database and one cube per client, and all databases and cubes have the same structure. This is being done to allow outside clients to view their own reports without being able to see other clients data.
Anyone else have a similar problem and fixed it, or could offer any hints?
Many thanks - Leo.

In SQL 2005, the name of this method is now called 'SetItemDataSources'. If you want to use the SQL 2000 RS endpoint, you need to run rs.exe with the -e option.

Monday, March 12, 2012

rs.CreateReport() with overwrite set to true fails to update report description

When calling the RS SOAP API's CreateReport method, it doesn't seem like the report description is updated, unless I first delete the report and then recreate it.

Here's what my call looks like -
Warning[] warnings = rs.CreateReport(reportName, "/" + folder, true, buffer, null);

Is this a known issue?

Try

Dim descprop As New [Property]
desc.Name = "Description"
desc.Value = "Now is the time for all good men to come to the aid of their country."

rs.CreateReport(reportName, "/" + folder, true, buffer, desc);

Note, this is Visual Basic, you will need to convert it to your language C#

Ham

|||

Hello Arjun B,

I'm having the same problem as you described in your post.

Were you able to find a solution? If so, what were you able to do?

Thanks!

|||lmttag - try hammer's suggestion. worked for me!|||

Thanks for the reply. I tried the suggestion. However, it still didn't work.

Here's the situation... We have a report that has been deployed to production a few weeks ago. Since then the report has changed slightly; two parameters have changed--one parameter went from not being marked internal to being marked internal and the other parameter's default value changed (just a simple string change).

Now we want to programmatically deploy the updated report to production and overwrite the existing report. However, when we try this, the parameters, as shown through Report Manger, have not changed. They're the same as the original deployment. And, there is no error/exception thrown that might be causing the problem.

Here's the code snippet:

System.Byte[] definition = null;
ReportingService2005.Warning[] warnings = null;
ReportingService2005.Property property = new ReportingService2005.Property();
property.Name = "Description";
property.Value = "Updated Report Description";
ReportingService2005.Property[] properties = new ReportingService2005.Property[1];
properties[0] = property;

string name = (string)dr["Name"]; // Variable that holds the name
string file = (string)dr["FullName"]; // Variable that holds the file

System.IO.FileStream stream = System.IO.File.OpenRead(file);
definition = new System.Byte[stream.Length];
stream.Read(definition, 0, (int)stream.Length);
stream.Close();

//warnings = rs.CreateReport(name, parent, true, definition, null);
warnings = rs.CreateReport(name, parent, true, definition, properties);

Any help is greatly appreciated. Thanks!

|||

Sorry for so many post, but does it have to be the Description property? We have descriptions built into the reports, and, if we change the description property in code to get the CreateReport() method to work, then we'll lose the correct description for the report. And, we would rather not hard-code descriptions in our application that is trying to overwrite the report.

Thanks again.

rs.CreateReport() with overwrite set to true fails to update report description

When calling the RS SOAP API's CreateReport method, it doesn't seem like the report description is updated, unless I first delete the report and then recreate it.

Here's what my call looks like -
Warning[] warnings = rs.CreateReport(reportName, "/" + folder, true, buffer, null);

Is this a known issue?

Try

Dim descprop As New [Property]
desc.Name = "Description"
desc.Value = "Now is the time for all good men to come to the aid of their country."

rs.CreateReport(reportName, "/" + folder, true, buffer, desc);

Note, this is Visual Basic, you will need to convert it to your language C#

Ham

|||

Hello Arjun B,

I'm having the same problem as you described in your post.

Were you able to find a solution? If so, what were you able to do?

Thanks!

|||lmttag - try hammer's suggestion. worked for me!|||

Thanks for the reply. I tried the suggestion. However, it still didn't work.

Here's the situation... We have a report that has been deployed to production a few weeks ago. Since then the report has changed slightly; two parameters have changed--one parameter went from not being marked internal to being marked internal and the other parameter's default value changed (just a simple string change).

Now we want to programmatically deploy the updated report to production and overwrite the existing report. However, when we try this, the parameters, as shown through Report Manger, have not changed. They're the same as the original deployment. And, there is no error/exception thrown that might be causing the problem.

Here's the code snippet:

System.Byte[] definition = null;
ReportingService2005.Warning[] warnings = null;
ReportingService2005.Property property = new ReportingService2005.Property();
property.Name = "Description";
property.Value = "Updated Report Description";
ReportingService2005.Property[] properties = new ReportingService2005.Property[1];
properties[0] = property;

string name = (string)dr["Name"]; // Variable that holds the name
string file = (string)dr["FullName"]; // Variable that holds the file

System.IO.FileStream stream = System.IO.File.OpenRead(file);
definition = new System.Byte[stream.Length];
stream.Read(definition, 0, (int)stream.Length);
stream.Close();

//warnings = rs.CreateReport(name, parent, true, definition, null);
warnings = rs.CreateReport(name, parent, true, definition, properties);

Any help is greatly appreciated. Thanks!

|||

Sorry for so many post, but does it have to be the Description property? We have descriptions built into the reports, and, if we change the description property in code to get the CreateReport() method to work, then we'll lose the correct description for the report. And, we would rather not hard-code descriptions in our application that is trying to overwrite the report.

Thanks again.

RS Web Service to programmatically render reports

Hello, when I call the render method of a ReportService() object with the
following...
data = rs.Render("/OnlineInvoice", "PDF", Nothing, Nothing, paramaters,
Nothing, Nothing, encoding, mimeType, parametersUsed, warnings, streamIds)
with the argument paramaters being...
Dim paramaters(2) As ParameterValue
paramaters(0) = New ParameterValue
paramaters(0).Name = "P_ClientID"
paramaters(0).Value = 815
paramaters(1) = New ParameterValue
paramaters(1).Name = "P_InvoiceID"
paramaters(1).Value = 22230
I get the error...
System.Web.Services.Protocols.SoapException: The value of parameter
'Parameters' is not valid. Check the documentation for information about
valid values. --> The value of parameter 'Parameters' is not valid.
Any Ideas? thank you for the help!
--See if you need to use 1 instead of 2 in array declaration:
Dim paramaters(1) As ParameterValue
--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
---
"Richard Cranium" <mgreco40@.hotmail.com> wrote in message
news:edWp1rjoEHA.1712@.tk2msftngp13.phx.gbl...
> Hello, when I call the render method of a ReportService() object with the
> following...
> data = rs.Render("/OnlineInvoice", "PDF", Nothing, Nothing, paramaters,
> Nothing, Nothing, encoding, mimeType, parametersUsed, warnings, streamIds)
> with the argument paramaters being...
> Dim paramaters(2) As ParameterValue
> paramaters(0) = New ParameterValue
> paramaters(0).Name = "P_ClientID"
> paramaters(0).Value = 815
> paramaters(1) = New ParameterValue
> paramaters(1).Name = "P_InvoiceID"
> paramaters(1).Value = 22230
> I get the error...
> System.Web.Services.Protocols.SoapException: The value of parameter
> 'Parameters' is not valid. Check the documentation for information about
> valid values. --> The value of parameter 'Parameters' is not valid.
> Any Ideas? thank you for the help!
>
>
> --
>
>

RS Web Service

Hi,
I am getting the following error when tries to call any web method of ReportExecution2005 Web Service from a 2003 Web application.

"Server did not recognize the value of HTTP Header SOAPAction: http://schemas.microsoft.com/sqlserver/2005/01/12/reporting/reportingservices/LoadReport."

Please someone suggest me how to fix this issue.

Thanks
AnobeJust wondering if you have tried with VS 2005? It shouldn't matter but it would tell us if it was specific to the generated proxy.|||Hi,
It was working with VS 2005. It was giving problem with VS 2003 only, is there any additional settings to be done?
And this is happening only to ReportExecution2005 Webservice, it not happeing to Reportservice webservice, which is also hosted on the same 2005 reporting service.

Regards,
Anobe|||Did you try rebuiding your proxy against the ReportExecution2005 webservice endpoint. I believe this error has occurrs if you generated a proxy built on a pre-RTM version of the server and tried to use it against an RTM server.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi,
I have not yet installed the RTM server, still working on the pre-RTM server. Both proxy and service are on pre-RTM server.

Anobe|||Can you try with RTM? I don't have any CTP builds running to check it out.|||HI,
I don't have a RTM version. Is there no way that i can call a web method of 2005 Web Service from 2003 Web Application?

Thanks
Anobe|||Let's back track -
First what is your environment:
Your web application - is it using .Net Framework 1.1?
Did you use Visual Studio .Net 2003 to build your web application?
Are you running your web application and report server on the same computer?
If yes, are you running your web application and report server on the same website?
If yes, are the report server and web application virutal directories configured to use teh same application pool (Windows 2003 only)?
Second, how did you generate your proxy:
Did you add a web reference in Visual Studio to your project? If so, did you do this on the same build of SQL Server as you are now encountering problems?
What URL did you supply to the proxy when building your web application?
Third, when invoking the proxy in code:
What URL do you supply to the ReportExecutionService .URL property?
What credentials do you supply to the ReportExecutionService .Credentials property?
Thanks,
-Lukasz

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Web Application: Its build on VS 2003.
Report Server: Its RS 2005, which is deployed on a different machine on the same network.

I am adding a Web reference to the ReportExecution2005 web service in my Web Application.

I am passing the credentials as 'System.Net.CredentialCache.DefaultCredentials'.

Suppose 'http://localhost/reportserver/testreport/test1' is the path i use to call my report through IE, then the URL that i am passing for the .Url property is '/testreport/test1'

But How all the above settings relates to in getting a problem like 'Server is not able to recoganize the HTTP SOAP header'

|||The URL property is either set in code or if not, the value used when generating the proxy is used. The value can be found either directly in your code (usually where you instantiate your ReportExecutionService class). Alternatively you can find out the static one by right clicking the proxy under web references in solution explorer.
Can you verify that the Url property of the proxy is in the form:
http://myserver/reportserver/ReportExecution2005.asmx

And that the value for 'myserver' is correct for your production server?
-Lukasz

This posting is provided "AS IS" with no warranties, and confers no rights.