Posted 20 September 2024, 3:27 pm EST - Updated 20 September 2024, 3:55 pm EST
I’m working on a proof-of-concept template and have two issues I haven’t been able to work out.
Data is currently multiple records of:
startDate
endDate (optional - can be null)
name
address
city
state
zip
notes
highlight
id
parentId
- Generally, the records should be listed one per row but the notes should be placed below the name on a separate row. Each record should take up 3 rows where the 3rd row is a spacer formatted to be shorter than a normal row.
A B C D E F G
1 startDate endDate name address city state zip
2 notes
3
This is very doable but now the complexity comes in. For any given ‘id’, there could be additional records that must be expanded in the same record (between rows 1 and 2). These records are identified by a ‘parentId’ with the value of the parent ‘id’. The notes can be take from any of these records as they are all the same.
A B C D E F G
1 startDate endDate name address city state zip
address...
address...
2 notes
3
Note that the “inner” records (if any) cannot relate based on startDate/endDate. Currently it’s just the hidden fields that define the grouping.
Since this is an all new implementation the data can be changed to make the template work but I’ve yet to work out a solution.
Can you anyone help me out with how this can be configured - data and template?
- The second issue is related to the above as well. Based on the condition, highlight = true, all rows of a record except the spacer row need to be shaded. For most records that will be just the first row and notes row. However, if there are multiple inner rows, they must be shaded as well. A common style will be applied to provide the shading.
This may need to be done in post-processing code and I’m good with that but I wanted to throw it out in case anyone else has had to do this with a template. Any pointers are appreciated.
I’m using DsExcel 7.2.1.
Thanks!
Dave