report expire [message #601795] |
Mon, 25 November 2013 22:22 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/b03bf446510618bc2c423b08a9e091c8?s=64&d=mm&r=g) |
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 #601817 is a reply to message #601797] |
Tue, 26 November 2013 00:57 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 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 #601819 is a reply to message #601818] |
Tue, 26 November 2013 01:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 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.
|
|
|