Page 1 of 1

Creating select at runtime

Posted: Wed May 16, 2012 2:53 pm
by robsongaeski
Good afternoon ladies.

I have the following doubts:
I created a Report of the Company.

But the User has the right to choose a parameter

for example, can choose to display all businesses. espefica or only one.
or even all firms in a city,

I made it to the following screen

Image

I then created the select at runtime

I would like to know how to pass that I created to select the report that I did.

Ie filters and pass parameters to the report that did

How do This?


I also like the design? Well, I created a select query with a new design to mount the

I use Firefird e Visual Studio 2010
Thank you all and sorry for the ignorance.

Creating select at runtime

Posted: Thu May 17, 2012 3:54 am
by HighAley
Hello.

What product and version do you use?

You could either use variables by changing its value from code or change data band filter property directly.

Thank you.

Creating select at runtime

Posted: Thu May 17, 2012 8:34 am
by robsongaeski
Aleksey wrote:Hello.

What product and version do you use?

You could either use variables by changing its value from code or change data band filter property directly.

Thank you.


Hello, I use the 2012

But how do it?
have an example?

Remembering that I want to change all select the report.
hugs

Creating select at runtime

Posted: Fri May 18, 2012 6:52 am
by HighAley
Hello.

You could change the filter string using next code:

Code: Select all

(report.GetComponentByName("DataBand") as StiDataBand).Filter.Value = "(Categories.CategoryID > 3) && (Categories.CategoryID < 7)";
Or use Variables in the filter and chenge it with next code:

Code: Select all

report.Dictionary.Variables["Variable1"].ValueObject = YourValue;   //before compile report
report["Variable1"] = YourValue;                                    //after complie
Please look at the Selecting Country report in the Parameters section in our Demo.

Thank you.