Groups > dBase > Getting Started with dBase > Re: SetParams Filter




SetParams Filter

SetParams Filter
Mon, 10 Mar 2008 09:58:19 -050
Greetings,

I believe I need to use a form to set a value to be used in a report
rowset.filter to generate a report on a table value.field  as follows: 
"VALUE >= selectedvalue".

From the form to the report "this.params[ "VAL" ]" is being
passed.

When I get to the report setParams dSet.filter:  

dSet = this.form.hsrptdatamodule1.cl1.rowset
cFilter = this.params[ "VAL" ]

dSet.filter := cFilter

I get the error -- variable undefined: value >= 45

The value.filter from the form is reaching the report.
? "Params.VAL: " + cFilter
Params.VAL: "VALUE >= 45"

I have no clue how to trouble shoot this challenge.

Ed



Post Reply
Re: SetParams Filter
Tue, 11 Mar 2008 01:50:58 -040
In article <s6uxt8rgIHA.1952@news-server>, jdrandall@t-online.de says...
> Greetings,
> 
> I believe I need to use a form to set a value to be used in a report
rowset.filter to generate a report on a table value.field  as follows: 
"VALUE >= selectedvalue".
> 
> From the form to the report "this.params[ "VAL" ]" is
being passed.
> 
> When I get to the report setParams dSet.filter:  
> 
> dSet = this.form.hsrptdatamodule1.cl1.rowset
> cFilter = this.params[ "VAL" ]
> 
> dSet.filter := cFilter
> 
> I get the error -- variable undefined: value >= 45
> 
> The value.filter from the form is reaching the report.
> ? "Params.VAL: " + cFilter
> Params.VAL: "VALUE >= 45"
> 
> I have no clue how to trouble shoot this challenge.
> 
> Ed
> 
 

Edward,

In your cl1 table, do you have a field called "Value"? The error
message 
is saying you don't.

-- 
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
Re: SetParams Filter
Tue, 11 Mar 2008 04:02:13 -050
Geoff,

In my datamodule I have the following:

   this.CL1 = new QUERY()
   this.CL1.parent = this
   with (this.CL1)
      onOpen = class::TYC_ONOPEN
      left = 111.0
      top = 5.0
      width = 123.0
      height = 83.0
      database = form.house1
      sql = 'Select * from "hs"'
      active = true
   endwith

   with (this.CL1.rowset)
      canGetRow = {||not empty( this.fields["CLASS"].value)}
      fields["VALUE"].beforeGetValue = class::VAL_BEFOREGETVALUE
      indexName = "CLO"
   endwith

   FUNCTION VAL_BEFOREGETVALUE
      return (iif(empty(this.value), this.parent["cost"].value * 1.15,
this.value) )
   RETURN

There is a value.field in the "hs.dbf".

Ed



Geoff Wass [dBVIPS] Wrote:

> In article <s6uxt8rgIHA.1952@news-server>, jdrandall@t-online.de
says...
> > Greetings,
> > 
> > I believe I need to use a form to set a value to be used in a report
rowset.filter to generate a report on a table value.field  as follows: 
"VALUE >= selectedvalue".
> > 
> > From the form to the report "this.params[ "VAL" ]"
is being passed.
> > 
> > When I get to the report setParams dSet.filter:  
> > 
> > dSet = this.form.hsrptdatamodule1.cl1.rowset
> > cFilter = this.params[ "VAL" ]
> > 
> > dSet.filter := cFilter
> > 
> > I get the error -- variable undefined: value >= 45
> > 
> > The value.filter from the form is reaching the report.
> > ? "Params.VAL: " + cFilter
> > Params.VAL: "VALUE >= 45"
> > 
> > I have no clue how to trouble shoot this challenge.
> > 
> > Ed
> > 
>  
> 
> Edward,
> 
> In your cl1 table, do you have a field called "Value"? The error
message 
> is saying you don't.
> 
> -- 
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
> 
> .|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
> .|.|.| ---------------------------------------------------------- |.|.|.
> .|.|.|             IT Consultant http://Geoff_Wass.com            |.|.|.
Post Reply
Re: SetParams Filter
Tue, 11 Mar 2008 06:00:33 -050
Ivar,

I changed "value" to "hvalue" and I still get the same
message at the same place in the code.

Ed

Ivar B. Jessen Wrote:

> On Tue, 11 Mar 2008 04:02:13 -0500, in dbase.getting-started, 
> Subject: Re: SetParams Filter, 
> Message-ID: <Z25tYa1gIHA.1088@news-server>,  
> Edward Racht <jdrandall@t-online.de> wrote:
> 
> >There is a value.field in the "hs.dbf".
> 
> See the OLH on reserved words. VALUE is a reserved word in dBase and should
be avoided.
> 
> 
> Ivar B. Jessen
Post Reply
Re: SetParams Filter
Tue, 11 Mar 2008 10:27:37 +010
On Tue, 11 Mar 2008 04:02:13 -0500, in dbase.getting-started, 
Subject: Re: SetParams Filter, 
Message-ID: <Z25tYa1gIHA.1088@news-server>,  
Edward Racht <jdrandall@t-online.de> wrote:

>There is a value.field in the "hs.dbf".

See the OLH on reserved words. VALUE is a reserved word in dBase and should be
avoided.


Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact