[Gambas-user] gb.report

Fabien Bodard gambas.fr at ...626...
Tue Dec 8 11:42:46 CET 2015


2015-12-08 0:46 GMT+01:00 Buster Seven <buster6seven at ...626...>:
> I’m trying to use the reportview component that i add to a form and then
> display my report without using the preview basically
> my own preview form with the buttons on it to do what i want before it
> printed etc

OKay

so you have two solution.

You can use the reportview widget. Provided by the gb.report2 component.
ReportView.Report = hReport

Or more hard...

you can enforce the report.draw in a drawing area.

hReport.scale = 0.5
hreport.Draw(Page)
hreport.Scale = 1.0

Get the report size in pixel ?

Report.UnitTo(TSizeParse[MyReport.Width].ToInch(), "in", "px")
Report.UnitTo(TSizeParse[MyReport.Height].ToInch(), "in", "px")

This size depend of the device.
By default the desktop one.


In fact i've splitted the viewer in 3 part :

DocumentView -> ReportView -> FPreview

So ReportView is a composite widget that contain a DocumentView and
adapt it to the reports specificities.

DocumentView is a widget that provide the bases to display images in a
multipage documents style, like a pdfviewer or a print preview.

It allow to arrange elements in different mode by using the
Arrangement property and the column one.

To play with it just set the DocumentView.Count property, and the
PageHeight/PageWidth.

I really need to make the doc.

You can also manage the padding arround and the spacing.

You can set the layout of each page in the Layout event.

Like often with me... powerfull but undocumented




More information about the User mailing list