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 ?

Link to comment
Share on other sites

[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...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...