Flexible Solutions, Inc. – GP Reports Viewer
If you chose the Select statement under query type in Step 6:
Enter a database table or view name in the Table field.
For Columns 1 through 3 enter the Database Field name, Display Heading and data Type for each column that will appear in your lookup. Only the first column is required, and it is from this column that a choice selected in the lookup will be returned as a parameter value for your report. The other two columns are optional and are there to provide additional information about the first column to make the lookup more user friendly when selecting parameter values from lookups.
Optionally, enter a SQL Where Clause to limit the results in the lookup. This is only available with the Select statement query type.
If you chose the Stored procedure query type in Step 6:
Enter the Stored Procedure name.
For Columns 1 through 3 enter the stored procedure Database Field name, Display Heading and data Type for each column that will appear in your lookup. Only the first column is required, and it is from this column that a choice selected in the lookup will be returned as a
Query Type Select Statement
Choose this option to perform a lookup from a single table or view in the database. You will have the option of entering in a SQL Where Clause to limit the results returned.
Choose this option if you would like the results returned to come from a SQL stored procedure. A stored procedure can be used to return one or more result sets to use as the lookup data. Multiple result sets are defined by including more than one select statement in the stored procedure. Each result set returned must have the same name, value and description field names. To be used for a dynamic lookup, the stored procedure cannot be defined with parameters.
To create a dynamic lookup:
The Lookup ID will automatically populate with the next available number.
Enter a Lookup Name. This is what you will see when assigning lookups to your report parameters.
Select a Series for the lookup. The series is used to help find the lookup faster when selecting one on the Report Maintenance window. It will not limit the lookup selection in any way.
By default the Static radio button is selected. Select the Dynamic radio button option instead. The window will change to show the fields necessary to define a dynamic lookup.
Database radio buttons – by default, the Current Company Database option is selected and this indicates that the lookup will run against the GP Company that you are logged into. If you have a separate database that you would like to use instead of the current company, select the Other Database option. GP Reports Viewer Lookups are company specific.
Choose a Query Type.
Open the Custom Lookup Maintenance window. GP >>Tools >> GP Reports Viewer >> Lookups