Get Started

Get Started

It may help to think about the GP Report Writer functions as simply “GetString” and “GetCurrency”, rather than rw_TableLineString and rw_TableLineCurrency.  There is not anything inherently “line level” about either one of these.  They simply provide several input parameters that can be used to pass information into the stored procedures, which can then be used to retrieve the desired information.

Begin by thinking about what information you will need to write a tSql query to retrieve the desired data.  For example, to retrieve anything from the Item Master you need the Item Number.  To retrieve something from the Item Quantities Master you will need Item Number and Location Code.

For both GetString and GetCurrency you have the following input parameters to work with:

String-1

String-2

Integer

Decimal-1

Decimal-2

Integer Control Parameter (more on this later)

These are the input values you will have available to locate information from SQL. You can use up to two strings, two decimals, and one integer.

Another tip is to think creatively about these parameters.  A string can store a string, but it can also store a date, number or boolean.  A decimal field can store a currency amount, an integer or a boolean.

Pro Tip: for advanced users, you can concatenate multiple string values into one string parameter.  For example, the Report Writer calculated field could append multiple values into String-1:

‘Customer Number’+”~”+’Address Code’

Your tSql would then need to parse each value out of String-1.

Each string can hold up to 255 characters.

For this example, we are going to retrieve a field from the Item Master, so we need just one string: Item Number.

IMPORTANT: If the value you want to retrieve requires knowing an Item Number, the GP Report MUST have Item Number as an available field.  If the tables/fields available on the report do not provide the key fields needed to retrieve the desired value from another table, you will not be able to retrieve that data.