Hi
In initialize method of the BIRT report,
importPackage(Packages.java.io);
out = new PrintWriter(new FileWriter("c:/finance.txt", true));
out.println("Entering FinanceReport.initilize");
var session = reportContext.getHttpServletRequest().getSession();
var mytype = session.getAttribute("type");
out.println(mytype);
out.close();
when i preview the report, it gives me errors:
The following items have errors:
ReportDesign (id = 1):
- There are errors evaluating script "importPackage(Packages.java.io);
out = new PrintWriter(new FileWriter("c:/finance.txt", true));
out.println("Entering FinanceReport.initilize");
var session = reportContext.getHttpServletRequest().getSession();
var mytype = session.getAttribute("type");
out.println(mytype);
out.close();":
The choice of Java constructor println matching JavaScript argument types (null) is ambiguous; candidate constructors are:
void println(java.lang.String)
void println(java.lang.Object)
void println(char[]) (/report/method[
@name="initialize"]#9)
birt.core.JavascriptCommonError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "importPackage(Packages.java.io);
I saw other threads around this same topic... but all those had another package being imported.
I am just using one package java.io which is present in JDK/JRE. I have checked if it is included in the application. I am using MyEclipse for making this report and it has included java.io package. So I need not add the jar in WEB-INF/lib directory specifically.
But I am getting the error about the package.
I would be grateful if somebody could help me.
Thanks
Neeti