Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread PDF
Tue, Sep 24 2013 5:44 AMPermanent Link

Petrus van Breda

Hi

I am not an expert on writing code with EWB and i used 3rd party components to do things like reporting. Has anybody got an example of how one can create and display a PDF report.

Secondly will it be possible to email this report to the user?

Thanks
Tue, Sep 24 2013 8:44 AMPermanent Link

Walter Matte

Tactical Business Corporation


I wrote my own back end server using RealThinClient.  The backend uses Report Builder to generate PDF's for display and attachment in emails.  I use Clever Internet Component Suite to send emails.

In this thread there is example code on how to use Report Builder to generate PDFs.

http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&msg=3580

Walter
Mon, Sep 30 2013 4:12 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Petrus,

<< I am not an expert on writing code with EWB and i used 3rd party
components to do things like reporting. Has anybody got an example of how
one can create and display a PDF report. >>

To create it, you can use any components, report writers, etc. that you
normally use with Delphi now.  You would simply put the code in an EWB
module (DLL) that is used with the EWB Web Server:

General information:
http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Modules
Module manual:
http://www.elevatesoft.com/manual?action=contents&id=ewb1mod&product=rsdelphi&version=XE

In the front-end EWB browser application, you would use a TPlugin component
to display the PDF file:

http://www.elevatesoft.com/manual?action=viewcomp&id=ewb1&comp=TPlugin

Just set the URL for the TPlugin component as necessary for your back-end
module, and that's it.

For example, if you decide that your back-end module will be called
"reports", you could then theoretically use a URL like this to return a PDF
to the EWB browser application:

http://www.mysite.com/modules/reports?name=quarterly_summary

In your back-end reports module, you would get an incoming GET request with
a name parameter whose value was "quarterly_summary".  You would then
generate the PDF as a string or file, and return it as a response to the
request with the content type for the response set to "application/pdf".
You would also want to make sure to set the proper mime type in the TPlugin
component:

http://www.elevatesoft.com/manual?action=viewprop&id=ewb1&comp=TPlugin&prop=MIMEType

<< Secondly will it be possible to email this report to the user? >>

As above, as long as you're using EWB modules written in Delphi with the EWB
Web Server, you can use the same code that you use with Delphi on Windows
for emailing anything.

Tim Young
Elevate Software
www.elevatesoft.com
Image