can i pass parameter into report using deme version?

Stimulsoft Reports.WEB discussion
Post Reply
m.issa
Posts: 27
Joined: Tue Sep 04, 2012 8:08 am

can i pass parameter into report using deme version?

Post by m.issa »

Hello all

can i pass parameter from my web application into my report in the demo version?

this is my query in my report :
select * from ViewEmpDep where CatID = {param1}
then i declared the veriable in my report.


and this is my code in my C# web application:

StiReport report = new StiReport();
report.LoadFromString(a);
report["CatID"] = 2;

StiWebViewerFx1.Report = report;


The report display but with no data inside it, is that because i am using demo version so parameter does not pass properly from my web application into my report file, or there is another reason?

thank you
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: can i pass parameter into report using deme version?

Post by Alex K. »

Hello,

You can use the following code, if report compiled :
report["CatID"] = 2;
if not compiled:
report.Dictionary.Variables["CatID"].Value = "2";

Thank you.
m.issa
Posts: 27
Joined: Tue Sep 04, 2012 8:08 am

Re: can i pass parameter into report using deme version?

Post by m.issa »

Hello

i tried them, both of them show the report with no data.


my steps are:
In the report:

- the report query: select * from ViewEmpDep where CatID = @CatID
- i declared new parameter under the name : CatID
- i declared new varialbel under the name : CatID

In the C# code :

- i tried this code: report["CatID"] =2
- i tried this also: report.Dictionary.Variables["CatID"].Value = "2";

but both of them show the report with no data


thank you
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: can i pass parameter into report using deme version?

Post by Alex K. »

Hello,

Please send us a sample project with test data for analysis.

Thank you.
Post Reply