passing a variable to a report form
Hello.
I have a webform that when the user clicks print receipt, it will print a report. This works ok. But l want to pass a variable from the form to be displayed in the report.
My code so far: I want to pass totalcost and display that in the report.
Code:
string totalCost = "1000";
rptReceipt customerReceipt = new rptReceipt();
this.rptViewerReceipt.SelectionFormula = "{PurchasedProducts.CustomerID} = '" + customerID + "' ";
this.rptViewerReceipt.ReportSource = customerReceipt;
this.rptViewerReceipt.Refresh();
this.rptViewerReceipt.Show();
Many thanks in advance,
Steve