Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with FSIZE()
Message
From
18/07/2000 16:43:23
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00393504
Message ID:
00394040
Views:
11
>>But the class is working now properly. It creates an FRX file automatically based on the selected cursor, and it is possible to customize the report (field order, field selection, font, page layout etc) programatically (for the developer) or with an interface (for the user) to a certain extend.
>
> Yes, I may be interested if you tell me what your class can do.

You have a cursor (or Alias) open in the current workarea and instantiate the container class like in this example:
IF NOT "CREPORTCLAS" $ SET("ClassLib")
SET CLASSLIB TO "cReportClas" ADDITIVE
ENDIF
otest = newobj("form")
WITH otest
.Width = 445
.Height = 330
.BorderStyle = 2
.AutoCenter = .T.
.Caption = "Custom report generator"
.MAXBUTTON = .F.
.MinButton = .F.
.AddObject("pTest","CustRep")
* the path can be any path where you might want to save the frx file.
.pTest.pPath = SYS(5) + CURDIR()
* you don't need to make the object visible, you can do everything in
* code with .pTest.
.pTest.Visible = .T.
.Show()
ENDWITH
In the container are two listboxes, one with the fields that are shown in the report, another with the fields that are excluded from the report. The user can change the order of the columns appearing in the report.
There are a lot of other controls, like report caption, minimum width, field wrapping, report layout, font size and name etc, that you can change interactively (or let the user make the choice).
There is a subclass that doesn't give all the options, a kind or simple mode, I prefer this in my applications.
You can create an frx file and save it, or you use a temporary frx file that you will loose afterwards. It is similar to the "Quick report" function, but with much more possibilities.
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform