Passing Parameters to SQL
Re: Passing Parameters to SQL
Hello.
Can you show screenshot of added category
Can you show screenshot of added category
-
- Posts: 22
- Joined: Wed Apr 01, 2015 2:29 pm
Re: Passing Parameters to SQL
Hi,Vadim wrote:Hello.
Can you show screenshot of added category
I've used the code below:
stiReport.getDictionary().getVariables().add(new StiVariable("Var1", "", new StiSystemGuid()));
It adds Category. See the screenshots:
And when I right click on it and choose Edit:
I'm using Stimulsoft.For.Java.Flex 2014.3
Thx
Re: Passing Parameters to SQL
Hello.
Did you use your code stiReport.getDictionary().getVariables().add(new StiVariable("Var1", "", new StiSystemGuid()));
with report.getVariables().put("Var1", val);
?
Did you use your code stiReport.getDictionary().getVariables().add(new StiVariable("Var1", "", new StiSystemGuid()));
with report.getVariables().put("Var1", val);
?
-
- Posts: 22
- Joined: Wed Apr 01, 2015 2:29 pm
Re: Passing Parameters to SQL
Hi,Vadim wrote:Hello.
Did you use your code stiReport.getDictionary().getVariables().add(new StiVariable("Var1", "", new StiSystemGuid()));
with report.getVariables().put("Var1", val);
?
as far as I understand, the below code works as: first parameter is category name, second one is variable name and the last one is variable type.
Code: Select all
new StiVariable("Var1", "", new StiSystemGuid())
Code: Select all
stiReport.getDictionary().getVariables().add(new StiVariable("Cat1", "Var1", new StiSystemString()))
stiReport.getDictionary().getVariables().get("Var1").setValue("JAVA");
stiReport.getVariables().put("Var1", "JAVA");
Re: Passing Parameters to SQL
Hello.
Now I understand, pelase use next code:
Now I understand, pelase use next code:
Code: Select all
report.getDictionary().getVariables().add(new StiVariable("", "Var1", StiSystemTypeEnum.SystemString.getSystemType()));
-
- Posts: 22
- Joined: Wed Apr 01, 2015 2:29 pm
Re: Passing Parameters to SQL
Hi,Vadim wrote:Hello.
Now I understand, pelase use next code:Code: Select all
report.getDictionary().getVariables().add(new StiVariable("", "Var1", StiSystemTypeEnum.SystemString.getSystemType()));
Thanks for your attention and response, Now it works. But there is another question in my mind:
What I must do with a report that has variables which are not requested by user when I click the Preview? By other words, when I select Preview in designer, how i must fill the variables? I mean which method is called when preview is selected that then I can fill the variables?
Thx
Re: Passing Parameters to SQL
Hello.
You can fill variables in RenderReportAction like in webfx sample my.actions.MyRenderReportAction
You can fill variables in RenderReportAction like in webfx sample my.actions.MyRenderReportAction
-
- Posts: 22
- Joined: Wed Apr 01, 2015 2:29 pm
Re: Passing Parameters to SQL
Hi,Vadim wrote:Hello.
You can fill variables in RenderReportAction like in webfx sample my.actions.MyRenderReportAction
Thanks for your response
Re: Passing Parameters to SQL
Hi,
Glad to help you!
Have a nice day!
Glad to help you!
Have a nice day!