I removed the parameter (itemnum = :itemnu) from the sql statement where clause in my datasource code because I want the report to select and return all the item numbers from the called table (ASD_D_INVTRANS)if the user does not select one or more.
Here's my ObtainSelectStatement code in my datasource method
Function ObtainSelectStatement( ) As String
If Not (itemnu = "") then
where = where & " AND " &
parseParam2(itemnu, "ASD_D_INVTRANS.itemnum")
End If
Where = Where & "AND 1=1"
ObtainSelectStatement = Super::ObtainSelectStatement( )
SelectStatement = StrSubst (SelectStatement, "1=1", where)
End Function
I also added the parameter as a global parameter under tools parameters. (Added as a global string parameter)
When I compile and run the report I can enter any single item number in the report parameter field and the report returns all the item numbers. What am I missing? What can I try to make this work the way I want it to. If I put one or more item numbers in the submit report field I want only those returned on the report. If I leave it blank or null I want all item numbers returned.
Here's my ObtainSelectStatement code in my datasource method
Function ObtainSelectStatement( ) As String
If Not (itemnu = "") then
where = where & " AND " &
parseParam2(itemnu, "ASD_D_INVTRANS.itemnum")
End If
Where = Where & "AND 1=1"
ObtainSelectStatement = Super::ObtainSelectStatement( )
SelectStatement = StrSubst (SelectStatement, "1=1", where)
End Function
I also added the parameter as a global parameter under tools parameters. (Added as a global string parameter)
When I compile and run the report I can enter any single item number in the report parameter field and the report returns all the item numbers. What am I missing? What can I try to make this work the way I want it to. If I put one or more item numbers in the submit report field I want only those returned on the report. If I leave it blank or null I want all item numbers returned.