Editing Reports

Editing Reports

Often minor cosmetic changes will be required to some of the standard Jiwa reports - fields may need to be added or removed, or logos inserted. This guide walks through the basic steps of customising a report using Microsoft Visual Studio 2015 with the SAP Crystal Reports add in. SAP Crystal Reports, developer version for Microsoft Visual Studio is available as a free download here. The latest version of Visual Studio is available here. Note that Crystal Reports, developer version for Microsoft Visual Studio may not support Express/Community Editions of any version of Visual Studio.

A Step by Step guide for downloading the software is here: Software downloads for Editing Reports



Step-by-step guide

  1. Copy. Begin by making a copy of the report you wish to modify. A copy is made because the standard Jiwa reports get updated every upgrade, so any changes made to a standard report will be lost.



  2. Open. Open Microsoft Visual Studio, and then open the report for editing by going to the File menu and selecting Open, and then File.... 



    Select the report you wish to edit from the resultant dialog window:


    The report should now be loaded into Visual Studio, ready for modification.  Notice that there is a "Crystal Reports" main menu that has appeared in the menu-bar, and a side-panel called the "Field Explorer" on the left.

     



  3. Set Datasource. The report needs to be pointed to a Jiwa database, so that changes to the report can be previewed in the editor using the data from that database.  Go to The "Crystal Reports" menu, the "Database" sub-menu, and click "Set Datasource Location...":



    The "Set Datasource Location" dialog window will be displayed.  Select (by left-clicking) the datasource in the top section of the dialog, in the "Current Data Source:" section, and select the replacement datasource in the "Replace with:" section. Repeat the process for any subreport nodes in the "Current Data Source:" section.  Click the "Update" button when done.


    Parameters may have to be provided at this stage to allow Crystal Reports to query the database and ensure that all fields that were in the old datasource also exist in the new datasource. Crystal Reports will prompt for a mapping if there are any mismatches.



  4. Modify. The report can now be modified as desired. Use the "Field Explorer" to drag database or formula fields onto the report.  Right-click on an object on the report canvas to modify it's properties or to delete it. Use the "Insert" menu under the "Crystal Reports" menu on the menu-bar to insert new objects such as images, text fields, boxes, charts etc.


  5. Preview. Click on the "Main Report Preview" tab at the bottom of the report canvas to run the report and examine the layout:



    You may be prompted for parameter values during the preview - supply some valid data, or try ticking the "Set to Null" tick-box to use default values.




  6. Save. Save the changes made on the report by going to the "File" menu and clicking on "Save xxx.rpt", where "xxx.rpt" is the filename of the report being modified.

  7. Deploy. The modified report must now be loaded into the Jiwa database for use from within Jiwa. To do this, log in to Jiwa and load the "Reports" form (Jiwa→System Settings→Report Configuration→Reports):



    Click on the "Refresh From Files" button on the ribbon, and the select the modified report using the resultant file browser dialog.  The file is then sucked up into the database.  Click "Save".



    If the report is a menu-based report (i.e. it is launched from the main Jiwa menu), then use "Menu Maintenance" (Jiwa→System Settings→Menu Configuration→Menu Maintenance) to add a new entry for the report.  If the report is a form-based report (i.e. it is launched from an existing form like the Invoice report from the Sales Orders Entry screen), then go to the appropriate form, and add the report via the "Printer Setup" button on the form's ribbon menu.

 

Related articles