SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Reporting Services Development
 How do I send report builder variable to ODBC
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

RogerPeckham
Starting Member

USA
2 Posts

Posted - 06/07/2013 :  11:57:12  Show Profile  Reply with Quote
I have a query that works in report builder to pull info from an ODBC datasource with the start and end date hard coded. I'd like to set it up to allow the user to input start and end date as a variable, but when I do I get a lexicon missing error message, any ideas on how to do it?

Working code:
Select History.TimeStamp, History.Value001
From History History
Where (History.Parameter001='pointname.pointvalue') and (history.timestamp>={ts '2013-05-01 00:00:00'} and history.timestamp<={ts '2013-05-13 23:59:00'})

I'd like to substitute @startdate and @enddate to prompt user input, but cant get it to work.

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 06/08/2013 :  04:29:55  Show Profile  Reply with Quote
you can add parameters when you create report using report builder.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

RogerPeckham
Starting Member

USA
2 Posts

Posted - 06/18/2013 :  19:37:08  Show Profile  Reply with Quote
changing the '2013-05-01 00:00:00' to a parameter gives me a missing lexical error 42000
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 06/19/2013 :  01:16:40  Show Profile  Reply with Quote
where are you trying to change this? Did you add a parameter from report designer window?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000