Solved

Date parameter in select query of the CrysReport

Posted on 2003-12-10
3
515 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mask on Parameter CR2008 28 61
Exclude some records from totals 10 60
Calculation - Mini/Max Removed then average 8 29
Page Break on Change of Field 2 18
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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