Solved

Date parameter in select query of the CrysReport

Posted on 2003-12-10
3
527 Views
Last Modified: 2006-11-17
Hi,
How do I use the Date parameter field in a report in the select query of the same  report.
ie,
I am calling the report from VB. Yes the parameter passes and I can get it in the report.

My SQL Query of the crystal report should look something like:
select <records> where accDate = <parameter field>

Thanks,
Ram
0
Comment
Question by:Cuddalore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 9918106
Assuming your parameter is named dateparm, you refer to the entire parameter as {?dateparm} in formulas.

To pass the date to SQL, you may need to parse the parameter which is of date/time type to be of date type only using datevalue({?dateparm}).  Your version os SQL may also require that the date appear as a string, in which case your where clause would be

"...where accDate = '" + totext({?dateparm},"mm/dd/yyyy")

0
 

Author Comment

by:Cuddalore
ID: 9918402
Thanks Drryan3.
0
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 500 total points
ID: 9919909
Cuddalore

Did that clear things up for you?  If so, please take a moment and close this question.  If you need help with that, click on the Help link at your left.

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question