Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Case Formula 2

Status
Not open for further replies.

mmt4331

Programmer
Dec 18, 2000
125
US

Please look at the following code done in Crystal Syntax:

Global NumberVar One;
Global NumberVar Two;
Global NumberVar Three;
Global NumberVar Four;
Global NumberVar Five;
Global NumberVar fyi;

Select {TurnOverV2.Severity}
Case "1":
One := One + 1

Case "2":
Two := Two + 1

******************

How do I get variables One and Two to print out?


mark
 
Hey There,

Simply create a formula such as @showvar1 which simply declares the variable, i.e. global numbervar one, and then drop @showvar1 on the report.

Hope this helps..

Nuffsaid
 
If you want it to print using the same formula, just add it to the end of the formula (the stuff in bold). The numbers will be display using the system default format.

Select {TurnOverV2.Severity}
Case "1":
One := One + 1

Case "2":
Two := Two + 1;
One & " " & Two

Mike

 
Wow. I can't believe that I missed that.
You can concatenate numerics in Crystal syntax by using the ampersand.

But if you need to control the format of the numeric you can also use the alternative:

Totext (one,0,'') + ' ' + Totext (two,0,'') Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top