parameter issue - must declare scalar variable

Stimulsoft Reports.NET discussion
Post Reply
User avatar
dmasterplan
Posts: 143
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

parameter issue - must declare scalar variable

Post by dmasterplan »

Hi,

I created a variable and set it as a parameter (please see attached image),
but when previewed, it triggers an error "Must declare scalar variable"

Haven't done this before. Please help.

Great Thanks
Attachments
must declare the scalar variable.png
must declare the scalar variable.png (140.16 KiB) Viewed 644 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: parameter issue - must declare scalar variable

Post by Lech Kulikowski »

Hello,

Please add it as a parameter in the data source.

Thank you.
User avatar
dmasterplan
Posts: 143
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

Re: parameter issue - must declare scalar variable

Post by dmasterplan »

I added a parameter in datasource (image attached) but still triggers an error:
OleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.

so I set a size BUT there is still an error.
"Syntax error or access violation"
(image attached)
Attachments
datasource parameter.png
datasource parameter.png (33.33 KiB) Viewed 637 times
data source parameter size.png
data source parameter size.png (8.51 KiB) Viewed 637 times
User avatar
dmasterplan
Posts: 143
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

Re: parameter issue - must declare scalar variable

Post by dmasterplan »

Hi,

I want to thank you for your help.
I changed calling of the parameter the way we actually do it and it worked.

(see image attached)
Attachments
parameter changed.png
parameter changed.png (44.35 KiB) Viewed 624 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: parameter issue - must declare scalar variable

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply