Home » Developer & Programmer » Reports & Discoverer » report expire (oracle 9i d2k)
report expire [message #601795] Mon, 25 November 2013 22:22 Go to next message
DUTTA@TARUN
Messages: 29
Registered: May 2013
Location: INDIA
Junior Member
hello,
In my company we give the reports for testing on the desktop as shortcut,i want the reports get expire after 5 days automatically,is this possible,if possible please tell the solution for that.

thanks.
Re: report expire [message #601797 is a reply to message #601795] Mon, 25 November 2013 22:32 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>In my company we give the reports for testing on the desktop as shortcut,i want the reports get expire after 5 days automatically
NOTHING ever happens "automatically" on any computer without prerequisite programming.
>(oracle 9i d2k)
above is totally obsoleted & unsupported software
What is the repository that keep track of every desktop shortcut, what it does & when it was created?
Simply put this request show vivid imagination & minimal computer knowledge & competence.
Re: report expire [message #601817 is a reply to message #601797] Tue, 26 November 2013 00:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option is to hardcode date into report's query, for example
select * from dept where trunc(sysdate) - date '2013-11-22' < 5;
so that it'll return results 5 days after that date. This is rather inconvenient because you might change your mind and let users test it for another 10 days so you'd have to modify report and distribute it to all your clients.

Therefore, you might create a database function (which would, basically, do the same - check whether 5 days have passed since some date) and call it from BEFORE REPORT trigger. If the result returned by function is unfortunate for the client, use SRW.PROGRAM_ABORT and terminate report execution. If you change your mind, it is easier to recompile the function (or, if it uses date(s) stored in some table, you don't even have to do that but just update tables' contents).
Re: report expire [message #601818 is a reply to message #601817] Tue, 26 November 2013 01:02 Go to previous messageGo to next message
DUTTA@TARUN
Messages: 29
Registered: May 2013
Location: INDIA
Junior Member
i have use this in before report trigger but its not working..
Re: report expire [message #601819 is a reply to message #601818] Tue, 26 November 2013 01:21 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Thank you very much for detailed explanation of what you did, what code you wrote, the way Oracle responded etc. It is now very easy to debug your code and point you into the right direction.
Previous Topic: Convert report to Excel File
Next Topic: How do I choose the option, the amount of 2 copies of the report?
Goto Forum:
  


Current Time: Thu Mar 28 03:26:24 CDT 2024