CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Dynamically Changing PageSize?

Print topic Send  topic

Author Message

Posts: 225
Posted: 04/01/2008, 3:18 PM

Can someone give me some assistance on how to change the PageSize (number of rows) to 'print' on a page at run time.

I have a report which only prints a 'header' when in 'Print' mode. So I want the number of rows to print before the page break on page one to be 6 -less- than on all other pages.

I tried the following and it did nothing:

Function Page_BeforeShow(Sender) 'Page_BeforeShow @1-A1547E8B
'Custom Code @150-73254650
' -------------------------
PRODUCTS_PRO.PageSize = 36
PRODUCTS_PRO.PageSize = 42

...any ideas?



---On a campaign for more examples and better docs!
View profile  Send private message

Posts: 1679
Posted: 04/01/2008, 7:46 PM

Woow, I thought I'd find the solution for you.
I totally stepped through the report source, had a few bright thoughts, but eventualy I concluded:
(and please correct me if I am wrong....)

Without Grouping, no page Footer/Header can be forced, as the Header Footer and Detail are all non-functions.
The only way I can create what you describe here is:
Put the Header in a Panel, Show-Hide that depending on Mode Print/Report.
In the Detail create a panel containing a single row with the same height as the Header or as many rows with nbsp's needed to fill the same space, show-hide this panel depending on Mode Report/Print.
Not tested.
Just out of curiousity I spend a few hours studying various solutions, only one ended up promising but lost 6 rows out of the total result (second page).

BeforeShow of Detail
 if ($Container->PageNumber == 1 && $Container->RowNumber > ($Container->PageSize -6)) {  
$Component->Detail->Visible = False;  

It seems that
a: the dataset is retreived at the start and paginated immediately
b: printing of Headers and Footers (CloseGroup() and OpenGroup()) are part of the printing loop and not separate functions, which should have made it much easier.

Time ran out, so sorry but this is the best I could come up with.

Walter, enjoyed the challenge.

Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me:
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

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

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