Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How to declare a Report Parameter in RAP ?

edited October 2011 in General
I´m using Report Builder 12.04 (Enterprise) with Delphi 2007.

In the "End-User Reporting" I created this SQL (manually):

----------------------
Select v.CODIGO, v.QTDE, v.Valor_Bruto, v.Valor_Sem_Impostos, p.Grupo,
v.QTDE * p.acVLR_MPRIMA Valor_MP, g.grDESCRICAO From
(SELECT hvCODIGO CODIGO, Sum(hvQTDE_VENDA) Qtde, Sum(hvQTDE_VENDA *
hvVALOR_VENDA) Valor_Bruto,

Sum(hvQTDE_VENDA*(hvVALOR_VENDA-hvVLR_IMPOSTO_1-hvVLR_IMPOSTO_2-hvVLR_IMPOSTO_3-hvVLR_IMPOSTO_4-hvVLR_IMPOSTO_5-hvVLR_IMPOSTO_6))
Valor_Sem_Impostos
FROM HIP0051A Where hvDATA Between :Data_Inicial and :Data_Final And
hvSTATUS = 'A'
Group by hvCODIGO ) v
Left Join
(Select acCODIGO, SUBSTRING(acGRUPO FROM prGRUPOI FOR prGRUPOF)
Grupo, acVLR_MPRIMA from HIP0010A, HIP0000A) p
On v.CODIGO = p.acCODIGO
Left Join
(Select grCODIGO, grDESCRICAO from HIP0100A Where grTIPO='A') g
On p.Grupo = g.grCODIGO
-----------------------

When I execute this SQL I received the error:

---------------------------
No Report Parameter found for :pData_Inicial
---------------------------

How do I create a variable in the RAP for the user to specify the date?

Comments

This discussion has been closed.