How to evaluate an expression in a custom report item

Options
sforbes
edited February 11, 2022 in Analytics #1
Hi,

I've written a custom report item and I'd like to start making some of its properties settable via report parameters, which I'm guessing means making them expressions. I've done this and have made the necessary UI changes, but I can't figure out how to evaluate the expressions when generating my output.

Is there something I can get a reference to in my ReportItemGeneration or ReportItemPresentation classes so that the report designer can specify something like 'params["scale"]' at design time and then I can evaluate it to get the value of the scale parameter that the user provides at runtime?

I can do it if the item is embedded in a data set, because the row set passed to my ReportItemPresentation class has an 'evaluate' method, but I can't see how to get a reference to something that'll allow me to call an 'evaluate' when outside of a data set.

Thanks,
Shaun