Starting in 2019, the Reporting control is no longer included in Essential Studio®. If you're experiencing issues with the Syncfusion� Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion� and appreciate your understanding.

Minimum deployment for rendering an stored report to PDF (with no viewer/editor)

I would like to know which are the requirements to do this:
1) I create a report (an invoice template) locally and upload to the server to a known location.
2) When required by the user (calling an API action) I have to get the report, combine it with some data and render it to PDF on the server.
3) Then send the PDF to the client browser as a download (but not to the report viewer/editor, just the PDF file)
Steps 1 and 3 are clear to me, but I really lost on the libraries I have to install and imports I must do on the API controller to render the report, that is step 2.
It's also unclear for me how can I pass the data to the report as simple object, and not coming from a DataSource, since this data is built at runtime and isn't stored anywhere.
Could anybody with a similar scenario offer some guidance or advice?
Thanks in advance

3 Replies

YD Yuvaraj Devarajan Syncfusion Team October 16, 2017 11:47 AM UTC

Hi Vicent, 

Thanks for contacting Syncfusion support. 

1) I create a report (an invoice template) locally and upload to the server to a known location. 
2) When required by the user (calling an API action) I have to get the report, combine it with some data and render it to PDF on the server. 
3) Then send the PDF to the client browser as a download (but not to the report viewer/editor, just the PDF file) 
Steps 1 and 3 are clear to me, but I really lost on the libraries I have to install and imports I must do on the API controller to render the report, that is step 2. 

We can achieve your requirement by using ReportWriter control to export the report into PDF, Excel, Word, PPT and HTML directly without displaying in viewer. To load ReportWriter control, we have to refer the below shared dependent assemblies. We can get the below dependent assemblies by installing our latest Essential studio build for ASP.NET MVC and ASP.NET Web platform which is available for download under the following link. 
    
For Nuget packages, please refer to the below UG documentation for Nuget package update. 

please find the list of Syncfusion dependent assemblies,   
  • Syncfusion.Linq.Base
  • Syncfusion.Compression.Base
  • Syncfusion.Presentation.Base
  • Syncfusion.OfficeChart.Base
  • Syncfusion.EJ
  • Syncfusion.EJ.MVC
  • Syncfusion.EJ.ReportViewer
  • Syncfusion.Pdf.Base
  • Syncfusion.XlsIO.Base
  • Syncfusion.DocIO.Base
  • Syncfusion.Shared.Wpf
  • Syncfusion.Chart.Wpf
  • Syncfusion.Gauge.Wpf
  • Syncfusion.SfMaps.Wpf

Please find the below UG documents for more detail, 

You can obtain the complete ASP.NET MVC ReportWriter sample in below build installed location, 
%userprofile%\AppData\Local\Syncfusion\EssentialStudio\version\ MVC\Samples\web 

It's also unclear for me how can I pass the data to the report as simple object, and not coming from a DataSource, since this data is built at runtime and isn't stored anywhere. 
We can add/pass the datasource value for the Report in ReportWriter by using DataSources property as shown in below code example, 

       public ActionResult Index(string writerFormat) 
        { 
            try 
            { 
                string fileName = null; 
                WriterFormat format; 
                HttpContext httpContext = System.Web.HttpContext.Current; 
                ReportWriter reportWriter = new ReportWriter(); 
                reportWriter.ReportPath = Server.MapPath("~/App_Data/GroupingAggregate.rdlc"); 
                reportWriter.ReportProcessingMode = ProcessingMode.Local; 
                ReportDataSourceCollection dataSources = new ReportDataSourceCollection(); 
                dataSources.Add(new ReportDataSource { Name = "Sales", Value = SalesDetails.GetData() }); 
                reportWriter.DataSources = dataSources; 
 
                fileName = "GroupingAgg.pdf"; 
                format = WriterFormat.PDF; 
 
                reportWriter.Save(fileName, format, httpContext.Response); 
            } 
            catch 
            { 
            } 
            return View(); 
        } 

We have prepared a sample in ASP.NET MVC platform and it can be downloaded from below location, 

Please find the below UG documents for more detail, 


Regards, 
Yuvaraj D. 



PR Padmini Ramamurthy Syncfusion Team October 23, 2017 04:55 AM UTC

From: Vicent Ortega 
Sent: Saturday, October 21, 2017 1:23 PM
To: Syncfusion Support <[email protected]>
Subject: RE: Syncfusion support community forum 133226, Minimum deployment for rendering an stored report to PDF (with no viewer/editor), has been updated. 

Hello, 
 
    First of all, thanks for answering. 
Second, I would swear that I posted this question on the ASP.NET Core forum… Didn’t I? 
In any case, my scenario in on MVC Core 2? Can I render the report in a Core 2.0 controller? 
 
Best regards, 
 
            Vicent Ortega 



YD Yuvaraj Devarajan Syncfusion Team October 23, 2017 10:25 AM UTC

Hi Vicent, 

Currently, we don’t have ASP.NET Core support for ReportViewer control. We have already logged feature report for “Support for ReportViewer on DNX library support for Cross Platforms”. It is planned for the completion in month of October and we will provide patch for ASP.NET Core support in ReportViewer at end of October 2017.  

Regards, 
Yuvaraj D. 


Loader.
Up arrow icon