hi all,
I write below code in script .
importPackage( Packages.java.io );
importPackage(Packages.java.text.SimpleDateFormat);
outFile = new FileWriter("../sandfilelogtoday.txt");
out = new PrintWriter(outFile);
sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss:ms");
out.println(sdf.format(new Date()).toString()+"-- intializern");
out.close();
when i run this report it will get below error
ReportDesign (id = 1):
- Unhandled exception when executing script.
Caused by: org.eclipse.birt.core.exception.CoreException:
There are errors evaluating script "importPackage( Packages.java.io );importPackage(Packages.java.text.SimpleDateFormat);outFile = new FileWriter("../sandfilelogtoday.txt");out = new PrintWriter(outFile);sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss:ms");out.println(sdf.format(new Date()).toString()+"-- intializern");out.close();"
Function importPackage must be called with a package; had "[JavaClass java.text.SimpleDateFormat]" instead. (/report/method[
@name="initialize"]#2).
what should i do, please help soon
sandeep