all groups > sql server reporting services > july 2006 >
You're in the

sql server reporting services

group:

WhichClassToUse.Render ??


WhichClassToUse.Render ?? GaryDean
7/2/2006 5:12:36 PM
sql server reporting services:
I am trying to use the render method to render to a byte array in an ASP.Net
application and I am having a problem in that there is a lot of conflicting
information in the books and the docs on how to do this. The latest docs I
read led to the following code...

ReportingService2005 _rs = new ReportingService2005();

//have to use custom credentials because ASPNET does not have
sufficient authority...
NetworkCredential myCred = new NetworkCredential("myuserid",
"mypassword", "mydomain");
CredentialCache myCash = new CredentialCache();
myCash.Add(new Uri("http://localhost/myWebSiteName"), "NTLM",
myCred);
_rs.Credentials = myCash;
_rs.Url =
"http://localhost/ReportServer/ReportService2005.asmx";

//we just have one parameter...
ParameterValue[] Parameters = new ParameterValue[1];
Parameters[0].Name = "myReportID";
Parameters[0].Value = argmyReportID;

//Render the report to a byte array...
byte[] data;
data = _rs. oops there is no Render method!!

The first docs I read (WROX BOOK on SSRS2005) said to use the
ReportingService class but there is no such class. I then found docs saying
to use ReportingService2005 class as I did above. But that class has no
Render method. Today I found other docs that say to use
ReportExecutionService class.

Why are there so many conflicting docs. What class am I supposed to use to
do a render?

Thanks,
Gary

RE: WhichClassToUse.Render ?? weilu NO[at]SPAM online.microsoft.com
7/3/2006 6:57:54 AM
Hi Gary,

Thank you for using MSDN Managed Newsgroup Support.

The render mothed is under the ReportExecutionService class.

The Reporting Services Execution web service allows developers to
programmatically process and render reports from a Report Server.

ReportingService2005 class contains the methods and properties that can be
used to call the Microsoft SQL Server 2005 Reporting Services (SSRS) Web
service.

Here is an article which includes a sample for the render method.

ReportExecutionService.Render Method
http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswe
bservice.rsexecutionservice2005.reportexecutionservice.render(d=ide).aspx

I suggest you use the SQL Server Books Online and MSDN search to search the
Reporting Services development related document. Most of the information
you want will be included in the Books online. It provide several samples
and articles for you to understand the Reporting Services.

You could access the Books online from:

http://msdn2.microsoft.com/en-us/library/ms130214.aspx

Also, you could refer the following article about the Reporting Services
Web Service:

Reporting Services Web Services Class Library
http://msdn2.microsoft.com/en-us/library/ms202964(d=ide).aspx

Hope this information will be helpful for your reporting services
programming. Thank you!

Sincerely,

Wei Lu
Microsoft Online Community 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

RE: WhichClassToUse.Render ?? weilu NO[at]SPAM online.microsoft.com
7/6/2006 12:00:00 AM
Hi Gary,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community 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.
Re: WhichClassToUse.Render ?? GaryDean
7/11/2006 11:48:27 AM
Wei.
Your help and that of others in the MOCS has been very valuable. I don't
always reply after getting a solution, or at least a guide to one, from you
but you are helping me wade through this very complex reporting solution.

I am very curious about why all of the old docs and books show the Render
Method as being a method of the ReportingServices or ReportingServices2005
class when now it is a method of the ReportExecutionService Class. On the
other MSDN SSRS forum (why have two?) I have talked with other developers
who say they still have a Render in the ReportingServices2005 class and it
still works. Is the service morphing? are they using an older service
somehow?

Also, I don't understand the architecture where ASPNET cannot be allowed to
access RS methods in an ASP.Net applications. The reason given that it is a
security issue but that doesn't make sense because ASPNET can access the
underlying SQL Server database that has all of the base information anyway.

Regards,
Gary Blakely

[quoted text, click to view]

AddThis Social Bookmark Button