Query |
Response | |
Manually Draw/Create a Report with a designer. |
Please find the report designer sample to create a report.
Please refer the below UG documentation for more details,
You can obtain the WPF report designer samples from the below build installed location,
%userprofile%\AppData\Local\Syncfusion\EssentialStudio\version\WPF\Reports.WPF\Samples\ReportDesigner.WPF | |
Webservice creates report in memory, converts it to PDF and returns the PDF. I don't need a reportviewer ! I only want to create reports in memory. |
We can achieve your requirement by using ReportWriter control to export the report into PDF, Excel, Word, PPT and HTML directly without displaying in WebAPI controller and return the result as per your request as shown in below code example.
We have prepared a ReportWriter sample and it can have downloaded from,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ReportWriterSample353004927.zip
Please refer to the below UG documentation for more detail,
You can obtain the ASP.Net ReportWriter samples from the below build installed location,
%userprofile%\AppData\Local\Syncfusion\EssentialStudio\version\Web\Samples\Web
| |
Is this possible and what version do I need to install ? |
You can install our latest ASP.Net build to export the report using ReportWriter, it can be downloaded from below location.
|
Hi Vinoth,
thx for your extensive answer. Looks very promising.
So if I'm right, I need to use the WPF-Reportdesigner to create a report and save this as a
rdl-file.
Then I can use this RDL-File in my webservice to create a PDF with the ReportWriter-Class ?
Is this summary correct ?
Hi Vinoth,
I managed to create an RDL Report, convert it to PDF and send the PDF with email to an emailadress in asp.net:)
But 2 things I could not figure out. In WPF I managed to do it, but not in ASP.NET
(See picture in attachement for more info)
1) How do I set reportparameters ? The method reportWriter.SetParameters(.....) takes a List of 'Syncfusion.Reports.EJ.Reportparameter'
I cannot find this class. Do I miss Something ?
2) How do I change the connectstring for the database programmatically ?
1) How do I set reportparameters ? The method reportWriter.SetParameters(.....) takes a List of 'Syncfusion.Reports.EJ.Reportparameter'
I cannot find this class. Do I miss Something ? |
We suspect the mentioned problem occurs when the “Syncfusion.EJ.ReportViewer” assembly is not referred properly in your application. If the mentioned issue is again reproduced after referring the Syncfusion assemblies, then it might occur when the Syncfusion namespace references is not added in web.config file in your application. So we request you to specify the “Syncfusion.JavaScript.Web” namespaces in web.config as shown in shared screenshot in your application to rectify the mentioned issue at your end.
| |
2) How do I change the connectstring for the database programmatically ?
|
We have an option to change the connection string of the report using SetDataSourceCredentials method in ReportWriter as shown in below code example,
We have prepared a sample and it can be downloaded from below location,
|
thx Vinoth for the samples. Everythings works like a charm now. Very good software :) !
I have one quesytion, but is not urgent.
What is the difference between properties ReportParameters.Labels and
ReportParameters.Values ?
Report Parameter Label |
Report Parameter Value |
Labels will be displayed in the parameter instead of parameter values. You can display meaningful user-friendly labels in the parameter instead of actual value.
For example: If you want to show the user "ProductName" but use "ProductID" as the value of the parameter.
|
Value doesn’t display in the Parameter, it can be used within the report or expression.
For example: if you have to specify a "value field" for parameter, in case you want the user to be prompted with something meaningful to them then use labels. |