This version of the program is shareware. See end of file for
registration information.
Programmer: Robert J. Johnston
Uploaded by: Robert J. Johnston
This file and programs Copyright (c) 1993 Robert J. Johnston. All rights
reserved.
Last Updated: August 28, 1993
Files supplied by programmer:
Xtal31.exe
Xtal31.me
Files not supplied:
VBRUN300.DLL
CMDIALOG.VBX
Keywords:
Xtal Report Field Scaler 3.1, Xtal31, Labels, Visual Basic, VB,
Crystal Reports, Windows
For:
Registered Owners of Microsoft Visual Basic 3.0 AND Crystal Reports.
Description:
Xtal Report Field Scaler 3.1 is a maintenance release version of
version of 3.0. Included are handy utilities for modifying reports
designed with Crystal Reports. Also included is a DLL for runtime
use that allows you to get and set user defined labels, change
facename and size; get report titles and comments; VB demo
source code included. Xtal31 needs vbrun300.dll and cmdialog.vbx
(compatible with VB 3). Shareware 24$ (the DLL is free). Uploaded
by author.
Bug fixes for Version 3.1:
1) Font facename changes may have prevented you from changing
the facename in Crystal Reports if the font family or character set
were different than the original. This has been fixed. Note: It appears
that Crystal Reports doesn't handle "Decorative Fonts." If you select
Wingdings, for example, Crystal Reports marks it as a "Don't Care"
font and you will probably get Symbol.
2) Facenames greater than 15 characters were truncated to 15
characters. This has been fixed so that facenames up to 31
characters are handled correctly.
3) If you tried to save to the original filename, you got the appropriate
error message, but due to a logic error, arrays were cleared so that
when you tried to save to a different filename you got garbage. There
were also some other errors that caused same thing. The way
around this was that you had to Open the source file again. This has
been fixed.
4) "Same FontSize" size wasn't being loaded correctly from
templates.
5) In Mini-Edit, as you scrolled with "Show Printer Margins" on, the
margins didn't move the right distance.
6) In Mini-Edit, you can no longer move a field over the left margin.
You will now "bump" into it.
Enhancements for Version 3.1 (Not many):
1) Undo 10 levels.
2) Ability to narrow or widen fields using the arrow keys.
3) Change font attributes: Bold, Italic, Underline, Strikethru.
4) Set attributes that hide or show fields during printing.
5) Mini-Edit window position saved.
Enhancements for Version 3.0:
1) Export formulas to an ascii text file so you can make corrections
using a word processor.
2) Import formulas from an ascii text file.
a) Merge formulas or
b) Replace all formulas.
3) Have Xtal30 automatically remove unused and unreferenced
formulas during saves.
4) Reorder group
s. Fields are automatically moved with associated
group section when saving.
5) Delete fields in mini-edit window. Start from scratch quickly.
6) Can display field names inside boxes that represent fields.
7) Faster dragging. Have three drag drawing options.
Fixes in 3.0:
1) Fix to About Dialog that wouldn't run because it wanted
QPRORUN200.DLL.
2) Scale factors for Top and Bottom weren't being saved to templates.
3) Group names shown in mini-edit for lines and boxes were
sometimes incorrect.
4) Some field names showed as string of box characters.
5) Some group names showed incorrectly if there wasn't a grand total
secton.
Improvements:
1) Found a more optimum height for displaying fields. Now lines and
boxes are displayed just about where they should be.
Setup:
Xtal31.exe and Xtal31.me have to be in the same directory.
Once Xtal31 is running in Windows:
1) Select the report to scale or edit using File Open.
2) Set the options.
3) Save to new file using File Save As. Destination cannot be the
same as the source file.
Options:
1) Set Font Size.
2) Set Page Orientation.
3) Set scale factor and objects to scale.
4) Import Formulas
5) Export Formulas
6) Reorder groups
7) Use mini-edit to make other changes, such as font names, aligning
fields, inserting space for a new column.
Trouble shooting:
If you import formulas, delete fields, reorder groups, and scale fields in
one save and get an error message while loading the report into
Crystal Reports, try performing fewer opertations in order to isolate
the problem. You may solve the problem by reading the rest of this
file.
FYI: I design standard reports with up to 25 sections, 200 formulas,
250 fields, and a few horizontal lines -- although Xtal31 will handle
more. I haven't tried Xtal31 on reports designed with multi-columnar
options in Crystal Reports and expect I would get load errors.
**** About Deleting Fields *****
Use mini-edit to select fields, lines, and boxes that you want to delete,
then select Edit Delete. Due to my time contraints, bitmaps can't be
deleted.
**** About Reordering Groups ****
When you reorder groups, the fields in that group's header and footer
sections go with it. If you don't want this to happen, then you will have
to use Crystal Reports.
Lines and boxes that don't extend into multiple sections are also
moved. This preserves the placement of lines used as underlines.
If you get an error while loading a report into Crystal Reports, it may be
due to a vertical line that crosses sections. The coordinates are invalid
for the reordered sections. Try deleting the vertical lines and the boxes
that cross sections and then put them back in with Crystal Reports.
Page header, detail, grand total, and page footer sections can't be
reordered.
You won't see reordered groups in the Mini-Edit window.
As a reminder that you are reordering groups, the Reordering light
goes on. It will go out when you select File Open or go into the
Reorder Groups dialog and reset the order to the original order.
**** About Importing and Exporting formulas: ****
NOTE: Xtal31 does not check to see if formulas are valid.
The way to make changes to formulas is to
1. Export formulas to an ascii file.
2. Use your favorite text editor to make changes to formulas, but
not formula names.
3. Import the formulas back from the text file. You must select all
formulas in the listbox, using the Select All button, so that you can
select the Replace Formulas option.
4. Save the file.
When formulas are exported, any double quotes (chr$(34)) are
converted to single quotes and then double quotes are placed around
the entire formula. Make sure you do the same when creating new
formulas that you plan to import. The field name also has double
quotes placed around it. The field name comes first followed by the
formula on the next line (no blank lines inbetween the two). There can
be one or more blank lines between each set, but you can't put blank
lines between the formula name and its associated formula. If in doubt,
export some formulas and then take a look at the file using Write. If
you use Write, make sure to specify text files as the type of file when
saving; and No Conversion when loading.
When merging formulas, only formulas that don't already exist in the
report are added (based on formula name). When merging, you can
select specific formulas to import. You don't have to select all of them,
unlike replacing formulas.
You can export formulas from one report and then import them into
another report. Imported formulas will be invalid if they refer to data
base fields or other formulas that aren't in the report.
During saves, and if you aren't importing formulas, Xtal31 will ask you if
you want to remove unused formulas. If you answer yes, then unused
and unreferenced formulas are removed.
As a reminder that you are importing formulas, the Importing light goes
on. It goes out when you go into the Importing dialog and deselect all
formula names.
**** About Mini-Edit ****
The purpose of mini-edit is to let you select fields with a mouse by
drawing a bounding box around the fields you want to select in order to
make font changes, insert spaces for new columns, align fields on the
left or right edges, and to delete fields.
The mini-edit window shows the outline of the fields. As you pass the
cursor over each field while all mouse buttons are up, the field name,
group name, and font info are displayed in the status bar. Newly
added is the option to display field names within the field boxes
themselves. Select the fields you want to use this option on, then
select View Show Field Names. I usually select the column headings.
To turn off, select fields and then select View Hide Field Names.
Mini-Edit does not show an exact representation of the field layout that
you see in Crystal Reports. No attempt is made to adjust line height
based on fonts. The fields are represented fairly closely though.
Fields can only be adjusted on the left and right edges. All objects in
mini-edit can only be moved left or right. I let Crystal Reports do the
vertical adjustments of fields.
When aligning fields, select only the fields in one column before using
the Edit Align menu items. If you select two or more columns, the
columns will be merged and you will have to use Undo.
No matter what option you select for Font Sizes (on main form), any
font name changes made with mini-edit will still take place.
Even though you have unchecked all the Scale checkboxes (on main
form), fields moved in mini-edit will still take place. If you do have the
Scale items checked, the scale factor is applied to the new positions
you might make in mini-edit.
Select fields by drawing a bounding box around them or by clicking on
each one. Clear the fields that you have selected by drawing a
bounding box around them or by clicking on each one. You cannot
deselect fields by clicking on a blank part of the form. Once fields are
selected you can perform operations on them through the Edit menu.
Pressing the right mouse button in Mini-Edit will pop up the edit menu.
To move selected fields using the drag method, click on the
DRAG:OFF/ON menu item, position the cursor somewhere on the
page, and then press and hold the left mouse button down while
moving the mouse left or right. When DRAG:ON is selected, you
cannot select fields.
Hint: If the shift key is held down, then clicking on a selected field will
not deselect it, and you can begin dragging it and other selected
fields.
Hint: You can select an unselected field and begin dragging it by
pressing and HOLDING down the left mouse button -- the cursor
changes to left-right arrows. Other selected fields will be dragged
along.
If fields overlap, there may be spurious lines left behind when dragging.
These go away when you release the mouse button after dragging.
If you mess up the layout in mini-edit, you can try EDIT UNDO or just
load the original file again using File Open.
If you have drawn a rectangle around your entire report, you will have to
move it out of the way if you need to select individual fields.
Text that you type into a report and is not part of a field is not shown in
the mini-edit window. You will have to manually move the text,
although you can indirectly change the font name and size as
described in next paragraph.
If you select all fields and change the font name or size, all objects--
even though not shown--will be affected. Each object has a font
associated with it, such as beginning of lines, text between tabs.
Exceptions are lines, boxes, bitmaps.
Bitmaps, lines, and boxes can also be scaled vertically using the top
and bottom scale factors. The top and bottom scale factors should be
set to 1.00 if you have mostly horizontal lines.
Not all printer fonts displayed in the dialog box will work, especially the decorative fonts. For example, you can specify WingDings but will probably get Symbol. It doesn't matter if you try it from Crystal Reports or Xtal31.
**** About Scaling ****
Normally fields are snapped to an invisible grid. If you uncheck the
Snap-to-Grid option, the fields will be positioned according the scale
factor; however, you may have trouble in Crystal Reports because if
you select a field, it will get snapped while the others won't. This will
cause fields to be misaligned. You can't put the field back in the
position Xtal put it, unless by chance it is positioned where it would
have been positioned if Snap-to-Grid were checked.
Page orientation cannot be set if you did not specify a printer when
you saved your original report.
Upon unloading Xtal31, the last option settings are saved to a file
name Xtaltmpl.xtl. When Xtal31 is loaded, this file is read and the
option settings are set accordingly. Therefore use a different name for
saving your templates.
If you have a report that has many hidden groups that you want to
show, use the Unhide All Groups checkbox. Then when you load the
report into Crystal Reports, all groups will be shown. All groups are
shown automatically in mini-edit.
Because Crystal Reports adjusts line heights based on font size,
some objects, such as lines and boxes, may not be positioned
exactly where you would like them after scaling a report--even though
they have been scaled as instructed. It is better to adjust the graphics
manually in Crystal Reports than trying to find an optimum scaling
factor in Xtal31. If you have horizontal lines underlining fields, it seems
that a top and bottom scale factor of 1.00 works best, even though you
are scaling the left and right edges to something else.
While Xtal31 does an excellent job of moving and resizing fields, you
will still need to load the new report into Crystal Reports and may need
to make a few adjustments, mainly:
1) Re-center centered fields.
2) Make adjustments to graphics.
3) Save the file.
For best results, the original report should be designed where
predominately all fields have the same font size. Text that you have
type into reports should be converted to a field.
Example: if you are trying to scale a report from landscape to portrait,
and the font size of most of the fields is 10, try Xtal31 with a font size
of 7 and left and width scale factors of .75. When printing the report to
a window or viewing the report layout in Crystal Reports, you should
have Small Fonts installed when your report contains fields with font
sizes less than 8.
**** Registration ****
Creation of this program required extra-special analytic abilities, so...
This version of the program is shareware. After 30 days register with
me at address below for $24.00 (US) check or money order. No credit
cards. One registration required for each machine the program is run
on. You can give copies of the program to others so they can evaluate
it; however, they must register 30 days after they receive the copies.
You must give them copies of both XTAL31.EXE and XTAL31.ME.
Disclaimer: Author knows nothing and is not responsible for anything.
Author has not had any help from anyone. No one has reported any
bugs. Xtal31 may or may not work with reports created with earlier or