Creating select at runtime

Stimulsoft Reports.NET discussion
Post Reply
robsongaeski
Posts: 2
Joined: Fri May 11, 2012 9:06 am

Creating select at runtime

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Creating select at runtime

Post 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.
robsongaeski
Posts: 2
Joined: Fri May 11, 2012 9:06 am

Creating select at runtime

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Creating select at runtime

Post 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.
Post Reply