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

Possible bug: export_as_pdf() pagination carries over last value in "display" columns to next page #233

Closed
kyleireton opened this issue Nov 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@kyleireton
Copy link

I suspect this is a bug, but I can't figure it out so would be grateful for any insight:

When using the "export_as_pdf()" function with pagination = TRUE, if the first row of a new page in a disp_cols() variable is blank, the listing instead carries over the last printed value from that variable in the first row. Just to be clear, that's problematic in our usage because it makes it appear there is data occurring where it should not be.

I confirmed this occurs within pagination of key_col() variables. In our case, when grouping by Subject ID as a key_col(), the data is carried over on the first row only when paginating within that Subject ID. When a new Subject ID begins on the first row of a new page, the last printed display_col() value is not carried over even if the first row is blank (which is the behavior we wish to see for all pages).

I tried not defining any key_col(), but I still see display_col() values carried over to fill blank first rows after pagination.

@kyleireton kyleireton added the bug Something isn't working label Nov 21, 2024
@kyleireton
Copy link
Author

For a bit more context, I confirmed that the carryover of data only occurs in the case of pagination with export_as_pdf(). When creating the listing itself by as_listing(), blank cells in rows are displayed as intended.

@kyleireton
Copy link
Author

It appears the issue is resolved by replacing absolute empty values "" with a real space " ". I tried it first with a period ".", and that fixed it as well.

@shajoezhu
Copy link
Collaborator

It appears the issue is resolved by replacing absolute empty values "" with a real space " ". I tried it first with a period ".", and that fixed it as well.

Thanks @kyleireton !

closing this issue, as already resolved by user

@Melkiades
Copy link
Contributor

It appears the issue is resolved by replacing absolute empty values "" with a real space " ". I tried it first with a period ".", and that fixed it as well.

Good fix! Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants