(annoying) auto refresh feature

Zhou X.B.Zhou X.B. Indonesia
edited 3:38AM in FastReport 4.0
Hi everybody,

I am new to Fastreports, previously I was using Crystal Reports w/ Delphi 7 to develop application. Recently my componay upgrade to Delphi XE2 which comes w/ Fastreports. I found Fastreports is really fast. But I have some problems because I don't understand Fastreports well, yet.

My application is a VCL & MDI application, all reports are previewed in modeless windows. I use some ad hoc TClientDataSets to query database server, then connect reports to these TClientDataSets. Previously with Crystal Reports, I can do things like this:
- run query to get data for date Jan/01 - Jan/15, pass the TClientDataSets to preview module and show preview window
- repeat the same for Jan/16 - Jan/31
- I get two preview windows, first w/ data for Jan/01 - Jan/15, second for Jan/16 - Jan/31

I try the same with Fastreports which is obviously faster than Crystal Reports in showing preview window. But, I got two preview windows w/ same information, both showing data for Jan/16 - Jan/31 which is the results from the second (last) query.

I think this is because of auto-refresh feature of Fastreports, both of the preview windows reflect current data seamlessly, actually this is not needed by my application. I wonder whether there is an option to switch off this auto-refresh feature. Thanks for any reply.

Regards,
Zhou X.B.

