none
Generating reports in RDLC RRS feed

  • Question

  • Is it possible to add report parameters to a bar chart in visual studio,

    or is there any other way to display text box values of a windows form  in a report viewer bar chart.

    Sunday, November 10, 2019 10:12 AM

All replies

  • Hi Thushan Withanage, 

    Thank you for posting here.

    You can refer to the following reference to use ReportViewer Control in WinForm.

    Using the WinForms ReportViewer Control

    In the second C# code example, it shows how to create report parameter and set the report parameters for the report.

                    // Create a report parameter for the sales order number
                    ReportParameter rpSalesOrderNumber = new ReportParameter();
                    // Set name and add value for the report parameter
                    rpSalesOrderNumber.Name = "SalesOrderNumber";
                    rpSalesOrderNumber.Values.Add("SO43661");
    
                    // Set the report parameters for the report  
                    localReport.SetParameters(
                        new ReportParameter[] { rpSalesOrderNumber });
    

    Here’s a reference about ‘LocalReport.SetParameters’ method.

    LocalReport.SetParameters Method

    Hope it can help you.

    Besides, If I have any misunderstanding, please provide more information about your question.

    Best Regards,

    Xingyu Zhao



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 11, 2019 7:13 AM
    Moderator