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

Endless report..

edited July 2002 in General
Here is a not too unusal problem...

I have a query that generates (say) 9 records. I have a TppDBpipeline
connected to this datasource (ASTA to MySQL, but that does not sem to
have any bearing on the problem). To this I add a ppDesigner and
ppReport. I connect the ppReport to the DBpipeline. I go into the
Designer and run the Report Wizard to generate a simple list of this
table. There are only 4 fields, all text, very simple. You could not get
a simpler report.

What I get is totally wrong....

If I use the Report Wizard I get a list of 9 records, repeated
endlessly. I have set Autostop = True.

Ok - forget the Report Wizard. I add a subreport, then add the fields
manually. I add a title and summary line at top and botton, plus a count
field in the Summary.

This time the report does not repeat endlessly, but I get the 9 records
listed (correct), plus the title and summary lines and fields. All
perfect. Except I get this printed 6 or 7 times complete. No page break
between the listings - just repeat after repeat.

Why on earth would the system do this? It is the same at design or
runtime. There are only 9 records in the query. I can put a grid on the
form and attach it to the Datasource - yes, 9 records.

I actually see this sort of thing quite often. The only real way to stop
endless repeats is to use a subreport, which I have done here. And
yes, it has stopped the endless repeats. Autostop does not seem to do
anything. There are no master-child relationships, or anything of that
nature. Only a single query.

I forgot to mention - I generally save and load reports from RTM files.
I think this is why Autostop never works - it seems to clear itself when
you load the report from the RTM, and never gets saved. But I can use
the Report Wizard at designtime, and I get a similar problem.

Any ideas?

Comments

  • edited July 2002
    How are you verifying that your queries are correct? The best way to do that
    is to place a grid on the form for everyone of your data source. You can
    then go through the master grid and verify that each of the detail data
    sources is retrieving the proper data. You shouldn't have to use a
    sub-report but the most likely reason that you are seeing the data repeated
    multiple times is because you have the pipeline hooked up to the report and
    the subreport. You need to disconnect the pipeline from the main report if
    you want the subreport to traverse the data.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    > How are you verifying that your queries are correct? The best way to do that

    As I said...
    ".. I can put a grid on the form and attach it to the Datasource - yes,
    9 records."


    This could be the problem - even though there are no fields on the main
    form. How do you "disconnect" the pipeline from the main report?
  • edited July 2002
    I had once a report printing on X pages (with X>300 pages)instead of 1. It
    worked most of the time (more thant 99% of the time on Y PCs). It was due to
    the way the prinre config was (incorrectly set).
    look into the where you choose the printer and compare it with the official
    snippet "set the printer default value" in the newsgroup tech-tips. Change
    the default printer of windows and retest.

    regards

    Didier


  • edited July 2002
    To disconnect the datapipeline from the main report either clear the
    DataPipeline property in the Object Inspector or select Report | Data and
    set to . However, for a simple report like this you still shouldn't
    need a subreport. Since your subreport can traverse the nine records without
    a problem, your main report should do. If you are still having problems you
    can send your project to support@digital-metaphors.com and we'd be happy to
    take a look at it.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.