as adding a value to a variable code to a design by

Stimulsoft Reports.NET discussion
Post Reply
miguels
Posts: 27
Joined: Tue Jun 23, 2009 5:05 pm

as adding a value to a variable code to a design by

Post by miguels »

Hi I have my report design saved on my hard drive as reporte.mrt,
which in the query data source in the query's WHERE you put a variable.

C # code and the condition I assign that variable to filter my report. but I make an error inthe show preview

so by my report
StiReport report = new StiReport();
report.Load("c:\\reporte.mrt");

later attempts to assign the condition to my variable
report.Dictionary.Variables.Items[0].Value = "pla.numemppl='1420'


and here I try to upload the report to preview or directly to the printer ... but mark me for rendering an error

report.Render(true);

if (!report.IsStopped)
{
if (reportAction == ReportAction.PreviewInWindow) report.Show();
else if (reportAction == ReportAction.Preview)
{
stvVista.Report = report;
}
else
if (reportAction == ReportAction.Print)
{
report.Print(false, printerSettings);
}
}

my question is if I need something more after you load the report and filter the data before displaying it ..


I hope they can help me thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

as adding a value to a variable code to a design by

Post by HighAley »

Hello.
miguels wrote:Hi I have my report design saved on my hard drive as reporte.mrt,
which in the query data source in the query's WHERE you put a variable.

C # code and the condition I assign that variable to filter my report. but I make an error inthe show preview

so by my report
StiReport report = new StiReport();
report.Load("c:\\reporte.mrt");

later attempts to assign the condition to my variable
report.Dictionary.Variables.Items[0].Value = "pla.numemppl='1420'


and here I try to upload the report to preview or directly to the printer ... but mark me for rendering an error

report.Render(true);

if (!report.IsStopped)
{
if (reportAction == ReportAction.PreviewInWindow) report.Show();
else if (reportAction == ReportAction.Preview)
{
stvVista.Report = report;
}
else
if (reportAction == ReportAction.Print)
{
report.Print(false, printerSettings);
}
}

my question is if I need something more after you load the report and filter the data before displaying it ..


I hope they can help me thanks
What error do you have?

Thank you
Post Reply