Contents:
Introduction
News blog
What is Servoy?
Getting Started
Comparison Servoy/VFP
Performance
How-To's
Code Reference
VFP2Servoy Toolkit
Contact / feedback
|
How to create a simple report
The report-writer in Visual FoxPro has been around for years and never really changed fundamentally. Building
reports is straightfoward and easy. Servoy has an unusual (for us that is) way of creating simple reports. In
Servoy a form can contain report bands such as a Title Header, Leading and Trailing Subsummary bands,
Trailing Grand Summary band, Footer etc.
If that is not enough a third party tool called Jason Reports can be used to fulfill
your more advanced reporting needs. For now lets build a simple report based on the example database.
- Select the example database in the Solution Explorer
- From the List View window select the customers table
- Right-click the customers table and choose Create new form
- In the dialog choose a form name such as frmCustomersReport and press Next
Create form/report dialog
Select some fields
- Select some fields and press Finish
- At the bottom of the form designer select the Parts tab
- Add a Title Header and Footer band
Parts tab
- Return to the Design tab
- Resize the bands according to the image below by dragging the grey tabs on the right
- Reorder the fields if necessary
Resize bands and reorder fields
- Using shapes and lines add some visual enhancements to your report
- Add a textbox and type Customers in the text property
- Set the horizontal alignment of the textbox to CENTER
- Set the Fonttype to Tahoma,bold,24
Add visual enhancements
- Run the form
- From the File menu select Print Preview or press Ctrl+U
Run the form
- Set the printing preferences and margins to suit your needs
- Preview the report and print it if you like what you see
Printing Preview
Conclusion
When running a report-form you will notice that it functions both as a form and as a report.
You can still filter data and change sorting and then print with those
user based settings!
|
External resources:
vfp plugin
ServoyWorld 2012 pics
Official Servoy website
Ken Levy on Servoy
Servoy info
Servoy Forum
Servoy Documentation
|