Skip to main content
zamvil
Inspiring
June 7, 2012
Question

cfreportparam undefined

  • June 7, 2012
  • 1 reply
  • 425 views

Hi, I want to use a cfreport but when access it displays variable undefined. I run the report with F12 in the CF Report builder and works but from a cfm page not works. I browse too the the cfreport and works too http://localhost/carsa/formatos/poliza.cfr?poliza=3247285

this is my code

<CFREPORT format="PDF" template="formatos/POLIZA.cfr"

filename="polizas\test.pdf"

overwrite="yes" >

<cfreportparam name="poliza" value="3247285">

</cfreport>

and this the error

Variable POLIZA is undefined.

The error occurred in C:\inetpub\wwwroot\CARSA\formatos\POLIZA.cfr: line 769

Any hint to resolve this problem? How Should I send the parameter thru the cfreportparam?

regards

    This topic has been closed for replies.

    1 reply

    zamvil
    zamvilAuthor
    Inspiring
    June 7, 2012

    I already found the error. The error is in the query on the cfreport builder.

    I had to tod the cf query like this with the cfqueryparam. Before I only had #nopoliza#


    SELECT    *
    FROM      dbo.DetallePoliza
    WHERE     dbo.DetallePoliza.PolizaGMX = <cfqueryparam value="#param.nopoliza#" cfsqltype="CF_SQL_INTEGER">

    I hope it helps to other people.

    regards