Sage 100

 View Only
  • 1.  ODBC Trick for Debugging Crystal Reports that are Based on Work Tables (Std & Adv)

    Posted 04-24-2019 20:24
    Edited by Dan Burleson 04-25-2019 16:24
    If you already use the "Session ID" field in the SOTAMAS90 ODBC control panel then you are more aware than I and need to read no further. If not and you, like me, seemingly make mistakes in the 100's when I develop a Crystal Report - you know the less time spent between test, adjust, test, adjust and test - the better! This trick will speed things up!

    Everyone probably knows that work tables (e.g. SO_InvoiceWrk) serve as a model and are never written to by Sage 100. Temporary tables are created and populated using a naming convention that appends the User Code, date and time to the work table name (e.g.  SO_InvoiceWrkDWB042415352026.M4t) . The trick is that - if one first previews the report from Sage 100 (that's an important "if"),  the ODBC driver will substitute this temporary table for a work table (i.e. SO_InvoiceWrk) used by the full version Crystal Reports outside Sage 100! This makes testing Crystal changes as fast as clicking refresh.

    This 15 character appendage in bold above is the "Session ID" and can be inserted into the "Session ID" field on the "Logon" tab of the SOTAMAS90 ODBC Driver Setup.
    1. Preview the report or form you wish to test (and keep it open throughout your debugging)
    2. Navigate to the company's module folder (e.g. "..\MAS_ABC\SOABC")
    3. Sort the folder descendingly  by Date Modified and the temporary table should be at or near the top.
    4. Copy the Session ID from the table's file name (starting with the User Code)
    5. Open the Administration Tools control panel
    6. Open the "ODBC Data Sources" applet
    7. Select the "User DSN" tab
    8. Select the "SOTAMAS90" entry and click "Configure"
    9. Select the "Logon" tab and paste the work file suffix into the "Session ID" field (if file extensions are enabled, exclude the ".M4T")
    10. Open the report in Crystal. Note that if Crystal is already open and a data connection exists, one must either close Crystal and reopen it or logout of the server
    11. Be sure to clear the Session ID field when the report's preview windows is closed or you will get errors relating to missing tables.
    If you are in the camp (as I was) that previews a report and replaces the model work table with the temporary work file, you will be familiar with the missing run-time substitutions (e.g. lines in the @C​ompanyAddressBlock), but having current data in the full version of Crystal just by setting the Session ID is a welcome feature.

    This appears to be more difficult with Premium? @Myron Stevenson shared a related technique here. Anyone else?​

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------


  • 2.  RE: ODBC Trick for Debugging Crystal Reports that are Based on Work Tables (Std & Adv)

    Posted 04-25-2019 11:53
    It took me several tries, and I think the key was having the preview still open in Sage (I had closed it to click on the Designer button, knowing the work file would still be there since I had checked "Keep open after preview."  But when I left it open, and launched CR independently, that worked like a charm.  I appreciate the info sharing!

    ------------------------------
    ==================
    Rhonda McNamara
    Customer Success Manager
    Stewart Technologies, Inc.
    rsm@stewarttechnologies.com
    ------------------------------



  • 3.  RE: ODBC Trick for Debugging Crystal Reports that are Based on Work Tables (Std & Adv)

    Posted 04-25-2019 16:20
    Edited by Dan Burleson 04-25-2019 19:03
    The new PII work files (with all fields populated) that are optional for Custom Reports also can be viewed using the full version of Crystal Reports using this technique.

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------