I have monthyear for column dimension and modelnames for row dimension. I need to display all monthyears and modelnames regardless if a modelname was used for that monthyear. In order to accomplish this, I did outerjoin in my dataset. I was able to accomplish this however, there is an extra blank column and blank row in the generated report. I was able to remove this also by using the following code:
if(cellInst.getDataValue("MONTHYEAR") == ""){
cellInst.getStyle().setDisplay("none");
}
if(cellInst.getDataValue("MODELDESCRIPTION") == ""){
cellInst.getStyle().setDisplay("none");
}
Thus, the extra blank column and blank row was removed. However, when I tried to export to excel, the blank column and blank row still shows. When I export to pdf, only the blank column shows.
I even tried this in onRender(), however nothing happens
if(cellInst.getDataValue("MONTHYEAR") == ""){
reportContext.getDesignHandle().getElementByID(cellInst.getCellID()).setStringProperty("width","0px");
}
if(cellInst.getDataValue("MODELDESCRIPTION") == ""){
reportContext.getDesignHandle().getElementByID(cellInst.getCellID()).setStringProperty("width","0px");
}
Please advise.