Crystal Reports Tutorial
Selected Reading
- Crystal Reports - Discussion
- Crystal Reports - Useful Resources
- Crystal Reports - Quick Guide
- Crystal Reports - Data Export to CSV
- Crystal Reports - Data Export to HTML
- Crystal Reports - Data Export to XML
- Crystal Reports - Data Export to Excel
- Crystal Reports - Data Export Overview
- Crystal Subreports - Overview
- Crystal Reports - Edit Parameter Field
- Crystal Reports - Create Parameter Field
- Crystal Reports - Cascading Prompts
- Crystal Reports - Prompt Panels
- Crystal Reports - Filters
- Crystal Reports - Parameters
- Crystal Reports - Creating Arrays
- Crystal Reports - Creating Variables
- Crystal Reports - Conditional Formatting
- Crystal Reports - Applying Calculations
- Crystal Reports - If-Then-Else
- Crystal Reports - Apply Boolean Formulas
- Creating & Modifying Formulas
- Crystal Reports - Formula Workshop
- Crystal Reports - Defining Formulas
- Crystal Reports - Cross Tab Layout
- Crystal Reports - Charts
- Crystal Reports - Inserting Objects
- Crystal Reports - Templates
- Crystal Reports - Group Options
- Crystal Reports - Groups
- Crystal Reports - Delete Sections
- Crystal Reports - Sections
- Field Objects Controls & Modifications
- Crystal Reports - Time Based Filters
- Query Filters & Filter Conditions
- Crystal Reports - Queries
- Crystal Reports - Data Sources
- Crystal Reports - Design Environment
- Crystal Reports - Getting Help
- Crystal Reports - Page Layout
- Crystal Reports - Options
- Crystal Reports - GUI Navigation
- Crystal Reports - Overview
- Crystal Reports - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Crystal Reports - Creating Arrays
Crystal Reports - Creating Arrays
An Array variable in Crystal Report can be defined by using a keyword “Array”.
Global NumberVar Array Z := [1, 2, 3];
You can also assign values to the elements of Array and these values can be used for computations in formulas. For example −
StringVar Array Z := [“Hello”,”World”]; Z[2] :=[“Bye”]; UpperCase (Z [2] )
This formula will return the string “Bye”.
You can also resize Array using Redim and Redim Preserve keywords. Redim is used to remove previous entries of an Array while resizing it, and Redim Preserve is used to contain previous Array values. For example −
Local NumberVar Array Z; Redim Z [2]; //Now Z is [0, 0] Z [2] := 10; //Now Z is [0, 10] Redim Z [3]; //Now Z is [0, 0, 0], Redim has erased previous Array values. Z [3] := 20; //Now Z is [0, 0, 20] Redim Preserve Z [4]; //Now Z is [0, 0, 20, 0], Redim Preserve has contained previous Array values. "finished"
Array with Loops
Arrays are also used with Loops: pke For loop.
Local NumberVar Array Z; Redim Z[10]; Local NumberVar x; For x := 1 To 10 Do (Z[x] := 10 * x); Z [5] //The formula returns the Number 50Advertisements