Handle null parameters in reports (yarg)

Hi there,
looking for a way to specify sort of like default values in reports.
I.e. having null value in DataBand I need to put down N/A for example in report.
Any ideas? Custom formats will work, but that’s another story - the absense to plug in your custom formatter is terrible to be honest.

Moreover, it looks that we have a requirement to provide ability to change to default values in templates.

BTW, we are implemented external API dataloader for YARG, is anyone interested in PR?

BR,
Ilia Rodionov.

HEY!
For sqldataset
(For example, MsSQL)
SELECT ..., ISNULL(<column>, 'N/A'),... FROM ...

Thanks, it works, but we load data from an external REST API (of, course, we can transform JSON in some way) and want to give template writers the ability to set default null values.

And if you try to use proxy classes with such a parser logic

@JsonProperty(“some-value”)
public String someValue = “default-value”; <-N/A

@JsonSetter(“some-value”)
public void setSomeValue(String s) {
if (s != null) {
someValue = s;
}
}

Thanks!
At the time we don’t have niether DTOs nor any other Java bindings (in a reporting microservice).
And this approach also doesn’t allow template writers to alter the values.

Regards,
Ilia.

Ilia, what datasource is used?

Kirill, as I wrote we use a custom implementation of a data loader which uses external REST API to extract data and Grouvy loaders to process responses if needed. But the point is not to modify data itself but rather to provide a way to TEMPLATE AUTHORS to set “null values”.

I want to clarify my question.
Actually it’s about having something like that: ${Band.parameter:N/A or sth else to use when there is no value} in YARG

Hi again! Any ideas, fellas?

Well, it looks as though nobody is interested in but me. Happy New Year :wink: and may be are there any thoughts on topic? Thanks in advance.

Is this topic still present at the forum?