Sending parameter to Fast Report from c# Visual Studio

I have got a grid GridView in visual studio. And i have created a dataset, where i put data through. My question is how i can place the ID in GridView into SQL Query i have created in FastReport.

Comments

  • pinbotpinbot Texas
    edited 3:00AM

    Create a parameter in FR.Net


    Test your report with default parameters.

    When ready to pass from C#, do something like this (this is from a asp.net web page that returns a FR exported pdf but you get the idea):




    FastReport.Report Rpt = new FastReport.Report();

    Rpt.Load(Server.MapPath("./bin/App_Data/Invoice.Frx"));
    Rpt.SetParameterValue("InvoiceBatch", 0);
    Rpt.SetParameterValue("InvoiceNumber", Id);
    Rpt.SetParameterValue("SendAll", "Y");
    Rpt.SetParameterValue("AccountToPrint", "");


    Hope that helps,
    Bryan

Leave a Comment