×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Editing QRP Date Field

Editing QRP Date Field

Editing QRP Date Field

(OP)
I am new to Report Builder 6.0. I have a qrp file I'd like to modify a DueDate field on that report so if that DueDate field value is null it would insert today's date instead of leaving it blank. DueDate is a date/time field. Is something like this possible in the qrp?

I'm confused between adding a condition on that field and just creating a new formula field. I can't seem to get the syntax correct. I've tried something like this
DateIFF( StrLength( StrTrim(DateToStr( DUEDATE )) ) , DATE_NULL , TODAY() , DUEDATE )

Any idea what this code is doing? DateToStrPicture( DUEDATE , 'S' ) What is the 'S' doing?

Any help you can provide would be much appreciated!

Thank you

RE: Editing QRP Date Field

Stacy - Great to see you're using ReportBuilder - hang-in there, it gets easier. Create a new formula and apply it to a blank field:

DateIFF( StrLength( StrTrim( DateToStr( DUEDATE )) ) , DATE_NULL , CurrentDate( ), DUEDATE ).

Note that you need to declare a dummy variable DATE_NULL in your report, as in the case of DUEDATE length < 0 ( the length of a string never can be < 0) .
If the length of DUEDATE is > 0 , DUEDATE will be printed
If the length = 0 , CurrentDate() will be printed.


DateToStrPicture( DUEDATE , 'S' ) doesn't make a lot of sense - the 'S' should be something like 'dd/MM/yyyy' , as 'S' is usually just 'S'econds.



GuptaSteve

See us for all Gupta / Centura SQLWindows / SQLBase help at: https://www.banksidesystems.com/

RE: Editing QRP Date Field

(OP)
Thanks GuptaSteve for your reply.

I've done as you've said and added a dummy variable DATE_NULL as a string.

When I add my new formula I get the following error: ERR_PARMDATE: Paramater must be date input item or function.


Thanks Steve. It worked! I was so close, but didn't understand that the DATE_NULL was a variable. I can't thank you enough for your help.

Have a great day!
Stacy

RE: Editing QRP Date Field

ps If you need any manuals e.g ReportBuilder go here:
Gupta Manuals
, download the appropriate version and open 'ReportBuilder.pdf'

GuptaSteve

See us for all Gupta / Centura SQLWindows / SQLBase help at: https://www.banksidesystems.com/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close