Nothing happens...

Hi,

though I can see the report at design time clicking "preview", calling my_Report.ShowReport doesn't show a preview form.

I don't know who wrote the documentation - all of the examples seem to deal with generating the report and PREVIEWING it at design-time. I suppose most developers will try to give the report to their customers - so dealing with calling the report from within a delphi app would be fine ;)

After browsing through the examples provided with FR, I thought calling ShowReport would do the trick - but obviously nothing happens at all?

Does anyone have an idea?

Kind regards,

Mark

Comments

  • edited 11:34AM
    ;) I have just started and I have the same problem. In design mode it works great. When I use the ShowReport I get a glimpse of a dialog then nothing.
    It must be simple but what ;)

    I have post a query on my local delphi user group, hopefully they can provide me with some ideas. I learnt about fast reports on that ;)
  • edited 11:34AM
    I got a reply back from my user group, for any real green newbies like me, the fix is

    Hi Peter,

    The dialog appearing briefly and not doing anything is generally due to the
    report not having anything to do (eg, no report loaded).

    My suggestion (assuming that you are NOT saving the form in the DFM) is to
    make sure that the report is being loaded and prepared:

    frReport1.LoadFromFile('C:\Reports\TestReport.frf');
    frReport.PrepareReport;
    frReport.ShowPreparedReport;

    I'm not sure on the procedure if you're saving the report in the DFM, but I
    imagine it would be similiar.

    Hope this helps,

    Jim

    It worked for me ;)
  • edited 11:34AM
    Yes, probably the LoadFromFile was the trick. But if You don't want to call this method, or You use several report components (ie. one TFRReport instance for one designed report) You can set the StoreInDFM property to True and there will be no need to load it from file, and it will be hidden from curious eyes. Anyway I use only one report component and load the report files before printing explicitly. This is one of the reason why I use FR. (The fully separated report layer and the data access layer placed in the report file.)

    Regards:Alex
  • edited 11:34AM
    Thanks - it was exactly what you described! ;)

    And as I'm just starting, I simply decided to store the report within the dfm-file. Though saving it as a seperate file is more powerful especially regarding possible updates and extensions for my app - I'll use this feature later ;-)

    Cheers,

    Mark

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.