Hello all,
We are trying out a new system for managing our Jasper reports. We have a set of default subreports that on some occasions a specific client wants to override and use another format. What I'm trying to do it setup a "Reports" folder that contains the top-level reports with two subfolders within there called "Client" and "Standard". What I want to do is setup the Subreport Expression to first look at the Client subfolder for a specifically named file and if it doesn't exist, go to the "Standard" subfolder and pull the standard named file. This is my code in the Main Report (located in the Reports folder) to set up the condition so far but it always returns false:
new Boolean(new File($P{SUBREPORT_DIR}+"\\Client\\"+"InvCover_subInvoiceInfo_ABCD.jasper").exists())
The SUBREPORT_DIR parameter is set to "./", but I've used ".\\" with no success. I have confirmed that the file does exist in that folder, so I don't know why it's coming back as false. I have tried setting up variables to add the subfolder name to SUBREPORT_DIR, but again no success. Any ideas? Thanks.