Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » how to delete temprory file when report is finished created (Is It Possible to do this?)
how to delete temprory file when report is finished created (Is It Possible to do this?) [message #718343] Wed, 24 August 2011 03:36 Go to next message
cbr125x  is currently offline cbr125x Friend
Messages: 34
Registered: July 2011
Member
i have a web application. with that web application i call BIRT Report which BIRT in running under tomcat server. i found that Viewer create temporary report in
"TomcatInstall\webapps\BIRT-Viewer\documents\".
How do i delete this temporary file when report is finished created so i won't make the space in the harddisk full?

i already use parameter __clean and __overwrite, but nothing is changed.
the url "http://localhost:8080/birt-viewer/frameset?__report=test.rptdesign&__clean=true" or
"http://localhost:8080/birt-viewer/frameset?__report=test.rptdesign&__overwrite=true"

I use :
- Eclipse Helios 2.6.1 (i made BIRT report in here)
- Tomcat 6
- BIRT Runtime 3.7

Thanks

[Updated on: Thu, 25 August 2011 03:02]

Report message to a moderator

Re: how to delete temprory file when report is finished created [message #719254 is a reply to message #718343] Fri, 26 August 2011 14:04 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This should happen automatically when the session expires or the viewer
is restarted.

Jason

On 8/23/2011 11:36 PM, cbr125x wrote:
> i have a web application. with that web application i call BIRT Report
> which BIRT in running under tomcat server. i found that Viewer create
> temporary report in "TomcatInstall\webapps\BIRT-Viewer\documents\".
> How do i delete this temporary file when report is finished created so i
> won't make the space in the harddisk full?
> I use :
> - Eclipse Helios 2.6.1 (i made BIRT report in here)
> - Tomcat 6
> - BIRT Runtime 3.7
>
> Thanks
Re: how to delete temprory file when report is finished created [message #719831 is a reply to message #719254] Mon, 29 August 2011 07:10 Go to previous messageGo to next message
sam va is currently offline sam vaFriend
Messages: 121
Registered: July 2011
Senior Member
we created a java timer task to do this. You can configure the time

Thanks
Re: how to delete temprory file when report is finished created [message #722192 is a reply to message #719831] Mon, 05 September 2011 02:18 Go to previous messageGo to next message
cbr125x  is currently offline cbr125x Friend
Messages: 34
Registered: July 2011
Member
Hi Sam,
can u tell me how to create java timer task?
i googling, and have example like below :
import java.awt.Toolkit;
import java.util.Timer;
import java.util.TimerTask;

public class ReminderBeep {
Toolkit toolkit;

Timer timer;

public ReminderBeep(int seconds) {
toolkit = Toolkit.getDefaultToolkit();
timer = new Timer();
timer.schedule(new RemindTask(), seconds * 1000);
}

class RemindTask extends TimerTask {
public void run() {
System.out.println("Time's up!");
toolkit.beep();
//timer.cancel(); //Not necessary because we call System.exit
System.exit(0); //Stops the AWT thread (and everything else)
}
}

public static void main(String args[]) {
System.out.println("About to schedule task.");
new ReminderBeep(5);
System.out.println("Task scheduled.");
}
}

is the example above is java timer?
sorry, i'm new in java

sam wrote on Mon, 29 August 2011 03:10
we created a java timer task to do this. You can configure the time

Thanks

Re: how to delete temprory file when report is finished created [message #722201 is a reply to message #722192] Mon, 05 September 2011 03:43 Go to previous message
sam va is currently offline sam vaFriend
Messages: 121
Registered: July 2011
Senior Member
Replace the following code

System.out.println("Time's up!");
toolkit.beep();
//timer.cancel();
System.exit(0);

with your code. Your code needs to scan thru the temporary directory (where the documents are created - Web Viewer setting) and delete them.

Thanks
Previous Topic:IReportContext
Next Topic:PieChart: All zero/null values
Goto Forum:
  


Current Time: Thu Apr 18 04:42:35 GMT 2024

Powered by FUDForum. Page generated in 0.02087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top