Problem with query date parameters
Problem with query date parameters
Hello comunity
I have download you demo prduct to try.
I build a simple query , like this:
select dbo.ml.data, dbo.ml.conta, dbo.ml.debit, dbo.ml.credit from dbo.ml where
dbo.ml.data between @Datestart and @dateEnd
When i run this query, i fill my Datestart and Dataend on the calendar, but the query rerun always the same error:
Statement(s) could not be prepared.
Must declare the scalar variable "@DateStart".
I see your video on "http://www.stimulsoft.com/livedemos/par ... rt_1).html", and i follow exactly the same process step-by-step.
What are fail ???
Many thanks
Luis Santos
I have download you demo prduct to try.
I build a simple query , like this:
select dbo.ml.data, dbo.ml.conta, dbo.ml.debit, dbo.ml.credit from dbo.ml where
dbo.ml.data between @Datestart and @dateEnd
When i run this query, i fill my Datestart and Dataend on the calendar, but the query rerun always the same error:
Statement(s) could not be prepared.
Must declare the scalar variable "@DateStart".
I see your video on "http://www.stimulsoft.com/livedemos/par ... rt_1).html", and i follow exactly the same process step-by-step.
What are fail ???
Many thanks
Luis Santos
Re: Problem with query date parameters
Hello again
I change the connection to my SQL server to : SQL.Connection.
My query now work with the code i send and return the correct values between dates, the only thing that´s not appear is to 2 calendars to sleect the dates, only a pop-up to introduce the variables, but when i ask the report preview another error appear:
Failed to convert parameter value from a DateTimeRange to a DateTime.
Someone could help me!
Best regards
Luis Santos
I change the connection to my SQL server to : SQL.Connection.
My query now work with the code i send and return the correct values between dates, the only thing that´s not appear is to 2 calendars to sleect the dates, only a pop-up to introduce the variables, but when i ask the report preview another error appear:
Failed to convert parameter value from a DateTimeRange to a DateTime.
Someone could help me!
Best regards
Luis Santos
Re: Problem with query date parameters
Hello,
Can you please send us a sample report template with data or a simple test project, which reproduces the issue?
Thank you.
Can you please send us a sample report template with data or a simple test project, which reproduces the issue?
Thank you.
Re: Problem with query date parameters
Hello Ivan
How can create the report template or a simple test project?
I can send you a script to create sql table with some data, and also the report save in mrt file.
also, how can send you in this forum a zip attachement file ?
Best regards
Luis Santos
How can create the report template or a simple test project?
I can send you a script to create sql table with some data, and also the report save in mrt file.
also, how can send you in this forum a zip attachement file ?
Best regards
Luis Santos
Re: Problem with query date parameters
Hello.
You could add files to your message at the Upload attachment tab under editor window. Thank you.
It will be enough.LSantos wrote:I can send you a script to create sql table with some data, and also the report save in mrt file.
also, how can send you in this forum a zip attachement file ?
You could add files to your message at the Upload attachment tab under editor window. Thank you.
Re: Problem with query date parameters
Hello Aleksey and Ivan
I send to you the script to create the SQL Table and also the Script to INSERT several records for testing (Both in on TXT file).
I send also my Report save as .mrt file.
All this things are on zip file attachment.
I hope you can give me some help.
Best regards
Luis Santos
I send to you the script to create the SQL Table and also the Script to INSERT several records for testing (Both in on TXT file).
I send also my Report save as .mrt file.
All this things are on zip file attachment.
I hope you can give me some help.
Best regards
Luis Santos
- Attachments
-
- Stimulsoft.zip
- report and script to create table and Insert records for testing
- (57.03 KiB) Downloaded 270 times
Re: Problem with query date parameters
Hello,
Can you please check the sent script. We get the following error:
"There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement."
Thank you.
Can you please check the sent script. We get the following error:
"There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement."
Thank you.
Re: Problem with query date parameters
Hello Aleksey
Sorry about the script for inserting records on table ML, the error is due to the decimal separator is set to "," and not ".".
Now i correct the problem and i send you just the correct script.
Many thanks
Luis Santos
Sorry about the script for inserting records on table ML, the error is due to the decimal separator is set to "," and not ".".
Now i correct the problem and i send you just the correct script.
Many thanks
Luis Santos
- Attachments
-
- New Script to insert records on table ML.zip
- New INSERTING Script for table ML
- (54.1 KiB) Downloaded 265 times
Re: Problem with query date parameters
Hello,
Please check the modified report in attachment.
Thank you.
Please check the modified report in attachment.
Thank you.
- Attachments
-
- TEST_Report between 2 variable date_modified.mrt
- (8.76 KiB) Downloaded 619 times
Re: Problem with query date parameters
Hello Aleksey
Thanks for your reply, i will test the report that you send me.
Many thanks
Luis Santos
Thanks for your reply, i will test the report that you send me.
Many thanks
Luis Santos