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

Generating Numbers

Status
Not open for further replies.

CBear

Instructor
Jun 1, 2001
21
0
0
CA
Anyone know how I can generate a list of numbers eg. 1 to 100 that I can use in report.

I could create a custom or temp table with a numeric field with a values 1 to 100 but rather use something thats completely internal to the report. I envision this could be accomplished with Crystal version 9's SQL command object.

Anyone know how this could be done. Snippet of code?

Select 1 as Index_Value
Union
Select 2 as Index_Value
.
.
Union
Select 100 as Index_Value

will do this, but I'm looking for something a bit more elegant eg. using some kind of control loop.

Anyone know something that will work in the SQL command object of Crystal 9?

Thanks,
 
You can create either an array or a running total - depending on how you want to use these numbers. Crystal can't create 100 records - if that is what you are trying to do. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
I believe you're correct.

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top