473,508 Members | 3,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use Crystal Report to get the Current Date

143 New Member
I need to create a field in formula field of crystal report (8.5) to get the current date according to my AmendNo field in the report...

'[AmendDate: ' + Trim(ToText({v_pohdr.AmendDate},0)) +']'

I m putting this formula but is telling me the string is required

Need Help
Jan 11 '08 #1
8 7322
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Try This :

'[AmendDate: ' + ToText({v_pohdr.AmendDate}) + ']'

You had given ToText(Fieldname, 0), This will be usefull if Fieldname is Decimal Variable,
0 -refers to Round-Off. and it gives error for Dates

Regards
Veena
Jan 11 '08 #2
squrel
143 New Member
My field is AmendDate and the format is datetime.... this formula is not giving any error but i m not getting the date... the field is empty



Hi,

Try This :

'[AmendDate: ' + ToText({v_pohdr.AmendDate}) + ']'

You had given ToText(Fieldname, 0), This will be usefull if Fieldname is Decimal Variable,
0 -refers to Round-Off. and it gives error for Dates

Regards
Veena
Jan 11 '08 #3
Killer42
8,435 Recognized Expert Expert
Can you give us the specific details of the error please?
Jan 11 '08 #4
squrel
143 New Member
i have a report in crystal report... thr is a field called AmendNo which can be 0,1 or 2.. i Have to create a new field called AmendDate which has to be current date and appear when the AmendNo is 1 or 2..
i made a new column in my table which the AmendNo is taking from and add the column to my view which is using in my report and add the AmendDate where ever the AmendNo is thr in my VB program...
i made the AmendDate field in my report throug the above formula but the field is empty and not showing any date...
Can u help me out?
Jan 11 '08 #5
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

So, you want to print Date if AmendNo > 0 , then put the condition in formula:

Expand|Select|Wrap|Line Numbers
  1. If {v_pohdr.AmendNo} > 0 Then
  2.    [AmendDate: ' + ToText({v_pohdr.AmendDate}) + ']'
  3. Else
  4.    ' '
  5.  
Also Check this option > "Convert Null To Defaults"
After placing the formula, Also Check the Physical width of the Formula..


Regards
Veena
Jan 11 '08 #6
squrel
143 New Member
Thank u very much for ur help

this formula works but dont convert the Null to Default

If {v_pohdr.AmendNo} > 0 Then
'Convert Null To Defaults'
Jan 11 '08 #7
QVeen72
1,445 Recognized Expert Top Contributor
Hello,

I Told You To Check The Cr Option In Designer..

Regards
Veena
Jan 11 '08 #8
squrel
143 New Member
Ya sorry ... got it
thankx alot for ur help.... God Bless
Jan 11 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
19130
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
1
2774
by: rdshultz | last post by:
My company is going to a new software were I have to learn Crystal Reports. Had my first class and I'm a little confused. The instructor said everytime you run a Crystal report you have to do a...
0
1146
by: Nedim | last post by:
i have one table that i use for the details section of a crystal report, and a linked table that should also be used in the details. the problem is i cannot join them because the linked table has...
3
3252
by: Matt MacDonald | last post by:
I'm trying to run a report using a form containing a crystal report viewer, but I keep getting an error saying tha "The specified value type is different to the current value type I'm trying to use...
1
2294
by: Tim_Mac | last post by:
hi, i am encountering a sporadic exception using crystal reports that is causing me grief, I can't 'handle' it... my code is loading a typed report, and loading a DataSet to it. unfortunately...
3
5137
by: Brad | last post by:
In a Vista/IIS7 asp.net app, a coded crystal report export is crashing IIS7....but it works just fine in visual studio's cassini web server. And if I create a web form and use the crystal...
0
1862
by: amiga500 | last post by:
Hello, I am developing a crystal report called Expense Report (I am not an expert Crystal Report designer) if someone could help me in this problem I would be greatly appreciate it. The report...
11
9663
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
1
2431
by: coolminded | last post by:
hi all, i'm using vb6 and crystal report9. i just created a report.it works well. and i included one sub report to it and i passed the current date in it's "group header section " as Private...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.