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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid question on Basic vs Crystal Syntax

Status
Not open for further replies.

lawsonreports

Technical User
Jun 19, 2003
13
US
This is a basic formula. How would this be written in Crystal syntax? And is there any advantage to using one over the other??

formula = "From " + ToText(Minimum({?ActivityDateRange})) + " To " + ToText(Maximum({?ActivityDateRange}))
 
Use:

"From " + ToText(Minimum({?ActivityDateRange}), "MM/dd/yyyy") + " To " + ToText(Maximum({?ActivityDateRange}),"MM/dd/yyyy")

I don't know if there any advantages in using one over the other.

-LB
 
I believe this same formula would work in Crystal Syntax, as is, as long as you set the parameter up to allow for ranges. Otherwise you'd get an error.

The advantages of using Crystal Syntax (my opinion):

1. Almost anyone you ask help from will be a user of Crystal Syntax or at least understand it.

2. You cannot use basic syntax in the Record or Group selection formulas. (Not my opinion on this one.)

Other differences include how you write your control structures (for-next loops spring to mind) and use of certain keywords.

However, if you happen to be real familiar with visual basic or some other form of basic, you might have a shorter learning curve getting there. If your pool of helpers is more likely to be a bunch of Basic programmer, then go that route.

If you are starting from scratch and want the most flexibility for advancement, go with Crystal Syntax.

But except for point 2 listed above, they are functionally pretty much the same. In theory if you can write something in one of them, you can write it in the other.

If you want to read more, go to the crystal help file and look at arrays, do-loops, for-next loops, and that sort of thing.

scott.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top