Solved

Formula Error

Posted on 2014-09-30
9
155 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 100

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: 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.

 

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 100

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 100

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 100

Expert Comment

by:mlmcc
ID: 40355527
Try a VERIFY DATABASE

mlmcc
0

Featured Post

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.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

740 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