|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 3 of 3 total|
|Tue, Sep 24 2013 5:44 AM||Permanent Link|
Petrus van Breda
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?
|Tue, Sep 24 2013 8:44 AM||Permanent Link|
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.
|Mon, Sep 30 2013 4:12 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< 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:
In the front-end EWB browser application, you would use a TPlugin component
to display the PDF file:
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:
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
<< 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.