[Webinar] Learn how to a build a cloud-first strategyRegister Now


A date-time is required here. Crystal Report

Posted on 2006-04-05
Medium Priority
Last Modified: 2008-01-09
I am passing the record selection forluma using the following code:
 report.DataDefinition.RecordSelectionFormula =
"{trans_dtl_conso.transaction_date}='" & Format(dtpFrom.Value, "MM-d-yyyy")  & "'"

Following error message appears:
A date-time is required here.
Error in File ...report file name dot rpt;
Error in formula <Record_Selection>.
A date-time is required here.

datastruce of transaction_date is datetime in sqlserver.
I want to validate only the date.
Question by:peterdevadoss

Accepted Solution

g_johnson earned 120 total points
ID: 16381200
within crystal you probably need to use #03-1-2006# to pass the date; you are just passing a formula to crystal, crystal is talking to sql
LVL 34

Assisted Solution

by:Brian Crowe
Brian Crowe earned 80 total points
ID: 16381586
johnson is correct try...

report.DataDefinition.RecordSelectionFormula =
"{trans_dtl_conso.transaction_date}=#" & dtpFrom.Value.tostring("MM-d-yyyy")  & "#"

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

867 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