Set Parameters for Reports

When creating a custom button, you may want to run a report. Often, you may want to populate the report’s parameters with data from the form you are working on.

In the following example, we will place a button on AP Transaction Entry that, when clicked, will open the AP Transactions by Vendor report parameter setup form (the Crystal Reports Launcher). Additionally, we will specify one vendor for the vendor range parameters.
  1. On the Info tab in VA Custom Form Buttons, create the custom form button. Make sure to specify AP Transaction Entry as the form you are placing the button on, and the AP Transactions by Vendor report in the Action field. For more information, see Creating Custom Form Buttons.
  2. Select the Parameters tab.
  3. Enter a parameter number in the ParameterID field or enter ‘New’, ‘N’, or ‘+’ to have the system generate the next available number.
  4. In the Name field, press F4, select the ?BegVendNumber parameter, and click OK. The system displays ?BegVendNumber in the Name field.
  5. Select 3-Form Input value from the DefaultType drop-down.
  6. In the DefaultValue field, press F4, select the field name that contains the value that the report will default in its parameter field, and click OK. In this example, select Vendor from the F4 lookup.
 The system defaults the field’s sequence number in the DefaultValue field. In this example, the sequence is 15.
  7. Repeat steps 4 – 6 for the Ending vendor number. In this example, make sure to select the ?EndVendNumber parameter in the Name field.
  8. Save the record.
  9. Open the form with the button and move the button to a new location, as necessary. In this case, open AP Transaction Entry and enter transaction details, including the vendor number.
  10. Click the custom form button.
 The AP Transactions by Vendor report parameter setup form appears with the vendor specified in the Vendor field in AP Transaction Entry in the beginning and ending parameter fields.