812.TXT
     =====================================================================
     Integrate a Crystal Report into an R:BASE Application
     =====================================================================
     PRODUCT:  R:BASE                   VERSION:  5.0 or higher
     =====================================================================
     CATALOG:  Forms, Reports & Labels  AREA   :  Reports
     =====================================================================
 
     Using R:BASE for Windows, you can easily to integrate a report 
     created with Crystal Reports into your R:BASE application. Use 
     Crystal Reports to create mailing labels or complex reports that are 
     beyond the scope of the R:BASE report writer. Once the report is 
     created, follow the steps below to include the report in your R:BASE 
     application.
 
     In Crystal Reports:
     1.Open the report.
     2.From the Report menu, select Compile Report. An executable .EXE file 
       is made from your report definition.
     3.In the first "Compile Report" dialog box, click the OK button to 
       accept the default file name and directory. The file is named 
       rptname.exe, where rptname is the name of your Crystal report.
     4.In the second "Compile Report" select both No radio buttons. Do not 
       create a program item and do not distribute the report.
     5.Exit Crystal Reports.
 
     In R:BASE
     1.In the Object Manager, click the Apps tab, highlight the application 
       name, and click the Design button.
     2.Add menu option text to one of your pull down menus for printing the 
       Crystal report.
     3.From the new menu option, click the right mouse button menu and 
       select Menu Item Settings...
     4.From the "Menu Items Action" dialog box, select Custom actions from 
       the list of New Actions.
     5.Click the Add After button and enter a name for the custom action.
     6.Enter the following code in the custom action editor:
 
          ZIP rptname.exe
 
     rptname.exe is the name of the compiled Crystal report.
 
     7.Click the Done button.
     8.Save the application.
 
     The Crystal Reports Compiled Report Setup dialog box is displayed when 
     the menu option is selected from the application. The user can print 
     the report to the screen or to the printer, specify a time to print 
     the report, change the printer setup, or change the report WHERE 
     clause using the options in the dialog box.. The Compiled Report Setup
     dialog box is displayed in front of the R:BASE application. As with 
     all Windows applications, the user can switch between the Crystal 
     Reports Compiled Report Setup dialog box, the R:BASE application, and 
     other Windows programs that might be running.
 
     Once the Crystal Reports Compiled Report Setup dialog box is 
     displayed, the user can return to the R:BASE application and select 
     another action. There is no way to force the user to print the Crystal 
     report. The Compiled Report Setup dialog box stays active until the 
     user closes it or exits Windows.
 
     A compiled Crystal report consists of three files: rptname.exe, 
     rptname.rpt, and rptname.crf. All three files must be in the same 
     directory. If the Crystal report is not in the application directory, 
     you can copy these three files to the application directory, or add 
     change directory commands to the custom action code. For example:
 
          CD \crw\reports
          ZIP rptname.exe
          CD \dbfiles
 
     Change to the directory where the Crystal report is located, execute 
     the report, then change back to the application directory and continue 
     with the R:BASE application.
 
     In addition to the three report files, Crystal Reports for R:BASE 
     requires that the files CRPE.DLL and PDSODBC.DLL be in the same 
     directory when running a compiled report; the WINDOWS\SYSTEM directory 
     is recommended. You might need to copy the file PDSODBC.DLL from the 
     \CRW directory to the WINDOWS\SYSTEM directory.