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)
Exception in maximo UI
vijay_kota
Hi All,
I am getting an exception while running the report in maximo.
In this report i am trying to save the report output in .doc format in some locatiom
I am able to save that perfectly.
But in the UI i am getting this exception
This exception is related to the dataSet which i have created.
Attcahing the stack trace here.
Please suggest me a solution
attaching the stack trace here
Find more posts tagged with
Comments
JasonW
Can you either cut and paste the whole exception from the dialog or the log file?
Jason
vijay_kota
Hi Jason,
I have uploaded entire stack trace in the above post....
or you expecting some other log file...?
JasonW
Sorry I did not see it. Got it now. Can you post he code for the datasource. You are getting a null pointer exception.
Jason
vijay_kota
Hi Jason,
i am using two datasets with single scripted datasource.
I have save report output in .doc format during run time.
i have set onCreate method for the same.
The output file is getting written in the perticular location, i dont have any problem in that.
But in maximo UI a i am getting exception above mentioned.
I am attaching all datasets open n fetch method code i am using along with onCreate
Thank you in advance.
JasonW
According to the stack trace the error is happening in the subdataset. Can you check for nulls?
importPackage(Packages.java.lang);
//need to import the maximo package
subDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
//check if the subDataSet is null
subDataSet.open();
var sqlText = new String();
sqlText = "select POLINE.POLINENUM,POLINE.DESCRIPTION,POLINE.ORDERUNIT,POLINE.LINECOST,POLINE.TAX1,POLINE.LOADEDCOST,POLINE.ORDERQTY,POLINE.ITEMNUM,POLINE.UNITCOST,(to_char(POLINE.REQDELIVERYDATE,'MM/DD/YYYY')) as REQDELIVERYDATE from poline " +" where poline.ponum='" +rows[0]["PONUM"]+"' " +" and poline.siteid = '" + rows[0]["SITEID"]+"' " +" order by POLINE.POLINENUM ";
subDataSet.setQuery(sqlText);
Jason
vijay_kota
Hi Jason,
This perticular report is working fine in BIRT.
If i dont use onCraete method , then its working in maximo also.
But i have to write a piece of code to save the report in server drive with doc format.
JasonW
Understood. I wonder if there is a classpath issue in Maximo when you are looking for the MXReportDataSetProvider class.
Jason
vijay_kota
Hi Jason,
The same report works fine if i am not adding onCreate even handler.
The Problem is on SubdataSet only...
But i amm not getting where exactly it is causing trouble...
JasonW
What does the onCreate code do?
Jason
vijay_kota
Hi Jason,
It will save report output in .doc format into a perticular location...
JasonW
Why is that in an onCreate? Can you post the code?
Jason
vijay_kota
Hi Jason,
This is the code...
I am still getting that exception...
importPackage(Packages.org.eclipse.birt.report.engine.api);
var re = reportContext.getReportRunnable().getReportEngine();
//var des =re.openReportDesign(reportContext.getDesignHandle().getDesign());
var des =re.openReportDesign("G:\\Maximo setup Document\\Prepare Word Document_TBU.rptdesign");
var ntask = re.createRunAndRenderTask(des);
ntask.setParameterValue("Contract Types", params["Contract Types"].value );
ntask.setParameterValue("where", params["where"].value) ;
var options = new EXCELRenderOption();
var outputfile = "G:\\DOCLINKS\\Attachments\\"+row["PONUM"]+".doc";
options.setOutputFileName(outputfile);
options.setOutputFormat("doc");
ntask.setRenderOption(options);
ntask.run();
ntask.close();
JasonW
Is there any chance you could try to do it in script? Just as a test? Something like:
importPackage(Packages.org.eclipse.birt.report.engine.api);
var re = reportContext.getReportRunnable().getReportEngine();
var des = re.openReportDesign("c:/xfer/burstdetail.rptdesign");
var ntask = re.createRunAndRenderTask(des);
ntask.setParameterValue("CustomerNumber", this.getRowData().getColumnValue(0).toString() );
var options = new PDFRenderOption();
var outputfile = "c:/temp/test" + this.getRowData().getColumnValue(0) + ".pdf";
options.setOutputFileName(outputfile);
options.setOutputFormat("pdf");
ntask.setRenderOption(options);
ntask.run();
ntask.close();
Jason
vijay_kota
Hi Jason,<br />
<br />
i am using the same code in table onCreate method...<br />
<br />
I am getting output in BIRT.<br />
<br />
But when i deploy that in maximo, the sub dataset is catching exception.<br />
<br />
In subdatset maximo passing null. its not recognizing it at all....<br />
<br />
This i came to know when i see the syetemout.log.<br />
<br />
The sub dataset is fetching value from POLINE.<br />
<br />
Which i have to use.<br />
<br />
Can you suggest please suggest some work around so that i can try that...<br />
<br />
Since it is in very <strong class='bbc'>critical state</strong> ,please help me to resolve this issue...
JasonW
What is null when the report is deployed to Maximo?
Jason
vijay_kota
The Query in the subDataSet is passed null eventhough there is no error in the open method..
Jason i am binding subDataSet with maindataset in SubDataSet open method only...
My question is do i have to bind somewhere else along with this..? i mean to say when you double click on datasets you will get "Edit dataSet " window..do i have to do some thing here
if yes how should i...?
please guide
JasonW
Do you have the capablitily to setup some kind of placeware or live meeting to show the error. If so send me an email at jweathersby at actuate.com
Jason
vijay_kota
Hi Jason,
Thank you very much for your responses...
You mean kind of web ex session...
Yes , I can arrange that, in which you can see my screen .
Can you please tell me your available timing so that i can set a WEB EX session to show you where exactly i am getting the error in maximo...?
or can i mail you to the mail id you have given...?
Regards,
Vijay Kumar
JasonW
Email me and we can work out a time.
Jason
stuarts
I am impressed by the quality of information on this website. There are a lot of good resources here. <br />
I am sure I will visit this place again soon.<br />
<a class='bbc_url' href='
http://www.nortonyachts.com/wp-content/uploads/asa-104_bareboat_chartering.pdf'>bareboat
chartering</a>