Hi
I have below code in Main Report. I have 2 parameters in Main Report. How i can pass these 2 parameters to Sub Report
SET @DocEntry = {?DocKey@}
IF @TipoObjeto = '112' -- Draft
BEGIN
SET @Tabela = 'DRF' -- Draft/Rascunhos - ODRF
END
ELSE
BEGIN
SET @Tabela = 'INV' -- Pedido de compra - O[TABELA]
END
Thanks
Cr BhargaviPosted Aug 20, 2023, 5:21 PM
Mohammad HussainPosted Aug 20, 2023, 2:20 PM
Please try this.
Main report:
Formula Name: strParams Formula: {@DocEntry} + "|" + {@TipoObjeto}
Subreport:
Parameter Name: strParams
Then in the subreport, parse the string to extract the values:
Local NumberVar docEntry; Local StringVar tipoObjeto;
docEntry := Split({?strParams}, "|")[1]; tipoObjeto := Split({?strParams}, "|")[2];
I hope it will help you. Thanks...