Provide diagnostics for reporting module

I spent a lot of time the past weekend trying to get my reports working (not there yet). Because there is no way (that I know of) to see what data is actually available I had to actually debug into the cuba framework code.

Clearly this is a no-go, this ruins the whole idea of a declarative reporting solution.

I noticed that when starting a report through the wizard you get a “freebie generated template”. At least this gives some feedback and idea on what data there is available. But there is no option to regenerate that report.

Any CUBA application has Help > Data Model main menu item by default, which generates an HTML with the description of the whole application model. It can help a lot when creating reports.

Or do you mean something different?

Hi @knstvk
While that is a good general tip, it is not what I mean.

if you make a new report using the wizard there is automatically a report template genreated by e.g.
com.haulmont.reports.wizard.template.generators.DocxGenerator

This at least gives some idea of what path expressions are valid. It is not always clear after adding datasets and bands of different types what fields/data you can actually use. But this option is not available on creating a new report or after the wizard has ended. I also don’t know how it would behave for other datasets, but I reckon it should be possible.

Another thing that could be useful is to save some diagnostics after running a report. A report report let’s say :slight_smile:

eg. you used ${restaurant.waiter.address.strUUt.name} -> No field “strUUT” found on type Adress

Of course I don’t want it to throw exceptions, since a lot of paths could be null.

At this moment I’m debugging into the dataloaders, looking at the hashmaps to see what data is available. This is the only way i can see why my reports are (half) empty.

You have to imagine that my goal is that IT savvy users should be able to design their own reports based on examples, training and the documentation about the data model. Obviously I can’t give them a debugging session.

and when I say goal I mean requirement.

When we evaluated different platforms last year the report designer was one of motivators for choosing cuba. It was investigated superficially to see if meets our demands. Now we started designing the first real reports and we are running into quire a few problems.

I have created an issue: Provide diagnostics after running report · Issue #175 · cuba-platform/reports · GitHub, would be great to see your comments there.