Parameters question!

edited May 2006 in DADE
Hi!

I'm usign D7 and RB 7.

I create a Dade report who load template file when executed.
In my SQL script i have to pass parameters trough my Deplhi code font, how
can i proceed to make this works?

Ps.: I have tried to edit my SQL script on Designer mode, but always
returned an error: "No value for parameter".

My SQL made it by Designer way.
SELECT BA_PESSOA_1.DSPESSOA, VE_ORTRANSPORTE_1.NR_ORCAMENTO,
VE_ORTRANSPORTE_1.DT_EMISSAO, VE_ORTRANSPORTE_1.DT_INICIO,
VE_ORTRANSPORTE_1.CDPESSOA, VE_ORTRANSPORTE_1.CONTATO,
VE_ORTRANSPORTE_1.FONE_CONTATO, VE_ORTRANSPORTE_1.EMAIL_CONTATO,
VE_ORTRANSPORTE_1.DSSERVICO, VE_ORTRANSPORTE_1.CDCONDPAGTO,
VE_ORTRANSPORTE_1.VL_TOTAL_ORCAMENTO, VE_ORTRANSPORTE_1.TP_SEGURO,
VE_ORTRANSPORTE_1.DSLOCALSERVICO, BA_COPGTO_1.DSCOND_PAGTO,
VE_ORTRANSPORTE_1.OBSERVACAO
FROM BA_PESSOA BA_PESSOA_1
INNER JOIN VE_ORTRANSPORTE VE_ORTRANSPORTE_1 ON
(VE_ORTRANSPORTE_1.CDPESSOA = BA_PESSOA_1.CDPESSOA)
INNER JOIN BA_COPGTO BA_COPGTO_1 ON
(BA_COPGTO_1.CDCOND_PAGTO = VE_ORTRANSPORTE_1.CDCONDPAGTO)



and the way it should be to me.

SELECT BA_PESSOA_1.DSPESSOA, VE_ORTRANSPORTE_1.NR_ORCAMENTO,
VE_ORTRANSPORTE_1.DT_EMISSAO, VE_ORTRANSPORTE_1.DT_INICIO,
VE_ORTRANSPORTE_1.CDPESSOA, VE_ORTRANSPORTE_1.CONTATO,
VE_ORTRANSPORTE_1.FONE_CONTATO, VE_ORTRANSPORTE_1.EMAIL_CONTATO,
VE_ORTRANSPORTE_1.DSSERVICO, VE_ORTRANSPORTE_1.CDCONDPAGTO,
VE_ORTRANSPORTE_1.VL_TOTAL_ORCAMENTO, VE_ORTRANSPORTE_1.TP_SEGURO,
VE_ORTRANSPORTE_1.DSLOCALSERVICO, BA_COPGTO_1.DSCOND_PAGTO,
VE_ORTRANSPORTE_1.OBSERVACAO
FROM BA_PESSOA_1, VE_ORTRANSPORTE, VE_ITORTRANSPORTE_1
WHERE (VE_ORTRANSPORTE_1.CDPESSOA = BA_PESSOA_1.CDPESSOA)
AND (BA_COPGTO_1.CDCOND_PAGTO = VE_ORTRANSPORTE_1.CDCONDPAGTO)
AND (VE_ORTRANSPORTE_1.NR_ORCAMENTO = :ORCAMENTO)

Comments

  • edited May 2006
    Hi Rodrigo,

    Unfortunately, DADE does not support the use of parameters from within the
    SQL code. You will need to use the autosearch feature to add or change the
    search criteria of a SQL statement in DADE. Note that this has been made
    much easier for RB 9 or later with the introduction of the TdaSQLBuilder
    object.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.