Custom Report Property

View: New views
1 Messages — Rating Filter:   Alert me  

Custom Report Property

by Alex Boisvert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'd like to add a custom (user-defined?) property to a report.  e.g.,

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.15" id="1">
    <property name="createdBy">Eclipse BIRT Designer Version 2.2.1.r221_v20070924</property>
    <property name="comments">Copyright (c) 2007 bla bla blah</property>
    <html-property name="description">Some report descrition</html-property>
    <text-property name="displayName">My beautilful report</text-property>
    <text-property name="customProperty">foo</text-property>  <!-- NEW CUSTOM PROPERTY -->
...
</report>

I can currently access the "description" and "displayName" properties using this code,

   IReportRunnable design;
   design = birtReportEngine.openReportDesign(reportFile);
   String description = (String) design.getProperty("description");
   String displayName = (String) design.getProperty("displayName");

but doing the same for my "customProperty" doesn't work,

   String customProperty = (String) design.getProperty("customProperty");

Anybody can point me towards something that would work?

thanks,
alex