Fastreport is quite convenient for reporting. Although there are a lot of Chinese problems since 4.7.x, it does not affect usage. This time, because the customer uses a technology similar to a remote terminal to use the system, data needs to be compressed during report export to reduce traffic, therefore, two events are added to the FR export function to notify the master during export.Program.
First, find the tfrxcustomexmexportfilter definition in frxclass. Pas, and add the attribute under public:
Property onstart: tpolicyevent read fonstart write fonstart;
Property onfinish: tpolicyevent read fonfinish write fonfinish;
Press SHIFT + Ctrl + C for Automatic completion.
Then modify frxexportcsv in the exportpack directory. pas, frxexportodf. pas, frxexporttext. pas, frxexporttxt. pas, frxexportxls. pas, frxexportxml. find the export classes in files such as PAS and add them after function start: Boolean.CodeRow:
If assigned (onstart) Then onstart (Self); // added a call to the onstart event
// The following is the original code
If (filename <> '') or assigned (Stream) then
Begin...
Add at the end of procedure finish; function:
If assigned (onfinish) Then onfinish (Self); // added a call to the onfinish event.
Finally, compile the relevant package (dpk) and reinstall Fr.