Add two events to the fastreport4 export Function

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.