?
Solved

Delphi 7 and QuickReport ExporttoPDF function

Posted on 2007-11-16
4
Medium Priority
?
687 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 1500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 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