Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Adding a date parameter to a formula Post Reply Post New Topic
Author Message
susanr
Newbie
Newbie
Avatar

Joined: 15 Jun 2011
Online Status: Offline
Posts: 10
Quote susanr Replybullet Topic: Adding a date parameter to a formula
    Posted: 07 Nov 2011 at 5:37am

Hi can someone help me please?

I have a text field which i have suppressed in some circumstances.
 
My current formula is:
 
{STK_STOCK.STK_SORT_KEY3} <> "Data" and
{DOC_ORDER_HEADER.DOH_DOC_DATE} > DateValue (2011,11,01)
 
I want the text field only to appear after a certain date i.e. 01.11.11
My code is wrong i think, how do i do this?
  
Thanks in advance
Susan
Susan
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Nov 2011 at 5:41am
suppressing is based on a TRUE result from the formula. I think you want to reverse your > to a <
 
{STK_STOCK.STK_SORT_KEY3} <> "Data" and
{DOC_ORDER_HEADER.DOH_DOC_DATE} < Date (2011,11,01)
IP IP Logged
susanr
Newbie
Newbie
Avatar

Joined: 15 Jun 2011
Online Status: Offline
Posts: 10
Quote susanr Replybullet Posted: 07 Nov 2011 at 6:07am

thanks for you reply.

Its still not working. When i add this code on, its no longer reading the parameter of the first part, i.e. if stock sort key 3 doesn't equal "Data" its not suppressing for anything?
 
Thanks
 
Susan
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Nov 2011 at 6:11am
do you have run time params that you are trying to pass to this?
Your sample does not indicate this...
 
Do you want it to suppress when both conditions (date and type) are met or either condition is met?
IP IP Logged
susanr
Newbie
Newbie
Avatar

Joined: 15 Jun 2011
Online Status: Offline
Posts: 10
Quote susanr Replybullet Posted: 07 Nov 2011 at 6:16am

i want it to look at both, so i want the text field to appear if sort key 3 equals "Data" and then only if the transaction is post 1st November 2011.

There are no other parameters, its a simple text field, based on sort key 3 in my database
thanks
Susan
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Nov 2011 at 6:21am
do you have NULL values? that will change it a bit....
in the formula editor there should be pick list option on how to handle NULLs.
Change it to use 'default values for Nulls'
then insert the formula:
NOT({STK_STOCK.STK_SORT_KEY3} = "Data" and
{DOC_ORDER_HEADER.DOH_DOC_DATE} > Date (2011,11,01))


Edited by DBlank - 07 Nov 2011 at 6:22am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.