Page 1 of 2
CS0103 Error
Posted: Thu Mar 27, 2014 9:06 am
by eric_stimulsoft
Good Day!
I'm using Q3 release of Stimulsoft MVC/Web. And I tried to add a parameter to my report. But whenever I try to reload the report with the parameter I always get this error:

- Stimulsoft Filter Error.PNG (11.87 KiB) Viewed 5279 times
I've implemented a custom filter that enables user to type a value that they want to use as a filter. In this case
ASY was the filter value.
Thanks.
Re: CS0103 Error
Posted: Thu Mar 27, 2014 11:54 am
by HighAley
Hello.
How did you add this parameter?
How do you set the value of this parameter?
Please, try to set the type of Filter to expression and write your expression there.
Thank you.
Re: CS0103 Error
Posted: Fri Mar 28, 2014 12:28 am
by eric_stimulsoft
I programmatically set the value then add the parameter using c#.NET.
I also set its data type and size based on what I've used in SQL table.
I tried to use Expression as the type of filter but still, it redirects me to this error.
But when I use integers as my filter, the report loads with the data I needed.
And every time I use filters that requires string value this error persists.
Thanks.
Re: CS0103 Error
Posted: Fri Mar 28, 2014 6:05 am
by HighAley
Hello.
Please, send us sample project which reproduces your issue for analysis.
Thank you.
Re: CS0103 Error
Posted: Mon Mar 31, 2014 6:01 am
by eric_stimulsoft
Above is the sample mrt file and sample database query file (for SQL Server).
By the way, before we upgraded to Q3 2013 release we were using Q1 2013 release and it's working.
We just upgraded because we were about to buy your product but there are some other bugs encountered after the update and one of these bug is this CS0103 Error, and we're still fixing these bugs before we buy a license so that we are sure that there won't be any problem when we buy your license.
Hopefully we can fix these bugs as soon as possible.
Thanks.
Re: CS0103 Error
Posted: Mon Mar 31, 2014 8:13 am
by HighAley
Hello.
You wrote ASY in the expression of the SQL query parameter.
This expression cause the error.

- asy.png (23.46 KiB) Viewed 5261 times
Thank you.
Re: CS0103 Error
Posted: Mon Mar 31, 2014 9:40 am
by eric_stimulsoft
Hi, I've tried changing expression from
ASY to
ToString("ASY") and it worked.
I checked profiler and it executed this:
exec sp_reset_connection
Code: Select all
go
declare @p1 int
set @p1=-1
exec sp_prepexec @p1 output,N'@a_um_abbreviation nvarchar(6)',N'select * from tb_measure AS a
WHERE a.um_abbreviation = @a_um_abbreviation',@a_um_abbreviation=N'ASY'
select @p1
go
But in my case I add parameters programmatically. And when I put value to StiDataParameter.Expression and it executed this one:
Code: Select all
declare @p1 int
set @p1=1
exec sp_prepexec @p1 output,N'@a_um_abbreviation nvarchar(8)',N'SELECT a.um_id, a.um_description,
a.um_abbreviation
FROM u_unit_of_measure AS a WITH (NOLOCK)
WHERE a.[um_abbreviation] = @a_um_abbreviation',@a_um_abbreviation=N'ToString'
select @p1
Is there any sample code that I can use as a pattern for adding Parameters with Expressions?
Thanks.
Re: CS0103 Error
Posted: Tue Apr 01, 2014 10:37 am
by Alex K.
Hello,
Please try to simplify your solution. Try to use the variables or parameters only.
Thank you.
Re: CS0103 Error
Posted: Thu Apr 03, 2014 5:21 am
by eric_stimulsoft
Hi,
Is there any changes that I need to apply in adding variables/parameters for it to work?
Because in Q1 2013 version it works. but after I used Q3 2013 version the error showed up.
Thanks.
Re: CS0103 Error
Posted: Thu Apr 03, 2014 7:53 am
by Alex K.
Hello,
Please try to set the Size property for the parameter.
Thank you.