How to declare a Report Parameter in RAP ?
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?
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?
This discussion has been closed.
Comments
In code you can use the Report.Parameters property to create or manage
report parameters. In the designer you can use the Report tree (right
click over the parameters node) to create them. See the TppParameters
topic in the RB help for more information as well as the article below.
http://www.digital-metaphors.com/rbWiki/End-User/Fundamentals/Report_Parameter_Fundamentals
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you.
The more I use the Report Builder I get more impressed with its features
and ease of use.
Congratulations on the excellent product.
[ ]s
Samuel
Em 13/10/2011 14:08, Nico Cizik (Digital Metaphors) escreveu: