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 5:38AM

    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.