Rows missing in templates in certain situations

Tekla Structures template report subtotal sub-total NextValue()
2022
Tekla Structures
2021
Tekla Structures
2020
Tekla Structures
2023
Tekla Structures
2024
Tekla Structures
2025
Tekla Structures
2026
Tekla Structures
Environment
Not environment-specific

Problem:

I noticed that some rows are missing from my reports. For example "subtotal" rows can be missing in some cases in "Excel Material List.xls.rpt" report: 

Image
subtotals before

(note: that's a report found in Australasia environment)

Why is that?

 

Answer:

This is caused by now wrong template definition and relatively recent fix to defect TPLED-241.

 

In report template "Excel Material List.xls.rpt", Subtotal and total rows are arranged this way:

Image
subtotal template structure

 

Subtotal row rule is defined like that: 

Image
subtotal row rule

Now the "problem" is that Subtotal and Total rows are working on the same set of data. Total row being right below Subtotal row means that, depending on the sort order, last Subtotal row might be the same as first Total row. So the rule highlighted above in yellow GetValue("PROFILE") != NextValue("PROFILE") is not true and the SUBTOTAL row is not output. 

This is considered correct behavior. That's how template's logic works.

 

This situation can occur in different templates, it is not only limited to this particular one, but the mechanism is the same.

 

Solutions:

1. Change sorting order of the higher row. In Excel Material List report, the sorting order of "COLD" row should be changed (in COLD_PROFILE value field the Order-property).

Image
subtotal sort order

 

2. Insert an empty COMMENT row between Subtotal and Total rows:

Image
subtotal comment solution
Was this helpful?