Comments

  • edited 3:38AM
    Hi,

    I think you need two instances of TfrxReport to do this.

    Best Regards,
    Cristian Peţa
  • edited 3:38AM
    Zhou X.B. wrote: »
    ...
    But, I got two preview windows w/ same information, both showing data for Jan/16 - Jan/31 which is the results from the second (last) query.
    ...
    Zhou X.B.

    I try to understand your concept of those two preview windows.

    A.
    Does your end user need to see them both at the same time (like cascade or tile)?
    Or maybe end user will select which preview he/she wants to see and will select one of them for viewing on a full screen.

    B.
    Is it possible to show your data (1st part of Jan, 2nd part of Jan) in one preview?
    I mean - first n pages (let's say 1-3) may show data from 1-15 Jan, the next n pages (let's say 4-6) will show data from 16-31 Jan.

    Which option of the above two (A. or B.) may be implemented in your report?
  • edited February 2013
    Zhou X.B. wrote: »
    I am new to Fastreports, previously I was using Crystal Reports w/ Delphi 7 to develop application. Recently my componay upgrade to Delphi XE2 which comes w/ Fastreports. I found Fastreports is really fast. But I have some problems because I don't understand Fastreports well, yet.
    Off topic: Please upgrade your fastreport to FR Standard at the very least, Pro would be better.
    The version which comes with Delphi is totally inadequate for any serious work.
    Don't waste your time trying to get things to work with the Embarcadero version.
  • edited 3:38AM
    austingrd wrote: »
    austingrd wrote: »
    Hi,

    I think you need two instances of TfrxReport to do this.

    Best Regards,
    Cristian Peţa

    Hi Peta, can you please expland? Like how do we create two instances?

    Hi,

    At design time simply drop two TfrxReport (frxReport1 and frxReport2).
    Or create two instances at run time.

    Best Regards,
    Cristian Peţa
  • Zhou X.B.Zhou X.B. Indonesia
    edited 3:38AM
    Mick.pl wrote: »
    Mick.pl wrote: »
    ...
    But, I got two preview windows w/ same information, both showing data for Jan/16 - Jan/31 which is the results from the second (last) query.
    ...
    Zhou X.B.

    I try to understand your concept of those two preview windows.

    A.
    Does your end user need to see them both at the same time (like cascade or tile)?
    Or maybe end user will select which preview he/she wants to see and will select one of them for viewing on a full screen.

    B.
    Is it possible to show your data (1st part of Jan, 2nd part of Jan) in one preview?
    I mean - first n pages (let's say 1-3) may show data from 1-15 Jan, the next n pages (let's say 4-6) will show data from 16-31 Jan.

    Which option of the above two (A. or B.) may be implemented in your report?

    Hi Mick,

    Thanks again, and sorry that it*s quite a while to reply you,. Certainly my case is A, I also need a feature that could let user see preview windows when all clientdatasets are freed (coz I used adhoc clientdatasets)
  • edited 3:38AM
    Zhou X.B. wrote: »
    ... I also need a feature that could let user see preview windows when all clientdatasets are freed (coz I used adhoc clientdatasets)

    Hi,

    Preview in FR is somehow live-preview. You need active datasets.
    Because this I say that you need two frxReport and of course two active datasets.
    I think the only way to do this with closed datasets is saving both reports in .fp3 format and show them. Or EMF, PDF....

    Best Regards,
    Cristian Peta
  • edited 3:38AM
    Peta wrote: »
    I think the only way to do this with closed datasets is saving both reports in .fp3 format and show them. Or EMF, PDF....
    IMO the idea Peta suggested is one of the best.
    You should:
    - Get ready your DataSet for data from Jan 1-15,
    - Prepare report without showing it in a Preview,
    - Save prepared report to fp3 file or any stream
    - Get ready your DataSet for data from Jan 16-31,
    - Prepare report without showing it in a Preview,
    - Have your application to keep two Preview windows at the same time,
    - One Preview should show saved report, second Preview should show the second report.

    But I STILL wonder why do you need to complicate that - especially when you've just started your FR adventure ;-)
    You may create ONE single report cointaining both halfs of Jan in ONE Preview. You may use FR Outline possibilities to allow your user very easy navigation through the whole report.
  • edited 3:38AM
    I have a small example (fr3 file) of using Outline (prepared with FR compiled Demo) but ... I can NOT attach it here as there must be something wrong with FR server [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> My browser gets a lot of statements like[/img]IPB WARNING ... (Line XXX of /index.php) or similar [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I'll come back here soon and see if I can attach anything ...[/img]
  • edited 3:38AM
    Mick.pl wrote: »
    I'll come back here soon and see if I can attach anything ...
    Here is my example. Use it (fr3 file) with FR 4 compiled demo.
  • Zhou X.B.Zhou X.B. Indonesia
    edited 3:38AM
    Peta wrote: »
    Peta wrote: »
    ... I also need a feature that could let user see preview windows when all clientdatasets are freed (coz I used adhoc clientdatasets)

    Hi,

    Preview in FR is somehow live-preview. You need active datasets.
    Because this I say that you need two frxReport and of course two active datasets.
    I think the only way to do this with closed datasets is saving both reports in .fp3 format and show them. Or EMF, PDF....

    Best Regards,
    Cristian Peta

    Hi Cristian,

    I got your point. I just wish Fastreport provide AutoRefresh property that can be TRUE or FALSE, so developers have option of live-preview or static-preview. Is there a chance to request such an update ?

    Regards,
    Zhou X.B.
  • Zhou X.B.Zhou X.B. Indonesia
    edited 3:38AM
    Mick.pl wrote: »
    Mick.pl wrote: »
    I'll come back here soon and see if I can attach anything ...
    Here is my example. Use it (fr3 file) with FR 4 compiled demo.

    Hi Mick,

    Thanks for your example, I appreciate it.

    Regards,
    Zhou X.B.
  • edited 3:38AM
    Zhou X.B.

    I wonder what is your decision about solving the issue you've started that topic with.
    It isn't a typical FR problem - so could you say a few words about that?
  • Zhou X.B.Zhou X.B. Indonesia
    edited 3:38AM
    Mick.pl wrote: »
    Zhou X.B.

    I wonder what is your decision about solving the issue you've started that topic with.
    It isn't a typical FR problem - so could you say a few words about that?

    Hi Mick,

    If you read my reply to Cristian Peta then you would understand my decision about this topic. Thanks

    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.