Page 1 of 1

Filter in SQL Report

Posted: Tue Apr 29, 2008 10:10 am
by sector7g
Hi,

I want to start a report, thats ask for some parameter before the report starts to render. Is there a possibility to do that in SR.
Or have I do that in my application?

The problem is: the expierenced user should create his own report over some SQL tables with my application. Then the normal user can start this report, set some parameters (in a form?) and the report starts to render.
In my application I will not know the parameter or the content of the report when I release the app.

My possible solution until now is:
Before the report starts, I have to look for "variables", create a form that asks for the content. Then set the variables from user input and start rendering. (whats about "empty" filters, I have to remove them from the statement?)

Is there a built in solution for the problem?

By the way:
Great tool !!!
I tried to start some reports in crystal report by using reflection api for dynamic rendering. No way in a week.
Then I found your tool and within 1 hour I startet my first generic report. Cool!!

Ralf

Filter in SQL Report

Posted: Tue Apr 29, 2008 3:35 pm
by Edward
sector7g wrote:I want to start a report, thats ask for some parameter before the report starts to render. Is there a possibility to do that in SR.
Or have I do that in my application?


The problem is: the expierenced user should create his own report over some SQL tables with my application. Then the normal user can start this report, set some parameters (in a form?) and the report starts to render.
In my application I will not know the parameter or the content of the report when I release the app.
Yes, it is possible to do.

Please see the Demo.exe sample application. This application available after installing full trial version of the Stimulsoft Reports.Net with setup program.
In that application go to SQL group of Reports, then into 'Parameters from Dialog Form' example report. Press the Design button.
Here is some tips about work with Sql DataSources.

1) The Sql DataSource must have ConnectOnStart property set in false.
2) Detail query in a Master-Detail report with parameters must have ReconnectEachRow parameter set in true.
3) You can connect all the Dictionary at once via this.Dictionary.Connect(); command. Also each StiSqlDataSource has its own Connect() method which can be called individually for each DataSource.

My possible solution until now is:
Before the report starts, I have to look for "variables", create a form that asks for the content. Then set the variables from user input and start rendering. (whats about "empty" filters, I have to remove them from the statement?)
Yes, you have to remove filters if there is incorrect condition inside of it.

By the way:
Great tool !!!
I tried to start some reports in crystal report by using reflection api for dynamic rendering. No way in a week.
Then I found your tool and within 1 hour I startet my first generic report. Cool!!

Ralf
Thank you for your words.

Please let us know if any help is required.

Thank you.

Filter in SQL Report

Posted: Wed Apr 30, 2008 10:24 am
by sector7g
Hi,

thanks for the very quick and helpful reply. I tested it right now and it works great.
I didn't notice the demo.exe until your post.
So much more to look ;-).


Thank you very much.
Ralf

Filter in SQL Report

Posted: Wed Apr 30, 2008 2:32 pm
by Edward
Let us know if any help is required.

Thank you.