Home General

Reportbuilder hanging

edited March 2014 in General
Hi Guys

Delphi7 with RP 15.2

Where we have some coding on the 'onscroll' event of a TQuery that fires
when a report is generated, RB has started (on a number of occasions,
but not all) to hang after the report is closed.

This is causing us major problems as our reporting have been developed
over the years to work from the same TQuery that displays info in a
table..sometimes we need to fire code in the onscroll event.

Can you suggest what we need to do please.

Thanks

Glenn
Key-Data Systems

Comments

  • edited March 2014
    On 27/03/2014 12:38, Glenn wrote:
    Further to the previous... I can state that it is a statement that makes
    a combobox visible or not that causes the hang...

    If something=True then
    begin
    combobox1.visible:=True;
    else
    begin
    combobox1.visible:=False;
    end;

    If those lines are taken out all is well!
  • edited March 2014
    > Where we have some coding on the 'onscroll' event of a TQuery

    Why? What are you doing in this event. What is your ultimate goal with
    this code.

    Starting with ReportBuilder 14, reports are generated and rendered in a
    background thread. Accessing report components or the data components
    it's using from the main thread can cause issues.

    Try setting PreviewFormSettings.SinglePageOnly (or Viewer.SinglePageOnly
    if using a TppViewer) to True and see if that solves the issue.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2014
    On 27/03/2014 12:38, Glenn wrote:
    Thanks Nico that worked (setting to single page)

    The code by the way is used to control whether a combobox on the same
    form as the report component is visible or not given some
    condition....it is not referenced in the report at all, and yes I agree,
    ideally the code shouldn't be activated for the report...but... this was
    done 14 years ago to save having numerous query components on the form
    doing the same thing...and we have other places that we've done similar,
    it would appear that altering that setting will cure the problem though,
    thanks

    Glenn
  • edited March 2014
    Hi Glenn,

    Thanks for the explanation.

    If you would like to give your users multi-page preview options, you can
    try calling DisableControls on the dataset connected to the report with
    SinglePageOnly set to False and see if it also works.

    myDataSet.DisableControls;

    try
    myReport.Print;

    finally
    myDataSet.EnableControls;

    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.