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

Initialize an Array in Crystal 8.5

Status
Not open for further replies.

Concrete

Technical User
Joined
Jul 17, 2002
Messages
5
Location
US
I'm looking for information on how to initialize an array in Crystal 8.5 with period information ie: Netposting01, Netposting01....Netposting12 These are numeric fields that contain period amounts. I'm trying to use a "For Loop" for adding up these period buckets instead of a very long "if" statement according to a parameter that an end user will enter.

Thanks
 
hi what version of crystal
and what field has to be on the report
is your Netposting01 contain all the information or
is there more to be addes to report
how many tables
how many field on the report
example
first field | second field

Netposting01 | have other info to be diplay
from other table here
 
I don't know what these - Netposting01, Netposting02 etc - are but yous initialize an array this way:

stringVar array netposting := ["1","2","3"]; //if a string
numberVar array netposting := [1,2,3]; //if a number

Boolean arrays are also possiblities...

Jim Broadbent
 
Consider posting database type, and example data and expected output.

Period information in buckets is often solved using a Cross-tab (Insert->Cross-Tab), and selection a date field, and what you want to summarize, and the type of summary.

There are also Running Totals (Insert->Field Object->Rigth click running totals and select New). Now click the field to summarize (which can be a field or a properly constructed formula), then select either Evaluate On Change of Group (if you're grouping the report by the periods), or use a formula and hard code in the period values.

Arrays should be your last resort, and the overall output is limited to 254 chars of ouput per formula in CE 8.5.

Hope this helps.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top