Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Two Formulas Post Reply Post New Topic
Author Message
tnwirtu
Newbie
Newbie
Avatar

Joined: 27 Oct 2009
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote tnwirtu Replybullet Topic: Two Formulas
     Posted: 28 Oct 2009 at 5:25am
Hi,
 
I have a problem with printing 2 formulas
 
When I want to print VISITORS.TIME_IN - Currentdate my formula is:
 
{VISITORS.TIME_IN} >= Totext(CurrentDate)  /all is fine, that's work/
 
but when I have created  another formula:
 
{VISITORS.TIME_IN} >= Totext(CurrentDate)  and
{VISITORS.TIME_OUT} >= Totext(CurrentDate)
 
/report i blank....  any idea/
 
Please help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Oct 2009 at 7:15am
1. What are the field types for Time_In and Time_Out and what is some sample data?
2. in non-formulatic terms what are you trying to accomplish?
IP IP Logged
tnwirtu
Newbie
Newbie
Avatar

Joined: 27 Oct 2009
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote tnwirtu Replybullet Posted: 28 Oct 2009 at 7:26am

1. field type  == "text"

2. I have table Visitors which include:
 
VISITOR_NAME
TIME_IN
TIME_OUT
 
I want to print:
 
Visitor Name |      Time in                   |        Time out
---------------------------------------------------------------------
Tom Brown   | 28/10/2009 10:06:22 |
 
Tom Brown   |                                     | 28/10/2009 11:07:22|
 
 
Like I said before I can print for example currentdate for Time IN 
 
but I'm not able to print currentdate TIME_IN and TIME_OUT
 
any idea?
 
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Oct 2009 at 7:45am
I am surprised the first one worked so that was why I was asking the questions.
Often people post with similar issues that have to do with the format messing it up as currentdate is in MM/dd/yyyy format where as your text fields are dd/MM.
If this is working fine then I would say your sample data indicated you want to use an OR statment instead of AND.
 
{VISITORS.TIME_IN} >= Totext(CurrentDate)  OR
{VISITORS.TIME_OUT} >= Totext(CurrentDate)
 


Edited by DBlank - 28 Oct 2009 at 7:46am
IP IP Logged
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