questions from newbie

Zhou X.B.Zhou X.B. Indonesia
edited 4:35AM in FastReport 4.0
Hi,

I want to ask some questions about Fast Report for Delphi XE2
- what is "TfrxReport.EngineOptions.DestroyForms" meant for ?
- how can I build a report w/ MDIChild preview that will not refresh its content after ShowReport() ?
My case is: I preview a report of a TClientDataSet, then I need to close the TClientDataSet, when I go back to preview form I want it still showing the previous content of TClientDataSet

Thank you very much

Comments

  • gpigpi
    edited 4:35AM
    wrote:
    - what is "TfrxReport.EngineOptions.DestroyForms" meant for ?
    Sometime you need access report's variables after preparing of report, so you should set TfrxReport.EngineOptions.DestroyForms to False
    wrote:
    - how can I build a report w/ MDIChild preview that will not refresh its content after ShowReport() ?
    My case is: I preview a report of a TClientDataSet, then I need to close the TClientDataSet, when I go back to preview form I want it still showing the previous content of TClientDataSet
    You can't get old data in report when dataset was update and report was rebuild. You should leave TClientDataset with old data in open state
  • Zhou X.B.Zhou X.B. Indonesia
    edited 4:35AM
    gpi wrote: »
    gpi wrote: »
    - what is "TfrxReport.EngineOptions.DestroyForms" meant for ?
    Sometime you need access report's variables after preparing of report, so you should set TfrxReport.EngineOptions.DestroyForms to False
    gpi wrote: »
    - how can I build a report w/ MDIChild preview that will not refresh its content after ShowReport() ?
    My case is: I preview a report of a TClientDataSet, then I need to close the TClientDataSet, when I go back to preview form I want it still showing the previous content of TClientDataSet
    You can't get old data in report when dataset was update and report was rebuild. You should leave TClientDataset with old data in open state

    qpi,

    Thanks for your reply.
    You mean FastReports always displays (in preview form) current data of all dataset attached/connected to frxreport ? And there isn't any way to retaining data of the time of PrepareReport ?
    I also need to preview 2 reports on same dataset from different range/fliter for comparison, can FastReports help with this ?


    Regards,
    Zhou X.B.
  • gpigpi
    edited 4:35AM
    wrote:
    You mean FastReports always displays (in preview form) current data of all dataset attached/connected to frxreport ?
    No, current data of the time of PrepareReport
    wrote:
    I also need to preview 2 reports on same dataset from different range/fliter for comparison, can FastReports help with this ?
    Filter dataset, show first report on first form, filter dataset, show second report on second form
    I think for MDI application better to use separate dataset for each MDI form
  • Zhou X.B.Zhou X.B. Indonesia
    edited 4:35AM
    gpi wrote: »
    gpi wrote: »
    You mean FastReports always displays (in preview form) current data of all dataset attached/connected to frxreport ?
    No, current data of the time of PrepareReport
    gpi wrote: »
    I also need to preview 2 reports on same dataset from different range/fliter for comparison, can FastReports help with this ?
    Filter dataset, show first report on first form, filter dataset, show second report on second form
    I think for MDI application better to use separate dataset for each MDI form
    Thanks qpi

    I understood your info, but I still want to minimize number of datasets in my application, can you show me some way to prevent fastreport refreshing preview window with current data of datasets, or in other words can we force preview window to only show data of dataset at the time we PrepareReport,
  • edited 4:35AM
    Zhou X.B.

    Maybe it is necessary to have a look at your report in a different way.
    Till now I imagine your report looks the same (I mean Pages and bands) for both times you prepare it, and the only problem is to show different data for each pass.

    I would think of a solution like below:
    - Put a MasterData1 band with a virtual data (two rows) which you can set in Designer or assign it with any table with two rows,
    - Set MasterData1.StartNewPage to true,
    - Construct the whole report as "a child" (not Childband) of that MasterData1,
    - And finally fill memos and other controls on report page(s) according to a row number in the table I mentioned above (first and second pass for MasterData1),
    - Sure the whole Preview would consist of (2 x N) pages, where N is the number of pages you would normally get for a single run of the report without the MasterData1.


    I (we ?) know too less about a concept of your report to give you a solution that will satisfy you.
    Could you say a bit more than some technical problems with DataSets?

    Regards
    Mick
  • Zhou X.B.Zhou X.B. Indonesia
    edited 4:35AM
    Mick.pl wrote: »
    Zhou X.B.

    Maybe it is necessary to have a look at your report in a different way.
    Till now I imagine your report looks the same (I mean Pages and bands) for both times you prepare it, and the only problem is to show different data for each pass.

    I would think of a solution like below:
    - Put a MasterData1 band with a virtual data (two rows) which you can set in Designer or assign it with any table with two rows,
    - Set MasterData1.StartNewPage to true,
    - Construct the whole report as "a child" (not Childband) of that MasterData1,
    - And finally fill memos and other controls on report page(s) according to a row number in the table I mentioned above (first and second pass for MasterData1),
    - Sure the whole Preview would consist of (2 x N) pages, where N is the number of pages you would normally get for a single run of the report without the MasterData1.

    I (we ?) know too less about a concept of your report to give you a solution that will satisfy you.
    Could you say a bit more than some technical problems with DataSets?

    Regards
    Mick


    Hi Mick,

    Thanks for your kind attention. Sorry that I can't express clearly what I meant. I think of starting a new thread to make it more obvious

    Regards,
    Zhou X.B.

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.