Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

The Visual FoxPro 9 Report Writer : Page 3

Microsoft has significantly improved the Report Writer in Visual FoxPro 9, while maintaining compatibility with previous versions of Visual FoxPro Reports, making the new Report Writer a great blend of the old and the new.


advertisement
UI Enhancements
Many changes have been made to the user interface to make designing reports easier and more intuitive. Menus have been overhauled, context menus have been changed, and new options have been added to the Report Designer toolbar. The Expression Builder dialog box and Expression Builder Options dialog box have new behaviors, and a few other miscellaneous user interface enhancements have been added to the Visual FoxPro 9 Report Writer.
The Visual FoxPro 9 Report Writer includes one of the most often requested features: Multiple Detail Bands.
Menus
The report menu system has been overhauled in Visual FoxPro 9 to accommodate new options. In addition, some options have been relabeled for clarity and some options have been repeated on several menus to allow easier access.

  • The new Save As Class... option appears on the File menu.
  • A new option has been added for the Report Designer Toolbar and horizontal lines have been added to separate the Grid Lines and Show Position options from the other options.
  • Many changes appear on the Report menu, including relabeled options, new options, and the addition of the Print Preview option.
Context Menus
Existing context menus have been improved with additional items and are now more consistent with the dialog boxes they invoke. Items in the Report Designer that previously didn't have context menus now do.
  • The Global Context menu has new options and one relabeled option.
  • Invoke the new Band Context menu by right-clicking on the gray bar of any band.
  • Invoke the new Layout Object context menu by right-clicking on any layout object.
Toolbar
The improved Report Designer toolbar, shown in Figure 6, has two new buttons: The Page Setup button and the Font button.

 
Figure 6. Report Designer Toolbar: New options for Page Setup and Font Properties have been added to the Report Designer toolbar.
Expression Builder Dialog Box
A few changes have been made to the Report Expression dialog box, including a taller "Expression for Field" editing box, which allows more room for entering a report expression. When the _REPORTBUILDER system variable is empty, the native behavior of the Expression Builder dialog box is specific. Only tables defined in the Data Environment are listed in the Fields list box. Tables opened outside of the Data Environment are not available in the list box.


When the _REPORTBUILDER system variable is set to ReportBuilder.app, the behavior of the Expression Builder dialog box is quite different. First of all, the Expression Builder defined in _GETEXPR is invoked instead of the native Expression Builder. This Expression Builder dialog box has a combo box for choosing which table should be used when listing fields in the Fields list box. Only tables that are currently in use are listed in the combo box. This is an important point to remember because tables defined in the Data Environment are not automatically opened by the Report Designer, and do not automatically appear in the combo box.

 
Figure 7. Cursor Changes: Use the new mouse cursor to know when an object can be resized.
This gives you the ability to control which tables are available to end-users when you allow them to modify reports within your application. You may have defined some tables in the Data Environment that you need, but to which you don't want user access. Because you have to specifically open the tables you want users to access, you can omit any tables you want to keep from them. Expression Builder Options Dialog Box
The Field aliases option group is now enabled in the Expression Builder Options dialog box. This option group allows you to indicate whether or not you want the table alias added to the report expression when picking fields from the Expression Builder dialog box.

The "Always add alias" and "Never add alias" option buttons cause Visual FoxPro 9 to automatically add the table alias, or to not add the table alias, for all fields. The behavior of the "Add non-selected alias only" option button depends on the value of the _REPORTBUILDER system variable. If the _REPORTBUILDER system variable is empty, any field chosen from a table that is not the InitialSelectedAlias is prefixed with the table alias. Fields from the InitialSelectedAlias table are not prefixed with the table alias.

 
Figure 8. Multiple Selection Dialog: Use the Selection tab of the Multiple Selection dialog box to choose on which layout objects you want to work.
If the _REPORTBUILDER system variable is set to ReportBuilder.app, the "Add non-selected alias only" option uses slightly different logic. The currently selected alias is used instead of the InitialSelectedAlias for determining whether or not to prefix the field with the table alias.

In addition to selecting a field from the Expression Builder dialog box, dragging a field from the Data Environment to the Report Designer surface honors the setting of the "Field aliases" option group. Also, a new option exists on the Report tab of the Options dialog box to determine what the default Field aliases setting is for all newly created reports. Mouse Cursor
The mouse cursor now changes to provide a visual cue when an object can be resized (see Figure 7).

Multiple Selection Dialog Box
Visual FoxPro 9 has a Multiple Selection dialog box, which allows you to set the Protection and Print when properties for more than one layout object at a time. It also allows you to change any of the other properties of any individual layout object. To use this new feature, select more than one layout object, and then double-click any one of the objects to invoke the Multiple Selection dialog box, as shown in Figure 8. The layout objects that were selected when this dialog box was invoked are listed in the first tab of this dialog box. To work with all layout objects defined in a report, use CTRL + A to select all layout objects before invoking this dialog box.

 
Figure 9. Properties Tab: Use the Properties tab of the Multiple Selection dialog box to change the Protection properties and the Print When logic of the selected layout objects all at once.
The "Sort by" option allows you to sort the list of layout objects by Type or Location within the report. The "Remove from list" button removes the selected layout objects from the list. Double-click on any item in the list and the applicable Properties dialog box for the individual object is invoked. The Properties tab of the Multiple Selection dialog box, shown in Figure 9, is used to change the properties of all the items listed in the Selection tab. Select the "Apply these protection settings to the selected objects" checkbox to enable the Protection options. Select the "Apply this condition to the selected objects upon saving" checkbox to enable the Print when option. Change the Protection and "Print when" settings as needed, and then select OK to close the dialog box and apply the changes to all the layout objects listed on the first tab.

More Zoom Levels
The Preview window now has more Zoom levels, ranging from 10% up to 500%.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date