PDA

View Full Version : User defined TableColumnModel for ConsolidatedReport


wilfried_loewe
02-12-2007, 09:48 AM
Hi to all,

does anyone know, to set up an own TableColumnModel for the BOM Reportgenerator - ConsolidatedReport ??? When i use the following extend:

In XML:
.
.

<BillOfMaterials>
<ConsolidatedReport>
<TableColumnModel>com.acme.datamgmt.tcm.MyConsolidatedBomTableColumnModel</TableColumnModel>

<RollupAttribute>
attribute_name
<Required>false</Required>
</RollupAttribute>
</ConsolidatedReport>
</BillOfMaterials>

Jave extend: See Javafile in Appendix.

This extend does not work. Is the extend for Class WMTableColumnModel the right way ??? Manage ColumnModel in XML-File is not a good way, becourse this Attributes are placed in the fist Columns - there is no Change to set the Order of this Columns (also not with Index-Tag) ...

jdh
02-14-2007, 07:02 PM
I am sorry I cannot be more help but from looking at the product code, I don't see anything wrong in what you have posted. Could you please post your xml file?

jdh
02-15-2007, 07:28 AM
I am sorry but you found a defect in the product. I did a little more digging and found the problem. The product code has a defect and will not find your configured table column model (I will submit the defect report). Luckily you can work around the problem by configuring your table column model directly in the xml file instead of creating a java class and configuring the class into the bill of materials section.

In your xml file add the following section at the same level as Options (not in Options - see the configuration guide):

<ConsolidatedBomTableColumnModel>
<clear/> <!-- clears default columns -->
<Column catalog="awm_stda" msg_num="325">POS
<DisplayName catalog="eprojects" msg_num="416">Pos No</DisplayName>
</Column>
<Column>TOTAL_QTY
<DisplayName catalog="model" msg_num="770">Total Qty</DisplayName>
</Column>
<Column catalog="awm_stda" msg_num="45">MATERIAL
<DisplayName catalog="model" msg_num="463">Material</DisplayName>
</Column>
<Column catalog="awm_stda" msg_num="201">DESCRIPTION
<DisplayName>Benennung 1</DisplayName>
<Width>27</Width>
</Column>
<!-- I am not sure why there is 2 descriptions? -->
<Column catalog="awm_stda" msg_num="202">DESCRIPTION
<DisplayName>Benennung 2</DisplayName>
<Width>20</Width>
</Column>
<Column>EINHEIT
<DisplayName>Einh.</DisplayName>
<Width>5</Width>
</Column>
<Column>DIN
<DisplayName>Din</DisplayName>
<Width>20</Width>
</Column>
<Column>LIEFERANT
<DisplayName>Lieferant</DisplayName>
<Width>15</Width>
</Column>
<Column>STL_LAENGE
<DisplayName>Länge</DisplayName>
<Width>6</Width>
</Column>
<Column>STL_BREITE
<DisplayName>Breite</DisplayName>
<Width>6</Width>
</Column>
<Column>FREMDFERTIGUNG
<DisplayName>Ff.</DisplayName>
<Width>3</Width>
</Column>
<Column>KAUFTEIL
<DisplayName>Kt.</DisplayName>
<Width>3</Width>
</Column>
<Column>ERSATZTEIL
<DisplayName>Et.</DisplayName>
<Width>3</Width>
</Column>
<Column>SAEGETEIL
<DisplayName>St.</DisplayName>
<Width>3</Width>
</Column>
<Column>DREHTEIL
<DisplayName>Dt.</DisplayName>
<Width>3</Width>
</Column>
<Column>FRAESTEIL
<DisplayName>Ft.</DisplayName>
<Width>3</Width>
</Column>
<Column>STL_LASERTEIL
<DisplayName>Lt.</DisplayName>
<Width>3</Width>
</Column>
<Column>STL_DOC_NAME
<DisplayName>Mat.-Nummer</DisplayName>
<Width>18</Width>
</Column>
<Column>STL_DOC_FORMAT
<DisplayName>Zng-For.</DisplayName>
<Width>8</Width>
</Column>
<Column>DB_QUANTITY
<DisplayName catalog="model" msg_num="771">Modeled Qty</DisplayName>
<Width>10</Width>
</Column>
<Column catalog="awm_stda" msg_num="476">OVERWRITES
<DisplayName catalog="model" msg_num="773">Actual Qty</DisplayName>
<Width>10</Width>
</Column>
<Column catalog="awm_stda" msg_num="475">SPARES
<DisplayName catalog="model" msg_num="772">Spare Qty</DisplayName>
<Width>10</Width>
</Column>
<Column>TOTAL_QTY
<DisplayName catalog="model" msg_num="770">Total Qty</DisplayName>
<Width>10</Width>
</Column>
</ConsolidatedBomTableColumnModel>

wilfried_loewe
02-15-2007, 10:54 AM
Hello jdh,

thank you for your two answers. I also found out (breakpoint with the netbeans debugger), that my ColumnTableModel Class was not called from the Class ConsolidatedBomTableColumnModelFactory. Let me give some Information, why i favorite the Settings/Changes by Java Code:

1.) Our customer want to see the first Column of the default TCM - good control of splitted bom items - see Screenshots Consol-Report_1.gif - not posible with XML-Custom.
2.) XML Changes are placed in front of the existing Table Column Model - the customer has to organize the Layout by himself.
3.) The default TCM follows the Custom-XML TCM - see Consol-Report_3.gif (Left Side)/Consol-Report_4.gif (Right Side)
Notice: The Tag <clear/> is not allowed in XML Section <ConsolidatedBomTableColumnModel> !!!

What do you think about this Tip to CC (Jim Cooke an his Team):
The default TCM also has internal index started with n - incremented with m. So you can creat a real Extend with an index E. g. 1.3, 1.8, 3.6 ... Before the TCM is created, both Tcm are readed sorted by Index (e. g. doublicated Columns are filtered) ...

jdh
02-15-2007, 12:00 PM
I also prefer to use java code over xml configurations since the java code has a compiler that makes some verifications.

I am not sure I understand Jim's tip but I did just fix the defect in both 14.50 and 15.0. This fix will be available in the next release (or hot fix) AFTER 14.50A and in the 15.00A release.