CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PDF creating using CCS

Print topic Send  topic

Author Message
Odin

Posts: 17
Posted: 07/14/2006, 4:09 AM

Hi all,

I tried out a lot of tips and solution for generating a PDF using CCS.
It works great (with fpdf-class).
My question:

Is there any way to parse/read the actual SQL-Statement in the OnInitializeView-Event to manipulate the query by the user, or read it from Search-Form? I know, that this works fine inside the BeforeExecuteSelect-Event. The problem ist, that I'm craeting the PDF at the first Event after click a "ToPDFLink".

Many thank for help!
View profile  Send private message
DonB
Posted: 07/14/2006, 5:46 AM

Why you are using OnInitialize? I always put the PDF 'output' code into my
page's BeforeShow event. If the answer is to avoid sending any html to the
output stream ahead of the pdf, did you delete everything from the template
(html) file? That is what I do and it works. And I get the Data Source
initialized and avoid the scenario you describe.

--
DonB

http://www.gotodon.com/ccbth


"Odin" <Odin@forum.codecharge> wrote in message
news:544b77b63caee3@news.codecharge.com...
> Hi all,
>
> I tried out a lot of tips and solution for generating a PDF using CCS.
> It works great (with fpdf-class).
> My question:
>
> Is there any way to parse/read the actual SQL-Statement in the
> OnInitializeView-Event to manipulate the query by the user, or read it
from
> Search-Form? I know, that this works fine inside the
BeforeExecuteSelect-Event.
> The problem ist, that I'm craeting the PDF at the first Event after click
a
> "ToPDFLink".
>
> Many thank for help!
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Odin

Posts: 17
Posted: 07/14/2006, 6:02 AM

Hi DonB,

thank for reply!
Is this the right solution, if I want to generate the PDF on demand, or will it be generated everytime the page is reloaded? I would please the user to click on an link/button after he has made his settings for the search. So, after the ResultGrid is shown, he should be able to download the "report" as PDF-File.
Is it impossible?
THX
View profile  Send private message
DonB
Posted: 07/14/2006, 7:20 AM

I failed to mention that I make a page that does ONLY the pdf output, then
that page is referenced elsewhere (such as in a Link control). Thus, the
PDF is generated only when the link is clicked.

I'd have a page that the search page returns to after the search button is
clicked, then this 'results' page would have a link to the pdf page. You
could have the search form 'Return Page' set to the pdf page. That would
work too, if you dont mind the pdf being a 'dead end' (no way to return to
your application, other than perhaps the 'back button' of the browser).

--
DonB

http://www.gotodon.com/ccbth


"Odin" <Odin@forum.codecharge> wrote in message
news:544b795e750d84@news.codecharge.com...
> Hi DonB,
>
> thank for reply!
> Is this the right solution, if I want to generate the PDF on demand, or
will it
> be generated everytime the page is reloaded? I would please the user to
click on
> an link/button after he has made his settings for the search. So, after
the
> ResultGrid is shown, he should be able to download the "report" as
PDF-File.
> Is it impossible?
> THX
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Odin

Posts: 17
Posted: 07/17/2006, 7:55 AM

Hi DonB,

thanks a lot. Everything is done. Ready.
Solution:

@1
CCSetSession(name, value) at the "search-side" in the "BeforeBuildSelect"-Event

@2
Create a link to the export-page

@3
Use the CCGetSession(name, value) to build your sql-query

@4
Create the PDF-output

Many thanks for your help!!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.