How to set Report Variable from Visual Studio code?
Posted: Fri Feb 12, 2016 3:39 pm
I've created a report file "D:\Sales\Report1.mrt" with multiple variables.
How do I now go about setting one of these variables?
For example, how would I set the parameter `p_boolPrintAmounts` to false?
I have many variables that need to be set before compiling the report:
How do I now go about setting one of these variables?
Code: Select all
public void ShowReport()
{
using (var report = new StiReport())
{
report.Load(_reportPath);
report.p_boolPrintAmounts = false; // this is wrong.
report.Compile();
report.Show();
}
}
I have many variables that need to be set before compiling the report:
Code: Select all
private String _reportPath;
public Boolean DisplayAmountsTendered { get; set; }
public Boolean DisplayNegativeInvoicesOnly { get; set; }
public Boolean DisplayMargins { get; set; }
public Boolean DisplayMarkups { get; set; }
public Boolean DisplayProfits { get; set; }
public Boolean DisplayTaxCodesAndAmounts { get; set; }
public Boolean DisplayWebOrdersOnly { get; set; }
public Boolean DisplayZeroTaxInvoiceOnly { get; set; }
public Boolean FilterIsInclusive { get; set; }
public Boolean UseMarketCost { get; set; }
public Boolean UseMarkupCost { get; set; }
public DateTime FilterInvoiceDateBegin { get; set; }
public DateTime FilterInvoiceDateEnd { get; set; }
public ReportSortSequence ReportSort { get; set; }
public DisplayWhichCost WhichCost { get; set; }
public DisplayWhichFormat WhichFormat { get; set; }
public DisplayWhichInvoice WhichInvoice { get; set; }
public DisplayWhichSales WhichSales { get; set; }
public String FilterInvoiceNumberBegin { get; set; }
public String FilterInvoiceNumberEnd { get; set; }
public String OnlyDisplayTaxCode { get; set; }