If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Ingres Report Writer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-03, 05:01
sweevo sweevo is offline
Registered User
 
Join Date: Oct 2003
Location: UK
Posts: 9
Ingres Report Writer

Hi,

I was wondering if anyone could help me...

In Ingres Report Writer, how do you prompt a user for an input value, but default to something should they enter blank? In particular, I want to prompt for a date, but default to today's date if blank...

I've tried the following in the .DECLARE section:

indate = date with prompt "Enter date (leave blank for today's date):" with value current_date

which doesn't seem to work.

Incidentally, is it possible to not allow a user to enter a blank input?

Any help would be appreciated. Thanks.
Reply With Quote
  #2 (permalink)  
Old 11-04-03, 10:09
sparkz sparkz is offline
Registered User
 
Join Date: Nov 2003
Location: UK
Posts: 2
Hi,

You appear to have correct syntax, try changing current_date to date('today').

Or, in your header section or where-ever else you print the first data, do

.if indata = '' .then
.let indata = current_date
.endif

I do not think you can force the user to actually enter something when prompted by report writer, life would be too easy if we could control users!

Regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On