Page 1 of 1

can i pass parameter into report using deme version?

Posted: Tue Sep 04, 2012 1:46 pm
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

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

Posted: Wed Sep 05, 2012 8:02 am
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.

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

Posted: Wed Sep 05, 2012 8:36 am
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

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

Posted: Wed Sep 05, 2012 9:27 am
by Alex K.
Hello,

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

Thank you.