Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
write log file through birt script
sandeepBha
hi all
I want to write current date time in log file from afterRender script.
a file is created but it is blank nothing is written in this file.
i am using following code in script tab :
importPackage( Packages.java.io );
var log = FileWriter("Clogfile.txt");
log.write(new Date().getTime()+"-- intializern");
reportContext.setGlobalVariable("logWriter", log);
when i open this logfile its blank.
can you tell where i have done mistake..
please help soon
sandeep
Find more posts tagged with
Comments
JasonW
Sandeep,
Can you use a different name other than log? Should not matter but try anyways. Also I have done it this way in the past:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/pgevents.txt", true ) );
out.println( "test");
out.flush();
out.close();
Jason