Solved

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

Posted on 2000-04-21
3
160 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb6 programatically bring window to front 8 76
String manipulation in Visual Basic 7 73
Using "ScreenUpdating" 6 73
Visual Studio 2005 text editor 10 44
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

829 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