PDA

View Full Version : ReportPropertyFunction question



Anonymous
06-11-2002, 01:33 AM
How is ReportPropertyFunction supposed to be used?
I tried

generator.parseReport(...)
report.setProperty("myproperty", "Hello world!")
report.setData(...)

in my program and

<string-function .... function="myfunction"/>
...
<functions>
<function name="myfunction"
class="com.jrefinery.report.function.ReportPropertyFunction">
<properties>
<property name="reportProperty">myproperty</property>
</properties>
</function>
</functions>

in my report, but the field referencing the function remains empty.
If I replace myproperty with the prefefined report.date, I do get the date though,
(without having to set it in my program).

Anonymous
06-11-2002, 07:17 AM
Hi,

you are using the function the right way, but ReportState does not copy the ReportProperties from the JFreeReport-object into its starting state. A bug is issued at SourceForge, and gets fixed today in the cvs.

The report.date is filled after the Start-State s created, and thats the reason that this property is visible and the others aren't.

Have more fun,
said Thomas

Anonymous
06-11-2002, 01:35 PM
Fixed!

Use the cvs sources to get a bugfree version.

Have more fun,
said Thomas