Change library inheritance in rptdesign [message #1028603] |
Thu, 28 March 2013 13:37 |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
Hi,
when working with libraries in my project, it is often not very intuitive to understand which elements of a report (element) are inherited from the library and which are not. I know that one can partly check that in 'Property Editor' -> 'Advanced' but there it is for example not visible (or configurable) if a chart script should be inherited from the element's library equivalent, or if I want to define (override) it in the report.
Thus I thought it may be easier to mess around with the xml source. But there, for me it is not clear how it is defined which elements are inherited and which are not. I discovered that for a table in my report there is a node called <overridden-values> which looks e.g. like this:
<overridden-values>
<ref-entry baseId="146" id="146"/>
<ref-entry baseId="148" id="148"/>
<ref-entry baseId="157" id="157">
<expression name="keyExpr" type="javascript">row["ARG"]</expression>
<list-property name="sort">
<structure>
<expression name="key" type="javascript">row["CHART_ORDER_PRIORITY"]</expression>
<property name="direction">asc</property>
<property name="strength">-1</property>
</structure>
</list-property>
<property name="groupName">argGroup</property>
</ref-entry>
<ref-entry baseId="158" id="158"/>
<ref-entry baseId="160" id="160"/>
<ref-entry baseId="165" name="Chart1" id="165"/>
<ref-entry baseId="161" id="161"/>
<ref-entry baseId="163" id="163"/>
<ref-entry baseId="149" id="149"/>
<ref-entry baseId="151" id="151"/>
<ref-entry baseId="152" id="152"/>
<ref-entry baseId="154" id="154"/>
<ref-entry baseId="156" id="156"/>
</overridden-values>
I wanted to understand what it means and checked the XSD file which is referred to in the xml header:
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
In this XSD, <overridden-values> is not even a valid element. Validation against the XSD give the following:
Cvc-complex-type.2.4.a: Invalid Content Was Found Starting With Element 'overridden-values'. One Of '{"http://www.eclipse.org/birt/2005/design":property, "http://www.eclipse.org/birt/2005/design":expression, "http://www.eclipse.org/birt/2005/design":xml-property, "http://www.eclipse.org/birt/2005/design":ex-property, "http://www.eclipse.org/birt/2005/design":list-property, "http://www.eclipse.org/birt/2005/design":structure, "http://www.eclipse.org/birt/2005/design":method, "http://www.eclipse.org/birt/2005/design":simple-property-list, "http://www.eclipse.org/birt/2005/design":text-property, "http://www.eclipse.org/birt/2005/design":html-property, "http://www.eclipse.org/birt/2005/design":header, "http://www.eclipse.org/birt/2005/design":group, "http://www.eclipse.org/birt/2005/design":detail, "http://www.eclipse.org/birt/2005/design":footer, "http://www.eclipse.org/birt/2005/design":column}' Is Expected.. Line '166', Column '32'.
Cvc-complex-type.2.4.a: Invalid Content Was Found Starting With Element 'property'. One Of '{"http://www.eclipse.org/birt/2005/design":scratch-pad}' Is Expected.. Line '4135', Column '36'.
Validated on http://www.freeformatter.com/xml-validator-xsd.html
And for other report elements such as datasets, charts etc it also not very obvious to understand which values are overridden, which are not. And especially how do I set that a library element should not override a specific attribute, but instead use the implementation from the library? I know that I can reset the whole element to library default, but that kills every single change, although I just may want to reset one single chart script or so...
Could you please point me to a document or tutorial or whatever where I can learn how to set library inheritance through the xml source? Thanks in advance!
PS: Oh and of course (I shouldn't even have to mention it) it should be avoided that the xml does not validate correctly...
[Updated on: Thu, 28 March 2013 13:46] by Moderator Report message to a moderator
|
|
|
Re: Change library inheritance in rptdesign [message #1029761 is a reply to message #1028603] |
Sat, 30 March 2013 05:03 |
|
Jakob,
On the xsd validation, can you log a bug for this?
On overridden properties, take a look at this:
http://www.eclipse.org/birt/phoenix/project/notable2.6.php#jump_11
When you put a library component into your report it will add something like:
extends="libraryname.mytable" Which connects it to the library element. When you override a property that is when you get <overridden-values> . In the list you posted, most overridden values where done by the designer to reassign id numbers to not conflict with existing report item ids. So if you library had a table with id 3 and your report already had a report item with id three the designer would reassign the library component a new id.
|
|
|
Powered by
FUDForum. Page generated in 0.25502 seconds