Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two DOCX emitter page header issues #2026

Open
hvbtup opened this issue Jan 9, 2025 · 3 comments
Open

Two DOCX emitter page header issues #2026

hvbtup opened this issue Jan 9, 2025 · 3 comments
Milestone

Comments

@hvbtup
Copy link
Contributor

hvbtup commented Jan 9, 2025

I noticed some issues when I compared the DOCX output of my old customized DOCX emitter with the output of the DOCX emitter from master:

If showHeaderOnFirst is not set to true for the master page, then the DOCX emitter does not show the page header at all.

If I set this property to true for testing purpose, then the page header is created, but a second issue occurs:

In my test report, the content of the page header is a single dynamic text item with a border-bottom line (not a grid or whatever).
But the DOCX emitter does not create this line.

grafik

grafik

My customized emitter supported showHeaderOnFirst, see triestram-partner@403e3af

Fixing this is not a top priority ATM. Maybe I can try to carefully create a PR from this once I find the time.

@hvbtup
Copy link
Contributor Author

hvbtup commented Jan 9, 2025

I don't have any idea what I could do regarding the missing line issue, however...

@speckyspooky
Copy link
Contributor

The changed behavior was added from my DOCX changes with BIRT 4.18 and the try to remove the additional formatter-grids.

This cause the effects and there are 2 effects:
1.) The bottom-line is unprinted because the layout-grid was avoid because it exists not really such style-element for docx
2.) The header-footer-height is unset because an empty grid was used to produce the correct height. This is not the right way but the solution to avoid the grid is only the first step. The docx-property of header-height/footer height must be set (currently not implemented)

Solution to get the old behavior since 4.18 & 4.19 (current version/nightly build):

  • set 2 properties on report level on the "advanced property register"

grafik

With your ticket it would be better to switch the configuration from disabled (grid-usage=false) to enabled (grud-usage=true).
Please let me know.

@speckyspooky speckyspooky added this to the 4.19 milestone Jan 9, 2025
@hvbtup
Copy link
Contributor Author

hvbtup commented Jan 9, 2025

For the missing line, I did not follow your suggestion, but your suggestion gave me the idea to use a 1x1 grid, put the dynamic text item into that cell and set the border bottom property at the cell level.

I think this is a reasonable workaround: My test report is special int that it uses just a dynamic text item in the page header.
In production, the reports usually contain a grid in the page header and footer anyway.

Following your suggestion is not an option for me, if this can be only set at report level, because as you said yourself, the whole point of most of the optimizations it to avoid unneccessary nested 1x1 tables. I tried setting the UserProperty WordEmitter.WrappedTableForMarginPadding directly for the dynamic text item and the other setting at report level, but that did not work.

So I consider this second issue solved in a way good enought from my POV.

So only the issue regarding showHeaderOnFirst remains, for which a solution approach is shown in the old commit I mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants