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

Me again..

edited August 2017 in General
Hi Team,
Win 10, D10.2.1, Advantage 12, latest RB Ent.

I don't know if this is Delphi, Advantage Database or RB.

Given the following procedure..
{code}
procedure TAppointmentsForm.btnPrintCurrentListClick(Sender: TObject);
begin
//
////////////////// Part A //////////////
ApptTemp.Exclusive := True;
ApptTemp.Open;
ApptTemp.AdsZapTable;
//
Appointments.AdsCopyTableContents(ApptTemp);
//
ApptTemp.Close;
ApptTemp.Exclusive := False;
//
//////////////// Part B /////////////////
with ReportsFrm.ReportsForm do
begin
ppRE1.LoadReport('Appointments', 2);
ppR1.ShowAutoSearchDialog := False;
ppR1.Print;
ppR1.FreeModules
end;
//
end;
{code}
The report is using ApptTemp.
If I just enable part A, i.e. comment out part B, the procedure runs through fine. ApptTemp is updated correctly for
multiple simultaneous users.
If I just enable part B, the procedure works fine. I get the report for multiple simultaneous users.
If parts A & B are enabled I get the error "The specified table, memo file, or index file was unable to be opened."
when the second user tries to run the procedure.
That's OK, I can trap that and tell the Second+ user to wait.
However, the 'lock' on ApptTable doesn't go away when the report is closed by the first user, or if the calling unit
is closed. It isn't untill the app itself is closed by the first user that the sacond user can continue. :-(
As I said, I don't know if this is Delphi, Advantage Database or RB.
Appreciate any thoughts as to what is going on and how to rectify it.

Regards & TIA,
Ian

Comments

  • edited August 2017
    Hi Ian,

    For future reference, please create meaningful subjects for your
    newsgroup threads so others with the same issue can search easier.

    This appears to be a similar issue to the one we addressed April 10,
    2017. Is it possible to alter the example you sent then to demonstrate
    this issue? Please send me the steps I need to take to recreate the
    problem or alter the example you sent back then and send it to me in
    .zip format so I can see if there is anything we can do.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2017
    Nico Cizik (Digital Metaphors) wrote:

    IB - Apologies

    IB - Do you hav Advantage Database available? Not sure an example will br relevant without it.

    Regards,
    Ian
  • edited August 2017
    Hi Ian,


    Yes, I also have the previous example you sent in April which is very
    similar to the code you posted. I could use that if you give me the
    steps to recreate this new issue.


    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2017
    Nico Cizik (Digital Metaphors) wrote:


    Sorry Nico,
    I had totally forgotten abot the old one. :-(
    I have updated it and resent it via email.
    To recreate run the app twice. With both apps open, run the report in one through to closing the report but still in
    the app, then run the report in the second app.

    Regards & Tks,
    Ian
This discussion has been closed.