home *** CD-ROM | disk | FTP | other *** search
- XTALUDL (c) 1993, Robert J. Johnston. All Rights Reserved
-
- You have the right to distribute royalty-fee free XTALUDL.EXE
- with you own apps. Use at your own risk.
-
- XTALUDL allows you to set user-defined label dimensions at
- runtime for label reports created with Crystal Reports.
-
- XTALUDL writes directly to your original reports. Make
- sure you have backup copies of the your reports in case
- XTALUDL does something unforeseen.
-
- XTALUDL is a Visual Basic 3.0 app that you run from your
- app--sort of a psuedo DLL. XTALUDL is hidden off screen so
- you or your users won't see it. You create you own dialog for
- getting the dimensions of the labels. Then you send the
- information to XTALUDL using "SENDKEYS." You determine when
- the report is updated by checking a control that is DDE linked
- to a control in XTALUDL. It is possible to set up DDE links
- to the XTALUDL controls and pass dimensions using DDE
- instead of using the "SENDKEYS" method; however, this
- requires more coding.
-
- ( I didn't feel like pulling out the C++ CD-ROM or spending the
- extra time needed to create a DLL. Hopefully Crystal Services
- will do that.)
-
- There is a demo program called UDLDEMO.MAK that you can
- load into the VB Environment. The only executable code
- in the demo is in the Command1_Click event. This code
- shows what is required. I assume that XTALUDL.EXE is
- going to be in the same directory as your own app.
-
- The one control on the demo form named frmXTALUDL_Status can
- be named something else, but you will have to change the
- code as well. This links to another control on the XTALUDL
- form. It provides status and error information.
-
- You can copy the demo code to your own app. The report name
- and dimensions have been hard-coded into the demo. You
- will have to add code to build the strings of information.
-
-
- Command Letters:
- I Initialize
- P Full Path name of report to modify.
- L Left Margin
- R Right Margin
- T Top Margin
- B Bottom Margin
- W Label Width
- H Label Height
- Z Horizontal Gap
- V Vertical Gap
- D Direction
- X Execute (Updates report)
- U Unload XTALEXE
-
- For example:
- SendKeys "I~" Initialize.
- SendKeys "R.25~" .25" Right Margin
- SendKeys "W1~" 1" Width
- SendKeys "H.5~" .5" Height
- SendKeys "H .5 ~" .5" Height. Leading and trailing
- spaces trimmed by XTALUDL.
- SendKeys "DA~" Direction is across
- SendKeys "DD~" Direction is down
- SendKeys "Pc:\reports\xyz.rpt~" C:\REPORTS\XYZ.RPT
- SendKeys "X~" Updates report
- SendKeys "U" Unload XTALUDL. NOTE: no tilde.
-
- Your first command must be (I)nitialize. Your next
- to last command must be e(X)ecute. Your last command
- must be (U)nload. Other commands inbetween can be in
- any order. You don't have to send dimensions that you
- don't want to change.
-
- ------------------------------------------------------------
- All commands must end with a tilde ~, EXCEPT (U)nload!!!!
- ------------------------------------------------------------
-
- Keep each sendkey command on a separate line.
-
- After sending the initialize command you must wait until
- initialization is complete. You do this by checking a
- DDE link (see demo code).
-
- After sending the execute command you must wait until
- XTALUDL has finished updating your report. You do this
- by checking a DDE link (see demo code). If a DOS error
- is generated in XTALUDL, then txtXTALUDL_Status.Text
- will contain a string representation of the DOS error
- code, STR$(ERR). Success is represented by STR$(0). If the
- report was not designed for labels, then error codes "32000" or
- "32001" will be returned. "32000" will be returned if XTALUDL
- couldn't find margin information. "32001" will be returned if
- XTALUDL couldn't find label dimension information.
-
- Normally the txtXTALUDL_Status visible property will be set to FALSE.
- It is visible in the demo so you can see the error codes.
- To generate an error, try sending an non-existent path or file name.
-
- Dimensions are not checked in XTALUDL. You will have to verify
- dimensions yourself. Dimensions received by XTALUDL are in inches.
- If your users enter dimensions using some other system, such as
- metric, you will have to convert to inches.
-
-
- Robert J. Johnston
- 2017 Murchison Drive, #15
- Burlingame, CA 94010
-
- Compuserve: 71611,1370
-
-
-
-
-
-
-