[Gambas-user] Who use gb.report ? (to all gambas users)
Benoît Minisini
gambas at ...1...
Thu Aug 30 18:07:49 CEST 2012
Le 30/08/2012 17:50, Fabien Bodard a écrit :
> Well so, I need to make this big big work :-(
>
> In fact one the problem is gambas users mostly not understand the box
> arrangement system in gambas.
>
About the "arrangement system", the main idea is:
You make a report by telling how each element is positioned relatively
to each other, or relatively to its parent. That way, the report can be
drawn whatever the page size is.
How it is done concretely? It's taken from the GUI arrangement system:
- You have containers that arrange their children vertically,
horizontally... and that know how much space they have.
- You have display elements that can have either absolute sizes
(expressed in various units). They can also marked as expandable to let
their parents expand them if there is space available.
The root parent is the page itself. As the user tells the size of that
page, we can recursively compute the size of all page elements according
to the container and child elements properties, and then print the report.
Moreover, the root parent is clever enough, if it has not enough space
for its children, to spread accross new pages automatically. So there is
way to tell which elements are repeated between different pages (so that
you can create headers and footers), and which are not. Fabien could
tell you more about that.
Of course, for reports having a few elements, all that a bit complex.
But for real reports made by real guys who have clients having many
paper formats and many different printers, that will save you a lot of
worry.
If you don't understand how to use Gambas GUI containers, you won't
understand how to use Report containers.
Regards,
--
Benoît Minisini
More information about the User
mailing list