Home > Archive > Programming with dBASE > December 2006 > Help! Params









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help! Params
Bill Dilmore

2006-12-12, 7:13 pm

I need to run a report from a form. I am using "Do report with reqno" to call the report. In the report "I am attempting to pass the reqno to the parent's sql using the params property. I always get the params default value. There's got to be something
simple that I'm missing.

Can anyone help? The related code is below

Thanks,
Bill

Parameter mreqno


** END HEADER -- do not remove this line
//
// Generated on 12/12/2006
//
local r
r = new PR_REQREPORT()
r.render()

class PR_REQREPORT of REPORT
with (this)
startPage = 1
endwith

this.PR1 = new QUERY()
this.PR1.parent = this
with (this.PR1)
left = 3115.0
top = 380.0
sql = 'SELECT * FROM "s:\prinfodbf\PR" where req_no = :mreqno ORDER BY REQ_NO'
params["mreqno"] = 18061
requestLive = false
active = true
endwith

....
Roland Wingerter

2006-12-12, 7:13 pm

Bill Dilmore wrote

>I need to run a report from a form. I am using "Do report with reqno" to
>call the report. In the report "I am attempting to pass the reqno to the
>parent's sql using the params property. I always get the params default
>value. There's got to be something simple that I'm missing.

-------
Instead of using "Do report with reqno" try this:

set proc to PR_REQREPORT.REP additive
r = new PR_REQREPORT()
r.PR1.params["mreqno"] = 999 // your parameter goes here
r.PR1.requery()
r.render()

Roland



Ivar B. Jessen

2006-12-12, 7:13 pm

On Tue, 12 Dec 2006 12:07:31 -0500, in dbase.programming,
Subject: Help! Params,
Message-ID: <EaeWCAhHHHA.1212@news-server>,
Bill Dilmore <bill_dilmore@dcf.state.fl.us> wrote:

>I need to run a report from a form. I am using "Do report with reqno" to call the report. In the report "I am attempting to pass the reqno to the parent's sql using the params property. I always get the params default value. There's got to be somethin

g simple that I'm missing.
>
>Can anyone help? The related code is below


Make the changes indicated below and if the name of the report is PR_REQ.rep call the report with
the command: do PR_REQ.rep with 18061


Ivar B. Jessen

>

// Parameter mreqno
Parameter qno
>
>
>** END HEADER -- do not remove this line
>//
>// Generated on 12/12/2006
>//
>local r
>r = new PR_REQREPORT()
>r.render()
>
>class PR_REQREPORT of REPORT
> with (this)
> startPage = 1
> endwith
>
> this.PR1 = new QUERY()
> this.PR1.parent = this
> with (this.PR1)
> left = 3115.0
> top = 380.0
> sql = 'SELECT * FROM "s:\prinfodbf\PR" where req_no = :mreqno ORDER BY REQ_NO'

// params["mreqno"] = 18061
params["mreqno"] = qno
> requestLive = false
> active = true
> endwith
>
>...

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com