[ https://issues.apache.org/jira/browse/OFBIZ-5297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756500#comment-13756500 ]
Taher Alkhateeb commented on OFBIZ-5297: ---------------------------------------- Hi gentlemen, I am not sure if this might help because I'm not sure what is meant by "not done yet" if it means non-existent report or no data fetched? Anyway I think pretty much birt reports are scripted in three event methods in OFBiz: * initialize: you setup the birtParameters passed in here and do other basic stuff * open: you execute the query (using Delegator or a service or whatever) * fetch: you retrieve one row and populate your data-set. The problem occurs on the fetch method. When the first record of your result is empty, fetch immediately returns false and nothing is rendered on the screen, hence you get this blank report, or depending on the report design and how you bind the data to the table, it might render partial results or stuff like that. I did not check this report specifically. I think there are some solutions for such surprises, and I list them here for sharing thoughts: * you surround your fetch portion with try/catch blocks. Then, if data retrieved is empty, you populate an error message variable which is rendered conditionally in the report (perhaps with dynamic text). * you create an if condition before execution perhaps in onPrepare method to check for table existence / count and display an error in the generated report if empty. This takes more coding and processing time, but might be faster on failure. In the first solution you might have the shared library (discussed earlier) handle all missing data with one function that populates shared error variables in all BIRT reports in OFBiz. Again I would like to tackle this after changes in this issue are committed so I can build on top of it instead of merging conflicts. If you have other thoughts to guide me it would also be great. > Order Report Issue > ------------------ > > Key: OFBIZ-5297 > URL: https://issues.apache.org/jira/browse/OFBIZ-5297 > Project: OFBiz > Issue Type: Sub-task > Components: order > Affects Versions: Release Branch 11.04, SVN trunk > Reporter: Parimal Gain > Assignee: Jacques Le Roux > Labels: Birt > Fix For: SVN trunk > > Attachments: Last3MonthSalesReport.PNG, OFBIZ-5297-11.04.patch, > OFBIZ-5297-Trunk.patch > > > Reports under Order component has following issues - > 1. Following reports are not showing any records due some issue > a. Last three month sales report. > b. Sales report. > c. Sales Order discount code report. > d. Product demand report. > 2. Inconsistency in opening the pdf report - some reports are opening in new > tab window but some are in the same window. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira