Formula Error - URGNET, PLEASE HELP..... 
Author Message
 Formula Error - URGNET, PLEASE HELP.....

Hi,

There are two USRE INPUT fields as FromID, ToID (an inquiry for
Employees' IDs in a certain range. ie From: 1234 To: 1550)

I have this code in VB5.0 for CR6.0 Pro.

Dim FromID as string    'List IDs From
Dim ToID as string      'List IDs up to
Dim IDStr as string

FromID = Str(ReportQuery.Text1.Text)
IDStr = "{EmpID.ID} >= " & FromID
IDStr = IDStr & " AND "
ToID = Str(RptQuery.Text2.Text)
IDStr = IDStr & "{EmpID.ID} <= " & ToID
.
.
.
CrystalsReport1.DataFiles(0) = "C:\BUDGET\BUDGET.MDB"
CrystalsReport1.SelectionFormula = IDStr
.
.
.
THEN I GOT THE FOLLOWING MESSAGE:
ERROR IN FORMULA < Record_Selection>
'{EmpID.ID} >= 1234 AND {EmpID.ID <= 1550'
A string is required here

MANY THANKS!

Oga



Tue, 21 Nov 2000 03:00:00 GMT  
 Formula Error - URGNET, PLEASE HELP.....

I suppose EmpID.ID is defined like a string in your database, if this is
the case you maybe want this:

 IDStr = "{EmpID.ID} >= '" & FromID
 IDStr = IDStr & "' AND "
 ToID = Str(RptQuery.Text2.Text)
 IDStr = IDStr & "{EmpID.ID} <= '" & ToID & "'"

but maybe you wont get the desired results, maybe you want to convert the
value of database to numeric value instead with built in functions of CR
..

--
Alberto Borbolla
Tecnologia en Sistemas
MEXICO

Replace "X" to send mail


Quote:
> Hi,

> There are two USRE INPUT fields as FromID, ToID (an inquiry for
> Employees' IDs in a certain range. ie From: 1234 To: 1550)

> I have this code in VB5.0 for CR6.0 Pro.

> Dim FromID as string       'List IDs From
> Dim ToID as string 'List IDs up to
> Dim IDStr as string

> FromID = Str(ReportQuery.Text1.Text)
> IDStr = "{EmpID.ID} >= " & FromID
> IDStr = IDStr & " AND "
> ToID = Str(RptQuery.Text2.Text)
> IDStr = IDStr & "{EmpID.ID} <= '" & ToID & "'"
> .
> .
> .
> CrystalsReport1.DataFiles(0) = "C:\BUDGET\BUDGET.MDB"
> CrystalsReport1.SelectionFormula = IDStr
> .
> .
> .
> THEN I GOT THE FOLLOWING MESSAGE:
> ERROR IN FORMULA < Record_Selection>
> '{EmpID.ID} >= 1234 AND {EmpID.ID <= 1550'
> A string is required here

> MANY THANKS!

> Oga



Tue, 21 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Formula Error...URGENT, HELP HELP HELP... PLEASE

2. URGNET, PLEASE HELP - VBAJET32.DLL FAILED IN CLIENT'S PC

3. Formula Error - URGENT, PLEASE HELP....

4. Formula Error - URGENT, PLEASE HELP.....

5. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

6. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

7. IRR formula - Please help me

8. IRR formula - Please help me

9. HELP with Stored Formulas Please!!!

10. Help me with this formula please.

11. Lay help with formula please

12. Adding Date parameters to my selection formula - Please help a dummy

 

 
Powered by phpBB® Forum Software