Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional format smallDateTime field in report CR6.0 MSSQL7.0

Status
Not open for further replies.

walterk123

IS-IT--Management
Sep 26, 2001
5
US
I have a report that is showing all open orders in our system. For each customer, it tells us when the order was planned to ship, and when it actually shipped. [planshipdate, actshipdate]

(If it shipped, it should be closed and not appear. If it does, that is an issue for our folks to address.)
I also want to show all the orders with no ActShipDate yet, but I do not want to see the value of that field - since an empty (aka default/null?) smalldatetime field appears as 1/1/1900.

Is there a way to format the field in CR6.0 to suppress appearance if ActShipDate = 1/1/1900? I looked at the functions, and I must be missing something. The 1/1/1900 values always appear, and I don't know if I have to translate the data to String or Value to make my comparison.

Thanks,
- Walter
 
Have you tried right clicking on the field->common->suppress->x+2 and entering the following?

Date({table.ActShipDate}) = Date(1900, 01, 01)

-LB
 
Not quite - it was date(1900,1,1). I ma not sure if CR is that picky about 01 vs. 1. I just tried to enter the formulas:
date({SOShipHeader.ShipDateAct})= date(1900,01,01)
and/or date({SOShipHeader.ShipDateAct})= date(1900,01,01,00,00,00) with no luck. I thought maybe it needed hh:mm:ss too.
When I check the formula, I got this message both times: "Not enough arguments have been given to this function."

I see that Date has two formats - date(datetime) and date (y,m,d). Is smalldatetime considered datetime by CR?

Thanks for the tip. Too bad I still can't get it to dance for me. :-(
 
Hi,
Have you tried, for the supress formula
Code:
IsNull({SOShipHeader.ShipDateAct})
[code]

The 1/1/1900 may only be a display value and not in the database..

Just a thought..

[profile]
 
Is there a way to get this day back, since I just wasted it on a futile task??

Apparently, my application was not looking at my report directory used by all the users, but instead, using my development box. So all the changes I was making on the production report directory would never appear in my print previews. [mad]

It finally dawned on me, when I decided to change a font color to make sure the report was doing what I asked it - bang! - I discovered that my changes were for naught.

This is what I did to accomplish my 'hide empty smalldatetime fields':
right click on the field->common->suppress->x+2 and entering the following:
toText({SOShipHeader.ShipDateAct}) = "1/1/1900"

- It appears that CR wants 1/1/1900 instead of 01/01/1900 - both pieces of text are truly different.

Thanks for helping me try to resolve this - my own ignorance was my bigger foe today. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top