In a jasper report, with iReports Designer one can set the Report Name to some value (in iReports, this is on the most top node in the report inspector).
How can the val
The answer from Alex K is correct. I just want to add additional information on how to do this in Jasper Scriplets as it might help people finding this answer:
String nameOfReport = ((JasperReport)getParameterValue(JRFillParameter.JASPER_REPORT)).getName(); // Name of report
String fullReportUnitPath = ((JasperReport)getParameterValue(JRFillParameter.JASPER_REPORT)).getProperty("ireport.jasperserver.reportUnit"); // path to report unit
// for getting the folder name above the report file a.k.a reportunit
int indexOfLastPathSlash = fullReportUnitPath.lastIndexOf("/");
String nameOfReportUnit = fullReportUnitPath.substring(indexOfLastPathSlash+1);