Ask a questionAsk a question
 

AnswerReportService2006 webservice

  • Monday, November 02, 2009 6:23 PMkrkolli Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I need to create an SSRS report as PDF file and add it to a path in sharepoint library.

    I tried CreateResouce() - My confusion is while reading the byte[] definition.

    In the examples, that are mentioned in the forums are reading from a file.

    Which file do we need to read, in order to get the byte[] info?

    Clearly I cant read the x.rdl. cause its an URI path.

    Let me know, what i am doing wrong.

    Thanks
    keerthi Kolli

Answers

  • Wednesday, November 04, 2009 1:45 AMJin ChenMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi krkolli,


    The ReportService2006 Web service enables developers to programmatically manage objects on a report server that is configured for SharePoint integrated mode.
    If we have configured SQL Server Reporting Services for SharePoint integrated mode, please use ReportService2005.


    To add a attachment to a library, we can use the Lists.AddAttachment Method in the lists web services of SharePoint.

    For more information, please see:
    Lists.AddAttachment Method (Lists): http://msdn.microsoft.com/en-us/library/lists.lists.addattachment.aspx

    Please feel free to ask, if you have any more questions.

    Thanks,
    Jin Chen

    Jin Chen - MSFT

All Replies

  • Monday, November 02, 2009 6:52 PMJames Wu - MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I think what you wanted to do is to render a .rdl file into PDF, and save it to a document library. To do this programmatically you first need to render .rdl into pdf format. Here is an example: http://technet.microsoft.com/en-us/library/reportexecution2005.reportexecutionservice.render.aspx. In sharepoint mode, your report path should be http://.../.../report.rdl. Your rs.Url should be http://<server>/_vti_bin/ReportServer/ReportExecution2005.asmx. After you render the report, you will have the byte[] representation of the PDF report. You can save it to document library using sharepoint API.

    An alternative is to create a subscription that delivers to sharepoint document library in PDF format.

  • Monday, November 02, 2009 7:00 PMkrkolli Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I tried render as well. I got the byte[] representation. But, in the example - from the above link, this byte representation is getting saved locally.

    "You can save it to document library using sharepoint API."

    Oh you mean by adding the sharepoint Dll

    I was looking around for it in the reportexcetionservice webservice itself.

    will give it a try.

    Thanks for the help.

  • Monday, November 02, 2009 8:18 PMkrkolli Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Looks like, I can not use the object model approach, unless I have the sharepoint server installed on my machine.

    I will try using the sharepoint webservices.

    Thanks
  • Wednesday, November 04, 2009 1:45 AMJin ChenMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi krkolli,


    The ReportService2006 Web service enables developers to programmatically manage objects on a report server that is configured for SharePoint integrated mode.
    If we have configured SQL Server Reporting Services for SharePoint integrated mode, please use ReportService2005.


    To add a attachment to a library, we can use the Lists.AddAttachment Method in the lists web services of SharePoint.

    For more information, please see:
    Lists.AddAttachment Method (Lists): http://msdn.microsoft.com/en-us/library/lists.lists.addattachment.aspx

    Please feel free to ask, if you have any more questions.

    Thanks,
    Jin Chen

    Jin Chen - MSFT