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

Impromptu Filters

Status
Not open for further replies.

mjcotter

Programmer
Jul 9, 2001
66
US
Does anybody know of a way to automate the setting of filters in Impromptu?

For example, I have roughly 1600 identical IMR's. The only difference is 1 filter, which is a month sequence. Currently, I am manually opening each IMR and editing the month sequence field in the filter.

Is there any way to write an Impromptu script to do this???

I would appreciate any help, as I do believe I am developing Carpal Tunnel from all of the mouse clicks!

Thanks.
 
mj,

Is the month driven by the date the report is run? If so, you could change the filter to a hard code of Month(now) to get the same result without the prompt.

Regards,

Dave Griffin
 
Is the month progressive if so you could use a filter similiar to the following:

month(curdate()) = month(curdate())-1

you could also substring the current date to get noth and then sit a filter on top of that.

Hope this helps,

Adam.
 
Good info, thanks. However, the month sequence we are using does not correspond to the date. It is an integer value ranging from 01 to 36. Basically, it corresponds to the 36 months of data that we will always have on our DB at one given time. So, currently we are hard-coding the filter MONTH_SEQ='01' or MONTH_SEQ='02' up to MONTH_SEQ='36'. It would be great if you could write scripts in Impromptu like the MDL scripts in Transformer.
 
Could you use an If Then Else statement???

What is exactly you want your filter to do? Is is dependant on current date? ie, use month_seq='01' if the current month is january?

Adam.
 
mj,

There is no OLE automation to change filters in reports (as opposed to in catalog userclasses, which can be done). I'm unclear as to how the 1600 reports are used. Do you run them only once after changing the filter and distribute the output? Or do you change the filters, and then the reports are run ad-hoc by other end users.

In the second case, I don't see a way to help you. If you are changing the filters and then running them for output once in a controlled environment, you have the option of creating a macro that imports the report names from a directory into an array, reads a month number filter value from a plain text file using low-level file i/o options in the macro language, and then passing that month value to the report filters via a prompt. As each report runs you can automate either printing the output or saving the output to Excel or PDF format.

I hope this helps, but I suspect that you are dealing with the latter case.

Regards,

Dave Griffin :)
 
Has this been resolved...I'm in the latter situation.

I need a way to have a hard-coded filter in a report and save it for later use. Sort of like an ad-hoc report.
For example:
The user pics the fields they want, then chooses how they want the report filtered (which column, which field etc...). This report has to be saved (without a stored filter???) and used for scheduling. If anyone has an resolution to the initial thread please let me know.

Thanks.
Chargrams...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top