CS0103 Error
-
- Posts: 25
- Joined: Tue Feb 25, 2014 5:14 am
- Location: Jupiter
CS0103 Error
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:
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.
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:
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
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.
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.
-
- Posts: 25
- Joined: Tue Feb 25, 2014 5:14 am
- Location: Jupiter
Re: CS0103 Error
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.
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
Hello.
Please, send us sample project which reproduces your issue for analysis.
Thank you.
Please, send us sample project which reproduces your issue for analysis.
Thank you.
-
- Posts: 25
- Joined: Tue Feb 25, 2014 5:14 am
- Location: Jupiter
Re: CS0103 Error
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
Hello.
You wrote ASY in the expression of the SQL query parameter.
This expression cause the error. Thank you.
You wrote ASY in the expression of the SQL query parameter.
This expression cause the error. Thank you.
-
- Posts: 25
- Joined: Tue Feb 25, 2014 5:14 am
- Location: Jupiter
Re: CS0103 Error
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
But in my case I add parameters programmatically. And when I put value to StiDataParameter.Expression and it executed this one:
Is there any sample code that I can use as a pattern for adding Parameters with Expressions?
Thanks.
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
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
Thanks.
Re: CS0103 Error
Hello,
Please try to simplify your solution. Try to use the variables or parameters only.
Thank you.
Please try to simplify your solution. Try to use the variables or parameters only.
Thank you.
-
- Posts: 25
- Joined: Tue Feb 25, 2014 5:14 am
- Location: Jupiter
Re: CS0103 Error
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.
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
Hello,
Please try to set the Size property for the parameter.
Thank you.
Please try to set the Size property for the parameter.
Thank you.
- Attachments
-
- Capture.png (52.99 KiB) Viewed 5237 times