Jump to content

Support for PDF


dkeene

Recommended Posts

Hello, All

I seem to understand how these  controls can be used to make a web based database application. Is there any support for printing to PDF? For example, a user fills in data aware components, then wants a printout, but more formally, we want to generate a PDF to represent the finished form...

Thanks

doug

Link to comment
Share on other sites

Hello,

6 hours ago, dkeene said:

I seem to understand how these  controls can be used to make a web based database application. Is there any support for printing to PDF? For example, a user fills in data aware components, then wants a printout, but more formally, we want to generate a PDF to represent the finished form...

Can you please specify which edition and build of UniGUI are you using?

Maybe you are looking for something like this example:

\FMSoft\Framework\uniGUI\Demos\Desktop\Report Builder

 

Link to comment
Share on other sites

Thanks, I have not yet purchased, and i am trying to make a decision between uniGui and webcore. uniGui seems easier to set  up for a database web app, but i need to make sure user can print out a form to pdf in the end...

Doug

Link to comment
Share on other sites

Hi Doug,

I know both technologies.

It is possible in both, but Unique has the advantage that you can use a regular Delphi report generator and export it to pdf and present it to the user.

Internally we use 2 tools to generate pdf documents: Fastreport and FlexCell from Tms.

We use Flexcell because it allows us to export all possible data to Excel and generate pdf documents using Excel as templates (end-users can modify the templates).

If you need sample code how to do this using one of the 2 tools mentioned above, let me know.

In web core it is not so simple, because everything is client based, here you would need to call a reporting service on the server to generate the report and send it to the client, more difficult but also possible.

Dominique

  • Like 1
Link to comment
Share on other sites

Dominique:

Thank you very much for the info! I use delphi extensively for many things, and in fact use many TMS based components. I am not familiar with fastreport and flexcell, but will investigate.

I thought that the only components available on uniGUI applications were those on the uniGUI pallet? For example I have access to Gnostice PDF and TMS PDF, but could I access these in a uniGUI application? For example, in uniGUI could I manually draw each uniGUI DBEdit on the PDF Canvas?

I would love to see your code examples if possible. I did see that UniGUI has a PDF Viewer, but I would need to be able to create a PDF version of the form that the user is editing in case he/she wants to print it out.

Thank you very much!

Doug

Link to comment
Share on other sites

Thank you all; fastreport seems nice, but it's another product to purchase. Is there any way of achieving what i am asking using the components that i already have? I am happy to draw on a canvas and make a PDF file, but can I do this in an uniGUI application?

Thanks

Doug

Link to comment
Share on other sites

Hi Doug,

If you are able to generate a pdf in a regular VCL application, you can use the same code in a Unique application.

When the pdf is generated you just display it in the pdf control.

You can generate a pdf in a temporary directory in the server. This is for example the code to generate a pdf from an Excel file and display it in an URLFrame. It's the same code to show it in a PDFFrame. As you can see Unigui has functions to get a temporary filename in a cache dat will be cleaned up automatically.

pdf := TFlexCelPdfExport.Create;

 try

Pdf.Workbook := TXlsFile.Create;

pdf.Workbook.Open(ExcelFileName);

pdf.Export(UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', AUrl, True));

finally

pdf.Free;

end;

URLFrame.URL := AUrl;

Dominique

Link to comment
Share on other sites

Reporting is essential in development, I don't think that there a single project without reporting, so you might think of a professional and fast way to to it, reporting components: Fastreport, Quickreport....give you the power to do that (also when it comes to multilangual reports) you can't do it with drawing shapes and text it will be difficult.

Link to comment
Share on other sites

  • 10 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...