Pergunta

How does one pass parameters needed by my SQL query in an ActiveReports report? I know about the code that goes into the ReportStart event, but how does one pass the values of the parameters to the report?

Foi útil?

Solução

Figured it out. From your class running the report:

var report = new MyReport();
report.Parameters["Parm1"].PromptUser = false;
report.Parameters["Parm1"].Value = someVariable;
report.Parameters["Parm2"].PromptUser = false;
report.Parameters["Parm2"].Value = someVariable2.ToString("M-d-yyyy");
report.Run();

Apparently, when one new ups the report, it is parsed for parameters and they are added to the Parameters collection. So you would just need to set the properties as one wishes.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top