Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
CSV dataset and report parameters
cypherdj
Hi,
I have built a report using CSV datasets. The report has a date parameter used to filter the CSV data (reportDate - 1 year -> reportDate).
The report then builds a datacube from the resulting dataset.
However, when the parameter date is lower than the lowest date in the CSV file, there is no matching data, as expected. This causes a DataException to be thrown, but I cannot catch this from the IRenderTask.render() call. Instead, I tried catching the EngineException that render throws according to the API spec. But this does not catch the exception either! Looks like the exception is reported only in the actual HTML that is generated.
Any idea how I could handle this error more gracefully and display my own error message?
Thanks,
Cedric
Find more posts tagged with
Comments
cypherdj
Ok, I've found that IRenderTask has a getErrors() method that returns a List.
I can then iterate through this list and if I get a DataException with message starting with "/olap/cube_" and ending with " doesnt exist", then there was a problem with my datacube.
I can then throw a new EngineException with my own error message and handle that more gracefully than just showing the exceptions in the report iframe.
Strangely, the error list after IRunTask is not that relevant or informative "DateTime {0} is invalid" so I cannot use this to decide what to do.
Hope that helps anyone having similar problems,
Cedric