Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Problem with RB 14.04 and MyDac DBGrid

edited April 2012 in General
Hi
During the last 10 years I use RBuilder and MyDac components without any
problem.

I had just update to version 14.04 Pro. I use MyDac version 7.1.6

All the old software was compiled without problems.

Trying to use in a new application for the first time, having a Query, a
CRDBGrid and RBuilder, I come into a very strange situation.

If the CRDBGrid has its property "OptionsEx / dgeSummary" set to False
everything works perfectly!

But if I set the above property to True , using the same query, the Report
that previously had 6 pages comes with a variable number of pages (40,50,
60) and when I close the preview form it apears an error of something like
"multi leak error" that I had never seen.

To who is not familiarized with CRDBGrid ( from MyDAC) this dgeSummary when
true , may show a column sum, or average, depending of what you set.

As a matter of fact I do not know if the problem is of RBuilder, or CRDBGrid
or even MyDAC componente( Query).

Someone had find this kind of problem?

Thank you

Edison

Comments

  • edited April 2012
    Hi Edison,

    ReportBuilder 14 behaves very differently from previous versions with
    respect to previewing reports. With the new scrollable viewer, all
    pages are now generated in a background thread before drawn in the
    correct position on screen allowing quick and efficient scrolling of
    pages side by side or top to bottom.

    This threading mechanism can easily be interfered with when the data
    components used by the report (TDataset descendents) are also connected
    to other Delphi controls (Grids, etc.). Setting the DisableControls
    property to True of your datasets before printing the report should
    solve any issues.

    Another option is to keep all report specific datasets separate from any
    other controls.

    Note: The scrollable preview feature can be disabled by setting the
    PreviewFormSettings.SinglePageOnly property to True. This will revert
    the previewer back to the way previous versions functioned.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2012
    Hi Nico Cizik

    I will test the "disable..". I already had verified that using a specific
    dataset to RB had solved the problem.

    But I remain with a big question: and about all the old reports that I had
    in the several applications with the same condition (using crdbgrids with
    summary property activated). I look at a couple of then an apparently its
    working perfectly? The old code could had received some special treatment
    by the ocasion of first compiations?

    do you sugest that I look for this situation (in all the code) and modify
    the code (using disable control for instance).?

    thank you very much

    Edison



  • edited May 2012
    Hi Edison,

    Yes, it is good practice to keep the report datasets separate from other
    data controls (or at least disable the controls before printing).
    Though some reports may not be affected by this, it is always better to
    be safe.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2012
    Hi Nico

    thank you. I will do that.

    Edison

This discussion has been closed.