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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

set value Parameters via Code

Thread ID:

Created:

Updated:

Platform:

Replies:

146496 Aug 6,2019 10:04 AM UTC Aug 7,2019 05:09 PM UTC WPF 7
loading
Tags: ReportViewer
Stefano
Asked On August 6, 2019 10:04 AM UTC

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

Vinoth Srinivasan [Syncfusion]
Replied On 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.  


Stefano
Replied On August 6, 2019 11:02 AM UTC

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

Stefano
Replied On 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

Stefano
Replied On 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?



Vinoth Srinivasan [Syncfusion]
Replied On 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. 


Stefano
Replied On 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.


Vinoth Srinivasan [Syncfusion]
Replied On 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. 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon