简体   繁体   中英

Report export to pdf

Good morning, I am having an "interesting" experience with reports and exporting them to pdf. I've created a report that hides specific fields based on a condition. The fields hide (as they should) in print preview and also when I export to Word but when I export to pdf, they all re-appear. It is the same result for ANY fields I hide manually as well.

Anyone know why and have a way to fix this?

在此处输入图片说明

When you export to PDF, the report is recreated, ie the program code is re-executed (although this is not visible as it does stop on debug breakpoints). The Sub Report_Open however is NOT re-executed. As a result, fields being initialized there, will not be initialized during the export to pdf. I resolved this by initializing the fields again in the sub ReportFooter_Format, ie at the end of the report.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM