Passing textbox text in form to RDLC header RRS feed

  • Question

  • User-958411764 posted

    Good days to all,

    I'm using vb.net. In aspx form, i got 2 textbox (start date and end date) and 1 reportviewer.

    I'm binding dynamic dataset to rdlc where i directly takes the start date and end date text in my SQL query without using the parameters.

    Now i would like to show the start date and end date value in RDLC header.

    It is highly appreciated if any of you can give some idea, how to display start date and end date value in RDLC header.

    Thank you very much.

    Wednesday, September 18, 2013 4:32 AM


  • User260886948 posted


    Please try add one or more parameters to the report (Report-->Report Parameters + Add) 

    In the header, add text boxes and use the parameters to set their values:

    e.g. ="Invoice No.: " & Parameters!InvoiceNumber.Value

    And then add them to your LocalReport:

     Code Snippet

    ReportParameter[] parameters = new ReportParameter[4];

    parameters[0] = new ReportParameter("StartDate", reportView.StartDate.ToString("MMM-dd-yyyy"));

    parameters[1] = new ReportParameter("EndDate", reportView.EndDate.ToString("MMM-dd-yyyy"));


    reports.Add(new InvoiceReport(report, reportView));

    Best Regards.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 18, 2013 9:49 PM