home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / x_tal4 / xtal31.txt < prev    next >
Text File  |  1993-08-28  |  16KB  |  373 lines

  1. Title: Xtal Report Field Scaler 3.1
  2. Version: 3.1
  3. This version of the program is shareware. See end of file for 
  4. registration information.
  5. Programmer: Robert J. Johnston
  6. Uploaded by: Robert J. Johnston
  7. This file and programs Copyright (c) 1993 Robert J. Johnston. All rights 
  8. reserved.
  9.  
  10. Last Updated: August 28, 1993
  11.  
  12.  
  13. Files supplied by programmer:
  14. Xtal31.exe
  15. Xtal31.me
  16.  
  17. Files not supplied:
  18. VBRUN300.DLL
  19. CMDIALOG.VBX
  20.  
  21. Keywords: 
  22. Xtal Report Field Scaler 3.1, Xtal31, Labels, Visual Basic, VB,  
  23. Crystal Reports, Windows
  24.  
  25. For: 
  26. Registered Owners of Microsoft Visual Basic 3.0 AND Crystal Reports.
  27.  
  28. Description:
  29. Xtal Report Field Scaler 3.1 is a maintenance release version of 
  30. version of 3.0.  Included are handy utilities for modifying reports 
  31. designed with Crystal Reports. Also included is a DLL for runtime 
  32. use that allows you to get and set user defined labels, change 
  33. facename and size; get report titles and comments; VB demo 
  34. source code included. Xtal31 needs vbrun300.dll and cmdialog.vbx 
  35. (compatible with VB 3).  Shareware 24$ (the DLL is free). Uploaded 
  36. by author.
  37.  
  38.  
  39. Bug fixes for Version 3.1:
  40. 1) Font facename changes may have prevented you from changing 
  41. the facename in Crystal Reports if the font family or character set 
  42. were different than the original. This has been fixed. Note: It appears 
  43. that Crystal Reports doesn't handle "Decorative Fonts." If you select 
  44. Wingdings, for example, Crystal Reports marks it as a "Don't Care" 
  45. font and you will probably get Symbol. 
  46. 2) Facenames greater than 15 characters were truncated to 15 
  47. characters. This has been fixed so that facenames up to 31 
  48. characters are handled correctly.
  49. 3) If you tried to save to the original filename, you got the appropriate 
  50. error message, but due to a logic error, arrays were cleared so that 
  51. when you tried to save to a different filename you got garbage. There 
  52. were also some other errors that caused same thing. The way 
  53. around this was that you had to Open the source file again. This has 
  54. been fixed.   
  55. 4) "Same FontSize" size wasn't being loaded correctly from 
  56. templates.
  57. 5) In Mini-Edit, as you scrolled with "Show Printer Margins" on, the 
  58. margins didn't move the right distance.
  59. 6) In Mini-Edit, you can no longer move a field over the left margin. 
  60. You will now "bump" into it.
  61.  
  62. Enhancements for Version 3.1  (Not many):
  63. 1) Undo 10 levels.
  64. 2) Ability to narrow or widen fields using the arrow keys.
  65. 3) Change font attributes: Bold, Italic, Underline, Strikethru.
  66. 4) Set attributes that hide or show fields during printing.
  67. 5) Mini-Edit window position saved.
  68.  
  69. Enhancements for Version 3.0:
  70. 1) Export formulas to an ascii text file so you can make corrections 
  71. using a word processor.
  72. 2) Import formulas from an ascii text file.
  73.    a) Merge formulas or
  74.    b) Replace all formulas.
  75. 3) Have Xtal30 automatically remove unused and unreferenced 
  76. formulas during saves.
  77. 4) Reorder group
  78. s. Fields are automatically moved with associated 
  79. group section when saving.
  80. 5) Delete fields in mini-edit window. Start from scratch quickly.
  81. 6) Can display field names inside boxes that represent fields.
  82. 7) Faster dragging. Have three drag drawing options.
  83.  
  84. Fixes in 3.0:
  85. 1) Fix to About Dialog that wouldn't run because it wanted 
  86. QPRORUN200.DLL. 
  87. 2) Scale factors for Top and Bottom weren't being saved to templates.
  88. 3) Group names shown in mini-edit for lines and boxes were 
  89. sometimes incorrect.
  90. 4) Some field names showed as string of box characters.
  91. 5) Some group names showed incorrectly if there wasn't a grand total 
  92. secton.
  93.  
  94. Improvements:
  95. 1) Found a more optimum height for displaying fields. Now lines and 
  96. boxes are displayed just about where they should be.
  97.  
  98.  
  99. Setup:
  100. Xtal31.exe and Xtal31.me have to be in the same directory.
  101.  
  102. Once Xtal31 is running in Windows:
  103. 1) Select the report to scale or edit using File Open.
  104. 2) Set the options.
  105. 3) Save to new file using File Save As. Destination cannot be the 
  106. same as the source file.
  107.  
  108. Options:
  109. 1) Set Font Size.
  110. 2) Set Page Orientation.
  111. 3) Set scale factor and objects to scale.
  112. 4) Import Formulas
  113. 5) Export Formulas
  114. 6) Reorder groups
  115. 7) Use mini-edit to make other changes, such as font names, aligning 
  116. fields, inserting space for a new column.
  117.  
  118.  
  119. Trouble shooting:
  120. If you import formulas, delete fields, reorder groups, and scale fields in 
  121. one save and get an error message while loading the report into 
  122. Crystal Reports,  try performing fewer opertations in order to isolate 
  123. the problem.  You may solve the problem by reading the rest of this 
  124. file. 
  125.  
  126. FYI: I design standard reports with up to 25 sections, 200 formulas, 
  127. 250 fields, and a few horizontal lines -- although Xtal31 will handle 
  128. more.   I haven't tried Xtal31 on reports designed with multi-columnar 
  129. options in Crystal Reports and expect I would get load errors. 
  130.   
  131.  
  132. **** About Deleting Fields *****
  133.  
  134. Use mini-edit to select fields, lines, and boxes that you want to delete, 
  135. then select Edit Delete. Due to my time contraints, bitmaps can't be 
  136. deleted.
  137.  
  138.  
  139. ****  About Reordering Groups ****
  140.  
  141. When you reorder groups, the fields in that group's header and footer 
  142. sections go with it. If you don't want this to happen, then you will have 
  143. to use Crystal Reports.  
  144.  
  145. Lines and boxes that don't extend into multiple sections are also 
  146. moved. This preserves the placement of lines used as underlines.
  147.  
  148. If you get an error while loading a report into Crystal Reports, it may be 
  149. due to a vertical line that crosses sections. The coordinates are invalid 
  150. for the reordered sections. Try deleting the vertical lines and the boxes 
  151. that cross sections and then put them back in with Crystal Reports.  
  152.  
  153. Page header, detail, grand total, and page footer sections can't be 
  154. reordered. 
  155.  
  156. You won't see reordered groups in the Mini-Edit window. 
  157.  
  158. As a reminder that you are reordering groups, the Reordering light 
  159. goes on. It will go out when you select File Open or go into the 
  160. Reorder Groups dialog and reset the order to the original order.
  161.  
  162.  
  163. **** About Importing and Exporting formulas: ****
  164.  
  165. NOTE: Xtal31 does not check to see if formulas are valid. 
  166.  
  167. The way to make changes to formulas is to 
  168.    1. Export formulas to an ascii file.
  169.    2. Use your favorite text editor to make changes to formulas,  but 
  170. not formula names. 
  171.    3. Import the formulas back from the text file. You must select all 
  172. formulas in the listbox, using the Select All button, so that you can 
  173. select the Replace Formulas option.
  174.    4. Save the file.
  175.    
  176. When formulas are exported, any double quotes (chr$(34)) are 
  177. converted to single quotes and then double quotes are placed around 
  178. the entire formula. Make sure you do the same when creating new 
  179. formulas that you plan to import. The field name also has double 
  180. quotes placed around it. The field name comes first followed by the 
  181. formula on the next line (no blank lines inbetween the two). There can 
  182. be one or more blank lines between each set, but you can't put blank 
  183. lines between the formula name and its associated formula. If in doubt, 
  184. export some formulas and then take a look at the file using Write. If 
  185. you use Write, make sure to specify text files as the type of file when 
  186. saving; and No Conversion when loading.
  187.  
  188. When merging formulas, only formulas that don't already exist in the 
  189. report are added (based on formula name). When merging, you can 
  190. select specific formulas to import. You don't have to select all of them, 
  191. unlike replacing formulas.
  192.  
  193. You can export formulas from one report and then import them into 
  194. another report. Imported formulas will be invalid if they refer to data 
  195. base fields or other formulas that aren't in the report. 
  196.  
  197. During saves, and if you aren't importing formulas, Xtal31 will ask you if 
  198. you want to remove unused formulas. If you answer yes, then unused 
  199. and unreferenced formulas are removed.
  200.  
  201. As a reminder that you are importing formulas, the Importing light goes 
  202. on. It goes out when you go into the Importing dialog and deselect all 
  203. formula names.  
  204.  
  205.  
  206.  
  207. **** About Mini-Edit ****
  208.  
  209. The purpose of mini-edit is to let you select fields with a mouse by 
  210. drawing a bounding box around the fields you want to select in order to 
  211. make font changes, insert spaces for new columns, align fields on the 
  212. left or right edges, and to delete fields.
  213.  
  214. The mini-edit window shows the outline of the fields. As you pass the 
  215. cursor over each field while all mouse buttons are up, the field name, 
  216. group name, and font info are displayed in the status bar.  Newly 
  217. added is the option to display field names within the field boxes 
  218. themselves. Select the fields you want to use this option on,  then 
  219. select View Show Field Names. I usually select the column headings. 
  220. To turn off, select fields and then select View Hide Field Names.
  221.  
  222. Mini-Edit does not show an exact representation of the field layout that 
  223. you see in Crystal Reports. No attempt is made to adjust line height 
  224. based on fonts. The fields are represented fairly closely though. 
  225.  
  226. Fields can only be adjusted on the left and right edges. All objects in 
  227. mini-edit can only be moved left or right. I let Crystal Reports do the 
  228. vertical adjustments of fields.
  229.  
  230. When aligning fields, select only the fields in one column before using 
  231. the Edit Align menu items. If you select two or more columns, the 
  232. columns will be merged and you will have to use Undo.
  233.  
  234. No matter what option you select for Font Sizes (on main form),  any 
  235. font name changes made with mini-edit will still take place.
  236.  
  237. Even though you have unchecked all the Scale checkboxes (on main 
  238. form), fields moved in mini-edit will still take place.  If you do have the 
  239. Scale items checked, the scale factor is applied to the new positions 
  240. you might make in mini-edit.
  241.  
  242. Select fields by drawing a bounding box around them or by clicking on 
  243. each one.  Clear the fields that you have selected by drawing a 
  244. bounding box around them or by clicking on each one. You cannot 
  245. deselect fields by clicking on a blank part of the form. Once fields are 
  246. selected you can perform operations on them through the Edit menu. 
  247. Pressing the right mouse button in Mini-Edit will pop up the edit menu. 
  248. To move selected fields using the drag method, click on the 
  249. DRAG:OFF/ON menu item, position the cursor somewhere on the 
  250. page, and then press and hold the left mouse button down while 
  251. moving the mouse left or right. When DRAG:ON is selected, you 
  252. cannot select fields.  
  253.  
  254. Hint: If the shift key is held down, then clicking on a selected field will 
  255. not deselect it, and you can begin dragging it and other selected 
  256. fields.  
  257.  
  258. Hint: You can select an unselected field and begin dragging it by 
  259. pressing and HOLDING down the left mouse button -- the cursor 
  260. changes to left-right arrows. Other selected fields will be dragged 
  261. along.
  262.  
  263. If fields overlap, there may be spurious lines left behind when dragging. 
  264. These go away when you release the mouse button after dragging.
  265.  
  266.  
  267.  
  268. If you mess up the layout in mini-edit, you can try EDIT UNDO or just 
  269. load the original file again using File Open.
  270.  
  271. If you have drawn a rectangle around your entire report, you will have to 
  272. move it out of the way if you need to select individual fields.
  273.  
  274. Text that you type into a report and is not part of a field is not shown in 
  275. the mini-edit window. You will have to manually move the text, 
  276. although you can indirectly change the font name and size as 
  277. described in next paragraph.
  278.  
  279. If you select all fields and change the font name or size, all objects-- 
  280. even though not shown--will be affected. Each object has a font 
  281. associated with it, such as beginning of lines, text between tabs. 
  282. Exceptions are lines, boxes, bitmaps.
  283.  
  284. Bitmaps, lines, and boxes can also be scaled vertically using the top 
  285. and bottom scale factors. The top and bottom scale factors should be 
  286. set to 1.00 if you have mostly horizontal lines. 
  287.  
  288. 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.
  289.  
  290.  
  291. **** About Scaling ****
  292.  
  293. Normally fields are snapped to an invisible grid. If you uncheck the 
  294. Snap-to-Grid option, the fields will be positioned according the scale 
  295. factor; however, you may have trouble in Crystal Reports because if 
  296. you select a field, it will get snapped while the others won't. This will 
  297. cause fields to be misaligned. You can't put the field back in the 
  298. position Xtal put it, unless by chance it is positioned where it would 
  299. have been positioned if Snap-to-Grid were checked. 
  300.  
  301. Page orientation cannot be set if you did not specify a printer when 
  302. you saved your original report.
  303.  
  304. Upon unloading Xtal31,  the last option settings are saved to a file 
  305. name Xtaltmpl.xtl. When Xtal31 is loaded, this file is read and the 
  306. option settings are set accordingly. Therefore use a different name for 
  307. saving your templates.
  308.  
  309. If you have a report that has many hidden groups that you want to 
  310. show, use the Unhide All Groups checkbox. Then when you load the 
  311. report into Crystal Reports, all groups will be shown. All groups are 
  312. shown automatically in mini-edit.
  313.  
  314. Because Crystal Reports adjusts line heights based on font size, 
  315. some objects, such as lines and boxes, may not be positioned 
  316. exactly where you would like them after scaling a report--even though 
  317. they have been scaled as instructed. It is better to adjust the graphics 
  318. manually in Crystal Reports than trying to find an optimum scaling 
  319. factor in Xtal31. If you have horizontal lines underlining fields, it seems 
  320. that a top and bottom scale factor of 1.00 works best, even though you 
  321. are scaling the left and right edges to something else.
  322.  
  323.  
  324. While Xtal31 does an excellent job of moving and resizing fields, you 
  325. will still need to load the new report into Crystal Reports and may need 
  326. to make a few adjustments, mainly:
  327. 1) Re-center centered fields.
  328. 2) Make adjustments to graphics.
  329. 3) Save the file.
  330.  
  331. For best results, the original report should be designed where 
  332. predominately all fields have the same font size. Text that you have 
  333. type into reports should be converted to a field. 
  334.  
  335. Example: if you are trying to scale a report from landscape to portrait, 
  336. and the font size of most of the fields is 10, try Xtal31 with a font size 
  337. of 7 and left and width scale factors of .75.  When printing the report to 
  338. a window or viewing the report layout in Crystal Reports, you should 
  339. have Small Fonts installed when your report contains fields with font 
  340. sizes less than 8.
  341.  
  342.  
  343.  
  344. **** Registration ****
  345.  
  346. Creation of this program required extra-special analytic abilities, so...
  347.  
  348. This version of the program is shareware. After 30 days register with 
  349. me at address below for $24.00 (US) check or money order.  No credit 
  350. cards.  One registration required for each machine the program is run 
  351. on. You can give copies of the program to others so they can evaluate 
  352. it; however, they must register 30 days after they receive the copies. 
  353. You must give them copies of both XTAL31.EXE and XTAL31.ME. 
  354.  
  355. Disclaimer: Author knows nothing and is not responsible for anything.
  356. Author has not had any help from anyone. No one has reported any 
  357. bugs. Xtal31 may or may not work with reports created with earlier or 
  358. later releases of Crystal Reports.
  359.  
  360.  
  361. For registration:
  362.  
  363. Robert J. Johnston
  364. 2017 Murchison Drive, #15
  365. Burlingame, CA 94010
  366. (415) 697-1945
  367.  
  368.  
  369. Questions bug reporting:
  370.  
  371. Compuserve 71611,1370
  372.  
  373.