Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Version: Windchill 12.0
Use Case: We are trying to display Change Notice Summary Report with customizations from a Java class
Description:
Hello,
I am trying to display the OOTB Change Notice Summary Jasper Report which has some customizations, from a Java class. I am using the following code to load and then fill the Jasper Report:
String path= wthome+"/codebase/JasperReports/Change Management/Change Notice Summary Report.jasper";
path = URLDecoder.decode(path, "UTF-8");
System.out.println("Decoded path:"+path);
File f= new File(path);
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(f);
System.out.println("Report is loaded");
JRXmlDataSource datasource= new JRXmlDataSource("https://"+localURL+"/Windchill/servlet/ReportServlet?proc=com_ptc_windchill_enterprise_report_ReportTask%23ChangeNoticeSummaryHeader&contextOid="+contextOid+"&isDraft=" + isDraft +"&uid="+USERNAME+"&locale="+LOCALE,"/dataset/data/row");
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("contextOid", contextOid);
parameters.put("WINDCHILL_URL", localURL);
parameters.put("USERNAME", USERNAME);
parameters.put("LOCALE", LOCALE);
parameters.put("isDraft", isDraft);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, datasource);
The report is getting loaded but then it throws a MissingResourceException at JasperFillManager. The Change_Notice_Summary_Report.properties file is already present in the location- codebase/JasperReports/Change Management,
where the jasper file is also present.
Can someone please provide any hints for this? I have tried many different ways to resolve this but none worked. The error is attached in the screenshot.
Thanks and Regards,
Ramsha
Hi @RK_10805837
I would debug and stopped the aplication in the java.util.ResourceBundle.getBundle on the error specific row and check variables what exactly the method is trying to get.
PetrH
Hello @RK_10805837,
It looks like you have a response from a community member. If it helped you solve your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Community Moderation Team.