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

Printing my report

edited May 2004 in General
Hello,

Am using rb7.03 and D7.

I have a report that uses calculated fields on two detail tables to get the
output for the report. Needless to say, the report is slowwwwww. After
about 15 minutes of crunching data, it finally output one line on the report
and the HourGlass changed back to a pointer. Now the mystery....I click the
print button, tell it to print all pages (there is only one page) and click
ok. I waited over 5 minutes and it says that it it still "Access Data".
What is the deal? It already spent 15 minutes to display the preview. Does
it now have to spend another 15 minutes to send the preview to the printer?

Thanks in advance,

Kevin.

Comments

  • edited May 2004
    Hi Kevin,

    Which type of connectivity and database are you using? In my testing, when
    printing from the preview, the data is not accessed after the preview is
    loaded. I've never heard of a report taking 15 minutes to load one page.
    Out of curiosity, what type of "data crunching" are you doing in your
    dataset?

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2004
    Hello Nico,

    The following is in my OnCalcFields event:
    if DetailTable1.Active then begin
    DetailTable1.Locate('DocNo' ,
    MasterTable.FieldByname('DocNumber').AsString,[]);
    DetailTable2.Locate('DocNo',
    Mastertable.FieldByname('DocNumber').AsString,[]);
    DataSet.FieldByName('PhysicalAddr').AsString :=
    DetailTable1.FieldByName('Address1').AsString;
    DataSet.FieldByName('BillingAddr').AsString :=
    DetailTable1.FieldByName('Address2').AsString;
    DataSet.FieldByName('CityState').AsString :=
    DetailTable1.FieldByName('Address3').AsString;
    DataSet.FieldByName('Homestead').AsString :=
    DetailTable2.FieldByName('Homestead').AsString;
    DataSet.FieldByName('Over65').AsString :=
    DetailTable2.FieldByName('Over65').AsString;
    DataSet.FieldByName('Disabled').AsString :=
    DetailTable2.FieldByName('Disabled').AsString;
    end;

    These are all CA-Clipper tables with ntx indexes. Our app Uses Advantage
    tables but we have to access the CA-Clipper tables (from another app) for
    this particular report.

    I assume that the reason it takes so long to load one page is that the
    report component has to find a page full of data before it will display it
    in the preview.

    In the Calc tab, I have following in the BeforePrint event of the DetailBand
    Detail.Visible :=

    ((plAdocs['Field1'] = Report.Parameters['ppParameter1']) and

    (plAdocs['Field2'] = Report.Parameters['ppParameter2']) and

    (plAdocs['Field3'] = Report.Parameters['ppParameter3']))

    There are 3 fields on my form that relate to the above parameters.

    Does help explain or do you more information?

    Thanks!



    Kevin



  • edited May 2004
    Hi Kevin,

    Try setting Report.CachePages to True. This will cache each page in memory
    so RB should not have to re-access the dataset.

    --
    Best Regards,

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