Solved

Compare variable's value in crystal......

Posted on 2000-04-21
3
159 Views
Last Modified: 2010-05-03
I tried to wrote same formula in 2 different ways but unfortunately it didn't run.
It gives me below mentioned error when i try to preview my report.

1)Error: Numeric Overflow.

StringVar X;
If {table_site.x_site_group} = "Bldg" then
    X := chr({table_site.objid})
Else If {table_site.x_site_group} = "Tenant" then
    If chr({table_site.child_site2site}) = X then
        {table_site.name}
    Else
        ""
Else
    ""

2)Error:The String is non-numeric.

StringVar X;
If {table_site.x_site_group} = "Bldg" then
    X := chr({table_site.objid})
Else If {table_site.x_site_group} = "Tenant" then
    If {table_site.child_site2site} = ToNumber(X) then
        {table_site.name}
    Else
        ""
Else
    ""

Let me know as soon as you can.


Thanks for your time in advance.

Thanks,
bhavesh55
0
Comment
Question by:bhavesh55
  • 2
3 Comments
 
LVL 3

Expert Comment

by:3rsrichard
ID: 2738267
If you hit debug it might tell you what line caused the error.
Also it might help anyone trying to help you to know what the "types" of your data items are.

Guess 1)
Chr(charcode)
The required charcode argument is a Long that identifies a character.
table_site.objid could be something other than a long.

Guess 2)
X := is a Pascal construct, not VB


Do you need to know twice?
0
 
LVL 3

Accepted Solution

by:
3rsrichard earned 100 total points
ID: 2738296
see above
0
 

Author Comment

by:bhavesh55
ID: 2745984
3rsrichard
I am talking about crystal report not vb.

anyway, i will give you point.

Thanks,
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Opening Remote & Local Data Connection 2 57
DIR issue 7 54
VB error "Type mismatch" 2 54
vbModal 12 51
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question