Parameters in Web report

Stimulsoft Reports.NET discussion
Post Reply
kubru
Posts: 8
Joined: Fri Aug 25, 2006 6:59 am
Location: Belgium

Parameters in Web report

Post by kubru »

Hello

I'm still working on our model catalog and I managed to create a working webreport from it.
What I needed next is a page on which our users can choose the wanted collection, season and theme.
I looked at your example 'How to create report with named parameters' and tried to adapt it to our situation.
I started with just the 'collection' parameter to test it out.

So far I created a form with one label, one lookupbox and one button.
I set the lookupbox to bind to a databasetable an the box picks up the wanted fields as expected.
I modified the SQL which picks up the models on my report so it can accept a parameter @collection.
(Same error as my previous post: scalar variable @collection needs to be declared, but you explained I just can add the 'where' clause later, so I did)
I set the ConnectOnStart property of the table tblModels to 'false'.
The buttoncode exists of one line: tblModels.connect()
The parameter code is the following:

Name: @collection
Expression: myLookupBox.SelectedValue
Size: 50 (like the size of my databasefield)
Type: VarChar (dito)

When I preview the report the form displays, I can choose a collection from the lookupbox.
When I click the button I get an 'unhandled exception has occurred in a component in your application' error.
The error says that my SQL query expects the parameter @collection and that this parameter was not given.

Can you tell me what I missed?

Thanks ahead!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Parameters in Web report

Post by Edward »

kubru wrote:Hello

I'm still working on our model catalog and I managed to create a working webreport from it.
Dialog forms for Web reports will be availiable in some weeks. We will post the message in that topic when it will be availiable.
kubru wrote: What I needed next is a page on which our users can choose the wanted collection, season and theme.
I looked at your example 'How to create report with named parameters' and tried to adapt it to our situation.
I started with just the 'collection' parameter to test it out.

So far I created a form with one label, one lookupbox and one button.
I set the lookupbox to bind to a databasetable an the box picks up the wanted fields as expected.
I modified the SQL which picks up the models on my report so it can accept a parameter @collection.
(Same error as my previous post: scalar variable @collection needs to be declared, but you explained I just can add the 'where' clause later, so I did)
I set the ConnectOnStart property of the table tblModels to 'false'.
The buttoncode exists of one line: tblModels.connect()
The parameter code is the following:

Name: @collection
Expression: myLookupBox.SelectedValue
Size: 50 (like the size of my databasefield)
Type: VarChar (dito)

When I preview the report the form displays, I can choose a collection from the lookupbox.
When I click the button I get an 'unhandled exception has occurred in a component in your application' error.
The error says that my SQL query expects the parameter @collection and that this parameter was not given.

Can you tell me what I missed?

Thanks ahead!
Please send *.mrt file of your report to Image for analisys.
Thank you.
Post Reply