Solved

Delphi 7 and QuickReport ExporttoPDF function

Posted on 2007-11-16
4
658 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 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