amorosik
Member
- Local time
- Today, 21:23
- Joined
- Apr 18, 2020
- Messages
- 505
I'm trying to follow this example, from Karl Donaubauer
At point 8 there is the description of how to 'understand' from code when a report is launched for printing
In itself it is very simple, it intercept the ReportHeader_Print event to know when the report is sent for printing or preview, distinguishing the two things with a previously set flag
I pull down the example code attached to the youtube video, try it and it works exactly as expected
Well I think, now I put the two routines on my report and so I can intercept the report sent to print
I copy the two routines and the module global variable, I start the report, the Report_Activate event starts correctly, the ReportHeader_Print never starts
So I put Karl's example side by side and mine, and I go step by step forward with both
To send to print I use the big button in the ribbon that appears when the report is previewed, and I send to a pdf printer
But on my code the ReportHeader_print event never fires
While on the example code the event starts correctly, so the problem is evidently only on my report
I check the properties of the two reports, which are identical (apart from the data source of mine) and I try again several times but always with negative results
The question is: what is the ReportHeader_Print event inhibited by?
Alternatively, how to understand from the code if a report is sent for printing?
At point 8 there is the description of how to 'understand' from code when a report is launched for printing
In itself it is very simple, it intercept the ReportHeader_Print event to know when the report is sent for printing or preview, distinguishing the two things with a previously set flag
I pull down the example code attached to the youtube video, try it and it works exactly as expected
Well I think, now I put the two routines on my report and so I can intercept the report sent to print
I copy the two routines and the module global variable, I start the report, the Report_Activate event starts correctly, the ReportHeader_Print never starts
So I put Karl's example side by side and mine, and I go step by step forward with both
To send to print I use the big button in the ribbon that appears when the report is previewed, and I send to a pdf printer
But on my code the ReportHeader_print event never fires
While on the example code the event starts correctly, so the problem is evidently only on my report
I check the properties of the two reports, which are identical (apart from the data source of mine) and I try again several times but always with negative results
The question is: what is the ReportHeader_Print event inhibited by?
Alternatively, how to understand from the code if a report is sent for printing?
Last edited: