Solved

How to compare date in crystal reports viewer.

Posted on 2004-04-03
3
741 Views
Last Modified: 2007-12-19

how to compare dates in crystal reports' selection formula.

I want to apply selection criteria on my crystal report.
Report is binded to a data view.
and i m doing like this

  CRViewer.SelectionFormula = "{v_advances.creationDate} > '2/2/2004' "

v_advances= database view name
creationDate= view's field's alias name

and its not working.

kindly tell me; how to compare dates in selection formula of crystal report.

I am using visual basic.net 2003.
0
Comment
Question by:capriono
3 Comments
 
LVL 6

Accepted Solution

by:
viola123 earned 30 total points
ID: 10809908
hi, i think you'd better convert '2/2/2004'  to date field. do not use it as a string. cos i don't use VB.net, so not sure how to convert it to date in VB.NET. but in crystal report >'formula editor' , you can use this function 'Date(YYYY,MM,DD)' to do it. that is Date(2004,02,02)

viola
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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