We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

WCF Service to Save PDF, Word, Excel, HTML

Thread ID:





113710 Oct 4,2013 11:52 AM Oct 9,2013 04:31 AM Silverlight 7
Tags: ReportViewer
Darren Hunnter
Asked On October 4, 2013 11:52 AM

I have been trying to use the online documentation to save a generated report as a PDF, I know you show a basic WCF service tutorial in C# I have tried to convert it to VB.Net and Keep getting errors.

Any other samples I can look at.

Ragavan G [Syncfusion]
Replied On October 7, 2013 12:44 AM

Hi Darren Hunnter ,

Thanks for your interest in syncfusion products .

We have created sample working application for your requirement . Please find the sample from following location .

Sample :

Please let me know if you have any questions .

Thanks ,
Ragavan G

Darren Hunnter
Replied On October 7, 2013 08:39 AM

I have a bit of an odd problem if I set the report viewer to local the data in the report from the domain service is render, if I change it to remote the data is not show on the report.

The report still renders the report but no data is added to the report.

Here is the code I am using.

Private Sub DisplayReort(e As InvokeOperation(Of Byte()))
        Dim rdlstream1 As Stream = New MemoryStream(e.Value)
        Dim r As New ReportDataSource
        Dim serviceUrl As String = ""
        Dim hostName As String = Application.Current.Host.Source.Host
        If Application.Current.Host.Source.Port <> 80 Then
            hostName += ":" + Application.Current.Host.Source.Port.ToString
        End If
        serviceUrl = (Convert.ToString("http://") & hostName) + "/ReportingService.svc"
        r.Name = "SalesPerson"
        r.Value = staff
        'ReportViewer1.ProcessingMode = ProcessingMode.Local
        ReportViewer1.ProcessingMode = ProcessingMode.Remote
        ReportViewer1.ReportServiceURL = serviceUrl
            'ReportViewer1.DataSources.Add(New ReportDataSource With {.Name = "SalesPerson", .Value = staff})
        Catch ex As Exception
        End Try
    End Sub

Darren Hunnter
Replied On October 7, 2013 09:04 AM

Forgot to day I am using a domain service.

Darren Hunnter
Replied On October 7, 2013 10:17 AM

After Fiddling with the web config I still can't get it to render the data on report if I switch it from Local to Remote, I have attached the test project I am playing with can you please take a look to see why it will not render the report if I am using a domain server.

If I add sections from the example web config to the web config of this project it kills it.

As I said it not rendering data on the report, It renders the report but lack of data...



Anandakumar S [Syncfusion]
Replied On October 8, 2013 01:27 AM

Hi Darren,

Thanks for your update.

We have analyzed your query with the provided sample. We have to inform you that for RDLC reports we must specify DataSource manually and Processing mode can be set to Local or left without specifying. In the mean time if we set Processing mode to Remote it automatically takes DataSet from DataBases  using the connection details provided in the DataSource ( RDL and SSRS reports ).

Please let us know if you have any questions.


Anandakumar S

Darren Hunnter
Replied On October 8, 2013 04:25 AM

Ok if that the case for RDLC even if I say

ReportViewer1.DataSources.Add(New ReportDataSource With {.Name = "SalesPerson", .Value = staff})
Why is it that the data still not been shown, I have removed any processing reference from the XAML and commented out thefollowing
'ReportViewer1.ProcessingMode = ProcessingMode.Local
'ReportViewer1.ProcessingMode = ProcessingMode.Remote
The report still shows no data.
But if I set ReportViewer1.ProcessingMode = ProcessingMode.Local
, then I am unable to export the report to PDF ect as the browsers crashes saying with a data serialisation error.

Can RDLC files using Local Data sources be exported as PDF ect.....
Or is it only reports RDL and SSRS reports that can be exported as there processing mode is set to remote!

Ragavan G [Syncfusion]
Replied On October 9, 2013 04:31 AM

Hi Darren,

Thanks for your update . 

Please follow up this incident #113991 for further updates

Thanks ,

Ragavan G


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.