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.
Direct PDF generation, without showing the report view
Thanks for contacting Syncfusion Support.
We have option to export reports using our ReportWriter without rendering report in EJ ReportViewer control as shown in the below example,
HTML,
<form action="/api/ReportApi/ExportAction" method="post"> <input type="hidden" name="exporttype" value="PDF"/> <input type="submit" value="Export"/> |
WebAPI
public HttpResponseMessage ExportAction() { HttpResponseMessage _response = new HttpResponseMessage(); string writerFormat = HttpContext.Current.Request.Form["exporttype"]; string fileName = null; WriterFormat format; HttpContext httpContext = System.Web.HttpContext.Current; ReportWriter reportWriter = new ReportWriter(httpContext.Server.MapPath("~/ReportTemplate/drilldown.rdlc")); reportWriter.ReportProcessingMode = Syncfusion.EJ.ReportWriter.ProcessingMode.Local; ReportDataSourceCollection dataSources = new ReportDataSourceCollection(); dataSources.Add(new ReportDataSource { Name = "Customers", Value = Customers.GetData() }); reportWriter.DataSources = dataSources; fileName = "drilldown.pdf"; format = WriterFormat.PDF; reportWriter.Save(fileName, format, httpContext.Response); _response.StatusCode = System.Net.HttpStatusCode.OK; return _response; } } |
We have prepared a sample based on your request and it can be downloaded from the below location,
http://www.syncfusion.com/downloads/support/forum/120178/WriterDemo-856455847.zip
Regards,
Soundara Rajan S.
Thanks for the update. Please let us know, if you need any further assistance.
Regards,
Soundara Rajan S.
|
i would like to know if I can do the same but passing some datasources from the client side, as in the "Control Creation" example from javascript where you pass the Datasource as a Json array.
|
We have an API to pass the JSON data at client side in our ReportViewer control as shown in the below code example.
JS:
We have prepared the sample using DataSource value from client side and it can be downloaded from the below location,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/Reportsample-1139699116.zip
Pleases refer to the below UG documentation for more detail,
You can obtain the JavaScript ReportViewer samples from the below build installed location,
%userprofile%\AppData\Local\Syncfusion\EssentialStudio\version\JavaScript\reportsamples
Note: ReportWriter is a server side component and we could not initialize the ReportWriter control on client side. | |
|
Can I add an input and get it in the server side? |
We can also pass the DataSource in server side (WebAPI) as shown in the below code example,
WebAPI:
We have prepared a sample using DataSource value from server side and it can be downloaded from the below location,
|
- 5 Replies
- 4 Participants
-
NZ Nebojsa Zecevic
- Sep 8, 2015 09:36 AM UTC
- Jul 4, 2016 08:48 AM UTC