Solved

Delphi 7 and QuickReport ExporttoPDF function

Posted on 2007-11-16
4
651 Views
Last Modified: 2010-08-05
My users are getting periodic access violations when my software tries to use the ExportToPDF function (part of Gnostice's QuickReport form Delphi 7).

The code:
    try
        ExporttoPDF(QuickRep1,str);
    except
        rdpshowinfo('An error occurred exporting the file '+str);
    end;

thorws up an access violation now and again. Any ideas? I have tried everything but can't get this resolved. Also, if it is going to happen periodically, what is the best was to code in multiple retries ?
0
Comment
Question by:WeeStinker
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Limbeck
ID: 20297063
is it possible the user already has a file at location str and that that file is opened by him/her? i did have a similar situation with users who would create a report; open it in acrobat; see somethign that is wrong and regenerate the same report without closing acrobat.
0
 

Author Comment

by:WeeStinker
ID: 20297073
Thanks for your quick reply. Prior to attempting to create the PDF, the program checks to see if file str exists and if it does it deletes it. If it was in use, it would produce a different message to the access violation that I am getting.
    if fileexists(str) then
    begin
        RDPShowInfo('The file '+str+' already exists. PotC will attempt to delete it and recreate it');
        delRes:=deletefile(str);
        if delres=false then
        begin
            RDPShowInfo('PotC was unable to delete the file '+str);
            exit;
        end;
        RDPShowInfo('PotC has deleted the existing file '+str);
    end;

Open in new window

0
 
LVL 19

Accepted Solution

by:
Limbeck earned 500 total points
ID: 20297121
can you reproduce the error or does it happen every now and again using the same report; same pc; same data? if so might just be a memoryproblem; i did have a lot of strange problems with quickreport that were solved using a diff computer with more memory.

you can always try contacting qusoft (since you use exporttopdf i take it you have a license there)

http://www.quickreport.co.uk/supportform.html
0
 

Author Comment

by:WeeStinker
ID: 20297189
I cannot reproduce it at all on my own PCs. My client has approx 15 users and most of these have had this error at some stage. It is intermittent, happening maybe 10% of the time. The PDFs being created are all proforma invoices and it can happen with different ones.

I have emailed qusoft as you suggested.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 141
How to debug For loops? 3 49
control image tags in a string ? 12 129
SUM 2 INTEGER ARRAYS INTO 1 10 100
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question