How do I add variables to dynamic text in Report Designer?

I have a couple variables in my workflow. Let’s call them var_1 and var_2.

Now I’m trying to add these to dynamic text.

I have tried the following:

BirtStr.concat("Some text here ", params["var_1"].value)

However I am getting the notification that the parameter doesn’t exist. Is there a step that I am missing?

I personally find it much more flexible and intuitive to create dynamic messaging in KNIME workflow and then pass them to BIRT in their own columns.

Customizing messages always gets adjusted over time. Keeping it within KNIME dramatically simplifies the process and opens up more possibilities.

1 Like

If you want to keep it in BIRT, then here is an excerpt from the KNIME Birt guide…

Finally, add a title for our report based on BIRT’s dynamic text feature. This will allow you to change the text in the title based on the ZIP Codes defined in the global workflow variables used to build the report. To do this, drag a Dynamic Text icon from the Report Items panel below the chart you just made. This opens an Expression Builder dialog. Here you will use BIRT’s concatenate function to combine some static text with the values of the workflow variables. Notice that the static text is contained within quotes, while the workflow variables are referenced as parameters within square brackets. Enter the text shown in the figure below into the Expression builder, and click OK.

Perhaps ensuring that it is present in the “global workflow variables” is the missing step, or if you typed it manually then try using the expression builder to select from available parameters to avoid name mismatching errors.

1 Like

Thank you,

I’ll try this solution and see if it doesn’t impact performance too much.

Doing it within KNIME shouldn’t negatively impact performance. I calculate the dynamic messages off to the side of the main workflow and pass them all over to BIRT via a separate 1 row table.

There is added flexibility since blank values remain invisible and missing values can collapse BIRT report table areas, which allows you to only make messages and size adjustments visible conditionally when applicable. You can also setup a calculated columns that are just used to toggle conditional formatting.

1 Like

Thanks I tried this method and it works perfect and is super easy to do.

Thanks again!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.