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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing Prompts

Status
Not open for further replies.

TonyCronin

Programmer
Jul 16, 2001
47
GB
I have a report that we have been using that uses prompts in the condition section to filter the data - in this example the user enters a from date and a to date.

I am now looking to schedule these reports automatically and would like the report to run automatically and use system date to calculate say - the last month - 01/01/2003 until 31/01/2003.

Do I need to set variables up in universe?, can I parse result of currentdate function? Any advice would be gratefully recieved.
 
You could add a macro in VB to be run before_refresh, in which you could calculate dates and fill prompts. Stick to your guns
 
Yes, you could go the VB route, but why?

You could simply create a pre-defined condition in your report that does the date ranges.

Odds are that you use a single BO ID for scheduling your reports. You could build a predefined condition that you can add to your report.

(BOUSER ='xxxx' AND Date=whatever code you need for current month )
OR
(BOUSER <> 'xxxx' AND Date=Prompt) Steve Krandel
BASE Consulting Group
 
Thanks for help.. the bit I am struggling with is the

'Date=whatever code you need for current month'

I am unsure of syntax... I am trying to schedule last month.. I have had trouble doing it by adding a Condition in the Query Panel so I added a filter on the report..

=<Month> = Month(CurrentDate())

This works ok for this month but I can filter down to last month....

 
Got it..

Create a new variable MonthNumberofYear <Date> and filter on MonthNumberofYear <Date> = MonthNumberofYear <CurrentDate> - 1

I was a bit slow... maybe this will help someone else who wants to report on a previous months figures.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top