javareportbirtbirt-emitter

Passing blank string as report parameter BIRT


I am using BIRT 4.3 in my Java application.

I am passing report parameters from a Java class to BIRT, and then I am displaying those parameters in the final(output) report.

If a value I am passing is null, then I want to pass blank string "" as report parameter like this

map.put("NAME", salesLocBean.getName() == null ? "" : salesLocBean.getName().toUpperCase());

But BIRT does not seem to like that, some times it complaints that X parameter is blank and sometimes it runs fine but screws up the UI.

I have tried passing string with spaces like this '" "' but BIRT treats them as blank strings.

So how can I pass blank String "" as report parameter to BIRT.


Solution

  • You could set the parameter to a "changeMe" value und replace it with an empty String "" on the place where it is displayed in the report if it has the "changeMe" value. Compare my answer to this question. You can just leave the field for the displayed value blank.