Groups > dBase > dBase reports > Re: Params with table character field.value as a number




Params with table character field.value as a number

Params with table character field.value as a number
Sun, 02 Mar 2008 04:29:53 -050
I have a table with a character field with numbers 1 thru 30

I have an index titled "NUM" defined as "right(NUM,2)"

The comboBox with a lookupSQL I use to select the numbers shows 1,11,12,13 ...

The report Group1 GroupBy is "NUM"

When the report runs, the Group lines up as 1,11,12,13,14 ..., 2,20,21 ...

How do I get the numbers to Group by 1,2,3, ..., 10,11 ..., 20,21 ... without
doing 01,02 for the single digits?

When I change the table field type to numeric; adjust the index to
"str(NUM,2,0)", the form aparams shows "NUM = (1.00) " and
the report setParams returns "error - value out of bounds".


Post Reply
Re: Params with table character field.value as a number
Mon, 3 Mar 2008 00:49:44 -0500
In article <6KAT4fEfIHA.1880@news-server>, jdrandall@t-online.de says...
> I have a table with a character field with numbers 1 thru 30
> 
> I have an index titled "NUM" defined as "right(NUM,2)"
> 
> The comboBox with a lookupSQL I use to select the numbers shows 1,11,12,13
...
> 
> The report Group1 GroupBy is "NUM"
> 
> When the report runs, the Group lines up as 1,11,12,13,14 ..., 2,20,21 ...
> 
> How do I get the numbers to Group by 1,2,3, ..., 10,11 ..., 20,21 ...
without doing 01,02 for the single digits?
> 
> When I change the table field type to numeric; adjust the index to
"str(NUM,2,0)", the form aparams shows "NUM = (1.00) " and
the report setParams returns "error - value out of bounds".
> 
> 
> Ed
> 

Edward,

Your index needs to have the 01, 02, 03...30 values so that you report 
comes out in the right order. You can always _display_ the values as 1, 
2, 3...30.

You could use this for the index if NUM does not currently have the 
leading zeroes:

str( val( right( NUM, 2 ) ), 2, 0, "0" )

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

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
Re: Params with table character field.value as a number
Mon, 03 Mar 2008 08:23:46 -050
Geoff Wass [dBVIPS] Wrote:

> In article <6KAT4fEfIHA.1880@news-server>, jdrandall@t-online.de
says...
> > I have a table with a character field with numbers 1 thru 30
> > 
> > I have an index titled "NUM" defined as
"right(NUM,2)"
> > 
> > The comboBox with a lookupSQL I use to select the numbers shows
1,11,12,13 ...
> > 
> > The report Group1 GroupBy is "NUM"
> > 
> > When the report runs, the Group lines up as 1,11,12,13,14 ..., 2,20,21
...
> > 
> > How do I get the numbers to Group by 1,2,3, ..., 10,11 ..., 20,21 ...
without doing 01,02 for the single digits?
> > 
> > When I change the table field type to numeric; adjust the index to
"str(NUM,2,0)", the form aparams shows "NUM = (1.00) " and
the report setParams returns "error - value out of bounds".
> > 
> > 
> > Ed
> > 
> 
> Edward,
> 
> Your index needs to have the 01, 02, 03...30 values so that you report 
> comes out in the right order. You can always _display_ the values as 1, 
> 2, 3...30.
> 
> You could use this for the index if NUM does not currently have the 
> leading zeroes:
> 
> str( val( right( NUM, 2 ) ), 2, 0, "0" )

Thank you!!

This code gives me something to think about and to look up.

Post Reply
Re: Params with table character field.value as a number
Tue, 4 Mar 2008 01:32:53 -0500
In article <$x#UPHTfIHA.1880@news-server>, jdrandall@t-online.de says...
> 
> Thank you!!
> 
> This code gives me something to think about and to look up.
> 
> Ed
 

Edward,

You're welcome. Good luck with it.

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

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
about | contact