Jump to content

Using QuickReport with PDF Download


Recommended Posts

[dcc32 Error] Main.pas(18): E2003 Undeclared identifier: 'TUniPDFFrame'

 

But i have TUniPDFFrame component on the UniGUI Additioonal toolbar... what's wrong ?

 

,

Search for that unit and verify  your project's search path.

Link to comment
Share on other sites

  • 1 year later...

Parabéns pelo exemplo!

Adaptei para que não seja solicitado o diálogo de salvamento do pdf e para que o arquivo gerado seja aberto automaticamente.
Obs. Adicionar ShellApi no uses.

try
    mUniquePDfName := UniServerModule.TempFolderPath + unisession.SessionId+'.pdf';
    mLocalURL      := UniServerModule.TempFolderURL  + unisession.SessionId+'.pdf';
    aPDF := TQRPDFDocumentFilter.Create(mUniquePDfName);
    Report.QuickRep1.Prepare;
    Report.QuickRep1.ExportToFilter( aPDF);
    try
     ShellExecute(0, 'OPEN', PChar(mUniquePDfName), '', '', SW_SHOWMAXIMIZED);
    except
    end;
  finally
    aPDF.Free;
    Report.Free;
  end;

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...