Getting odd errors when saving/running Jaspersoft ad hoc report. Why odd? Well, the ad hoc view works perfect - only when I try to save/run as a report do I get these errors:
- java.lang.illegalArguementException: resource id: RiskScore_1 does not exist
- exception getting data strategy
Google search and search of Jaspersoft site produced no applicable results.
Both errors are related to filters, which are based on calculated fields:
Odd that these filters work fine in ad hoc view, but then report says field doesn't exist or can't get a 'strategy' - maybe there's an error but these are the wrong messages?
Open to any ideas.
Can you please let me know what domain you are using and it looks like while creation its erroring out, which makes me think that a problem with the attribute but there are certain traces in Jaspersoft pertaining to Adhoc view and Domain and from there you can pin point the problem.
Hi Suman. I’m using the Project Domain.
It looks like there is some corruption with the domain and we might need to resyn the domain and see if that works
admin content-jaspersoft csk restoreDomains -userName superuser –password superuser
Suman - ad-hoc view and report run fine without the fields I created in the view used as filters. These created fields aren't part of the domain, correct? What would be the corruption in the domain that might cause this, then? And, why does it work in the view, but not the report?
In meantime, I've come up with a solution, by simplifying my ad-hoc filtering, which must simplify the resulting query.
Rather than converting Impact and Probability to numbers using two fields, multiplying the two fields in a third field and using this third field as a filter, I just do it all in one field:
New Risk Score = CASE("Risk Probability", 'High', 3, "Risk Probability", 2, 3) * Case("Risk Impact", 'High', 3, "Risk Probability", 2, 3)
Then filter on >=6.
Must be simpler. Works both in ad-hoc view and in report. Happy-happy!
In final version of report, would like to convert numeric "New Risk Score" back to text so that users can pick from simpler "High, Medium, Low" value list rather than remembering the numeric thresholds corresponding to each text value. Will try wrapping above formula in another CASE statement in order to keep it all in one field.
But this is good enough for now.
Thanks for the feedback - helps get ideas flowing.
are you on demand? If not, please have a look at the Jaspersoft logfiles, as the UI error messages are meaningless on purpose for security reasons.
Generally, I would like to remark that whereas adhoc views can handle empty result sets, the adhoc report will throw an error if no data is found.
I hope I could help
for us it was an object attribute, that was unflagged from being synched to the DWH,
thus the error "exception getting data strategy" occured.
The jaspersoft.log made the cause obvious, after flagging and loading the DWH the reports worked again.