Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reports with prompts scheduling in CE 2

Status
Not open for further replies.

CEAdmin9

Technical User
Feb 3, 2005
2
US
Is there a way to modify the report prompts to be able to run on Demand and answer the prompt, and Scheduled in CE that will ingore or(i.e. set the prompt to current date)?
 
IIRC, if you use a Date type parameter ( or Number) it may not be possible to set a default value that will eliminate the prompt..If you use a String type and use the Date(string} function to handle it, then you can use an If test to determine if some default date should be used..

Code:
If trim({?StrDateParam}) > 0 
then
{table_datefield} = Date({?strDateParam})
 else
If trim({?StrDateParam}) = 0 then
{table_datefield} = CurrentDate

I am not sure about this avoiding the prompt, but I think it will

[profile]
 
I believe that the date prompt defaults to the current date in CE.

This seems to be asking that it do this whether scheduled or View on demand "run on Demand and answer the prompt, and Scheduled in CE", is that the intent?

I often design reports so that they have a default value, and if the user skips by the prompt or does finishes before that prompt it keys off of it.

For dates I set a default value of 1/1/1970, for numbers either 0 or -99999 or some such.

You can then have the parameter prompt display only the description (setting when creating the default) if you'd like and the user never knows what the default is as the description just says select this for all.

An example of defaulting to currentdate might be to have a default of 1/1/1970 and in the record selection formula use:

if {?mydateprompt} = cdate(1970,1,1) then
{table.date} = currentdate
Else
{table.date} = {?mydateprompt}

-k

-k
 
My intent is to prevent duplicate reports created because the developer doesn't build the report capable of running in either environment.

I understand that CE defaults dates, that was a base example. I want to help them make the reports as flexible as possible and not inhibit the prompts for users who don't have schedule rights.

Thanks for both responses they have helped!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top