|
| Translate Error |
 |
Thu, 03 Apr 2008 03:51:46 -050 |
Greetings,
I have been following some of the discussion concerning the use of the numeric
field. I ran into a problem with the numberic field when I wanted to use a form
to filter rows to generate a report showing COST >= '30'.
I have a form with a disabledentryfield where I enter the value for the filter.
The aParams code is:
cCst = this.parent.en1cst1.value
aParams[ "CST" ] := ltrim( str( cCst ) )
DO preview.wfm WITH "lpc.rep",true,aParams
The report setParams code is:
local cCst, dSet
dSet = this.form.lprptdatamodule1.t1.rowset
cCst = aParams[ "CST" ]
? "cCst: " + cCst ...shows cCst:
30
? "filter: " + [COST >= ']+ cCst +['] ...shows COST >=
'30'
dSet.filter := [COST >= ']+ cCst +[']
RETURN LPCREPORT::render()
When I get to the dSet.filter code I get the message:
Problem using file name! Database engine error: translate error. Value out of
bounds
What does this mean?
Do I scrape this approach and use another?
Ed
|
| Post Reply
|
| Re: Translate Error |
 |
Thu, 3 Apr 2008 23:04:59 -0400 |
In article <aAcdyfWlIHA.1688@news-server>, jdrandall@t-online.de says...
> Greetings,
>
> I have been following some of the discussion concerning the use of the
numeric field. I ran into a problem with the numberic field when I wanted to
use a form to filter rows to generate a report showing COST >= '30'.
>
> I have a form with a disabledentryfield where I enter the value for the
filter.
>
> The aParams code is:
> cCst = this.parent.en1cst1.value
> aParams[ "CST" ] := ltrim( str( cCst ) )
>
> DO preview.wfm WITH "lpc.rep",true,aParams
>
> The report setParams code is:
> local cCst, dSet
> dSet = this.form.lprptdatamodule1.t1.rowset
> cCst = aParams[ "CST" ]
>
> ? "cCst: " + cCst ...shows
cCst: 30
> ? "filter: " + [COST >= ']+ cCst +['] ...shows COST
>= '30'
>
> dSet.filter := [COST >= ']+ cCst +[']
>
> RETURN LPCREPORT::render()
>
> When I get to the dSet.filter code I get the message:
>
> Problem using file name! Database engine error: translate error. Value
out of bounds
>
> What does this mean?
>
> Do I scrape this approach and use another?
>
> Ed
Edward,
Is cCst a character string? If it is a number as you say, then change
this:
dSet.filter := [COST >= ']+ cCst +[']
to this:
dSet.filter := [COST >= ]+ cCst
If cCst is a number you will find it appropriate to use nCst as the name
of the variable to help you remember what type of value you have.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: Translate Error |
 |
Fri, 04 Apr 2008 08:17:58 -050 |
Geoff,
The value is a number and your recommendation works like a champ.
This is what I was trying to do a week ago.
Thank you for your insight and the recommendation. It will help me keep
character and number straight for a moment or two.
Ed
Geoff Wass [dBVIPS] Wrote:
> In article <aAcdyfWlIHA.1688@news-server>, jdrandall@t-online.de
says...
> > Greetings,
> >
> > I have been following some of the discussion concerning the use of the
numeric field. I ran into a problem with the numberic field when I wanted to
use a form to filter rows to generate a report showing COST >= '30'.
> >
> > I have a form with a disabledentryfield where I enter the value for
the filter.
> >
> > The aParams code is:
> > cCst = this.parent.en1cst1.value
> > aParams[ "CST" ] := ltrim( str( cCst ) )
> >
> > DO preview.wfm WITH "lpc.rep",true,aParams
> >
> > The report setParams code is:
> > local cCst, dSet
> > dSet = this.form.lprptdatamodule1.t1.rowset
> > cCst = aParams[ "CST" ]
> >
> > ? "cCst: " + cCst ...shows
cCst: 30
> > ? "filter: " + [COST >= ']+ cCst +['] ...shows
COST >= '30'
> >
> > dSet.filter := [COST >= ']+ cCst +[']
> >
> > RETURN LPCREPORT::render()
> >
> > When I get to the dSet.filter code I get the message:
> >
> > Problem using file name! Database engine error: translate error.
Value out of bounds
> >
> > What does this mean?
> >
> > Do I scrape this approach and use another?
> >
> > Ed
>
>
> Edward,
>
> Is cCst a character string? If it is a number as you say, then change
> this:
>
> dSet.filter := [COST >= ']+ cCst +[']
>
> to this:
>
> dSet.filter := [COST >= ]+ cCst
>
> If cCst is a number you will find it appropriate to use nCst as the name
> of the variable to help you remember what type of value you have.
>
> --
> 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: Translate Error |
 |
Sat, 5 Apr 2008 00:36:35 -0400 |
In article <NCaINZllIHA.960@news-server>, jdrandall@t-online.de says...
> Geoff,
>
> The value is a number and your recommendation works like a champ.
>
> This is what I was trying to do a week ago.
>
> Thank you for your insight and the recommendation. It will help me keep
character and number straight for a moment or two.
>
> Ed
Edward,
You're welcome. In the dUFLP there is a file dhung2.txt which describes
a naming convention in detail that can be very useful.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|