Solved

Formula Error

Posted on 2014-09-30
9
156 Views
Last Modified: 2014-10-01
I am trying to suppress a section where the date is not equla to 01/01/1900

What is wrong with this
({WO.CLOSEDATE}) <> Date (1900,01,01)

Gordon
0
Comment
Question by:GiaHughes
[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
  • 5
  • 4
9 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40353052
Is CloseDate a DateTime?

Try this

Date({WO.CLOSEDATE}) <> Date (1900,01,01)


Are you getting an error or just not working?

DO you need those records in the report for some reason?
If not why not just filter them out?

mlmcc
0
 

Author Closing Comment

by:GiaHughes
ID: 40353450
Very good as usual
0
 

Author Comment

by:GiaHughes
ID: 40353544
Hi mimcc

Thought it was ok said No Errors unfortuneatly when I try and run the report it says
error in file <selection_Visibility>.
Date({WO.CLOSEDATE}) <> Date (1900,01,01)
Bad date format string

Gordon
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:GiaHughes
ID: 40353550
Hi mimcc
if i change the formula to ({WO.CLOSEDATE}) <> Date (1900,01,01)

it says a string is required here

Gordon
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 40353649
Apparently your dates are really strings.  

Check the format/ value and change the selection to

({WO.CLOSEDATE}) <> "01/01/1900"

mlmcc
0
 

Author Comment

by:GiaHughes
ID: 40354197
Hi mimcc

I think we are on the correct line
but it does not work in the programme
I am trying to suppress a section when the WO.CLOSEDATE is not equal to 01/01/1900
in the database the data is shown as 1900-01-01 00:00:00.000

it does not seem to affect the report which appears to suppress the section regardless

Gordon
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 40354582
Is the field a DATE or a STRING?

Drop the field on the report (if it isn't already)
Right click it
Click FORMAT FIELD
Do you see the NUMBER or DATETIME tabs?

mlmcc
0
 

Author Comment

by:GiaHughes
ID: 40355351
Hi mimcc

Dont see Number or datetime tabs
In crystal reports it says it is String [22]
but in the sql databse it says it is DATETIME

So totally confused

Gordon
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 40355527
Try a VERIFY DATABASE

mlmcc
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

688 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