Avoiding OnBeforePrint

Hi,

I'm changing the "PrintTable" demo from FastReports to don't use the OnBeforePrint event, instead fill in the CrossView on the button click. This is not working.

I need this because I have other thread to fill in the CrossView data, so my program doesn't freezes while a long loop is executing.

Anyone knows how to do this or if there is other way?

Comments

  • gpigpi
    edited 11:50AM
    You can fill cross in OnBeforePrint event only, so you should redesign your program to fill cross in OnBeforePrint event
  • edited 11:50AM
    So in this case my users will view my program freeze because this component?

    FastReport team foresse that filling a crossview manually in the OnBeforePrint event will freeze the program and this is not a good pratice.

    Why I must use the OnBeforePrint event? If I could fill before call the ShowReport method I can show a progress to the user while the crossview is being filled.
  • gpigpi
    edited 11:50AM
    wrote:
    If I could fill before call the ShowReport method
    your program will freeze before ShowReport method. What difference?
    Try to prepare report and then show prepared report
  • edited 11:50AM
    Really there is no difference, but I don't want my program freeze. So I'm looking for an way to generate the report so that the program doesn't freeze while filling the report in the OnBeforePrint event.
  • gpigpi
    edited 11:50AM
    Prepare report in separate thread

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.