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. Image for the cookie policy date
close icon
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.

set value Parameters via Code

Good morning.

I have a report with 10 parameters.
@Committente
@DataParty
etc...

how can insert value these parameters from c # code?
Example:

MyReport.Parameters["Committente"] = PartyDaStampare.Committente;

Grazie

7 Replies

VS Vinoth Srinivasan Syncfusion Team August 6, 2019 10:14 AM UTC

Hi Stefano, 

You can refer the below KB documentation for passing values to parameter from code behind. 


Regards, 
Vinoth S.  



ST Stefano August 6, 2019 11:02 AM UTC

this Example Adds a parameter.
I want to enhance an existing parameter.


ST Stefano August 6, 2019 11:29 AM UTC

I have to print a "ticket" which in the application is an Entity no collection (1 no multi). the data is in an object:

Ticket:
Date
Commissioned
Description
 
No Collection


ST Stefano August 6, 2019 11:52 AM UTC

in the example "Invoice Demo" the parameter value is inserted in the report. how can i pass it by code?




VS Vinoth Srinivasan Syncfusion Team August 7, 2019 07:31 AM UTC

Hi Stefano, 
 
Queries 
Response 
this Example Adds a parameter. 
I want to enhance an existing parameter.
 
 
in the example "Invoice Demo" the parameter value is inserted in the report. how can i pass it by code? 
The KB which is provided in last update for this requirement only to change the default value report before rendering the report with Report Viewer. Can you provide more details about the usage our product with your application? 
I have to print a "ticket" which in the application is an Entity no collection (1 no multi). the data is in an object:

Ticket:
Date
Commissioned
Description
 
No Collection
 
If your requirement is to pass object data to the report from code behind, then we suggest you use RDLC report for your requirement. We have prepared a simple sample for your reference and it can be downloaded from the below location. 
 
 
Note: Report Viewer should accept the only list of data show if you have single entity then that should be shared to the report with list along with single item. 
 
 
Regards, 
Vinoth S. 



ST Stefano August 7, 2019 09:18 AM UTC





Thanks Vinoth S. for the reply.
how do I add a field? In the property there are no fields. I have a "String" field that contains data for displaying it on the report as RTF

Thanks.



VS Vinoth Srinivasan Syncfusion Team August 7, 2019 05:09 PM UTC

Hi Stefano, 

We have prepared a video for creating dataset fields for RDLC report from object data and it can be downloaded from below location. 


Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon