Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » ROM element VariableElement changed from BIRT 2.3.0 -> 2.5.1 ?(Or How to create an new report element for BIRT framework?)
ROM element VariableElement changed from BIRT 2.3.0 -> 2.5.1 ? [message #510988] Fri, 29 January 2010 13:09
ta Mising name is currently offline ta Mising nameFriend
Messages: 16
Registered: July 2009
Junior Member
Hello BIRT team,

we created our own report item plugin which contains BIRT's rom element 'VariableElement' as a list attribute.
Our plugin.xml declaration looks like:

    <extension id = "myPluginId" 
            point = "org.eclipse.birt.report.model.reportItemModel">

        <reportItem
                class          = "my.report.item.FactoryClass"
                displayNameID  = "AlertsItemFactoryImpl.ITEM_NAME"
                extendsFrom    = "ReportItem"
                extensionName  = "myExtensionName"
                isNameRequired = "false">

            <property 
                    displayNameID = "Element.Variables" 
                    isList        = "true" 
                    name          = "variables" 
                    type          = "contentElement">
                <elementType name = "VariableElement" />
            </property>			
        </reportItem>
    </extension>


We use this report item to store filename and expression pairs as a list. Therefore the attribute 'name' of VariableElement may contain all kind of strings.
For instance a saved report design can look like:

        <extended-item extensionName="myPluginId" id="7">
            <property name="variables">
                <variable-element>
                    <property name="variableName">image1.png</property>
                    <expression name="value">true</expression>
                </variable-element>
                <variable-element>
                    <property name="variableName">image2.png</property>
                    <expression name="value">false</expression>
                </variable-element>
            </property>
        </extended-item>


This worked well vor BIRT 2.3.0, but since BIRT 2.5.1 we receive a problem. After loading the report design above the BIRT 2.5.1 report designer says "Error in XML Source Page must be corrected before other pages can be used.". It seems that now characters like ".", "/", """, "!", ";", "," may not be used as variable names anmyore. I guess the XSD of the report design has changed from BIRT 2.3.0 to 2.5.1.

This is a big problem for us then for now all our report designs are not compatible for BIRT 2.5.1 anymore.

I can imagin of two solutions:

1. There is a way to disable the explicit check of characaters of ".", "/", """, "!", ";", "," in attribute 'name' of VariableElement.
2. I create my own report element, for instance MyVariableElement which I can use instead of VariableElement.

For the second I approach I sadly don't know how to create a new rom element for the BIRT framework.
I noticed that the original VariableElement is defined in a file called: rom.def

	   
	<Element allowsUserProperties="false" canExtend="false" displayNameID="Element.VariableElement" 
	         hasStyle="false" isAbstract="true" isNameRequired="true" 
			 javaClass="org.eclipse.birt.report.model.elements.VariableElement" 
			 name="VariableElement" nameSpace="(ReportDesign, variableElement)" since="2.3"
	         xmlName="variable-element">
			 
		<Property displayNameID="Element.VariableElement.name" isIntrinsic="true" name="name" since="2.5" type="name" />  		
		<Property displayNameID="Element.VariableElement.value" name="value" since="2.3" type="expression" />
		
		<Property detailType="variableType" displayNameID="Element.VariableElement.type" name="type" runtimeSettable="false" since="2.5" type="choice"/>	
	</Element>


So for my problem I came up to two questions:

1. How can I disable the character check for attribute 'name' of the rom element 'VariableElement' ?
2. How can I create my own rom element which can be used as 'VariableElement' of the BIRT 2.3.0 release ?

Thank you very much in advance!

Best regards
Tobias



Previous Topic:PDF Table of Contents
Next Topic:Exception Parameter
Goto Forum:
  


Current Time: Sat Apr 27 02:08:30 GMT 2024

Powered by FUDForum. Page generated in 0.02820 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top