Search code examples
crystal-reports

Is it possible to create lists or other mutable objects in Crystal Reports?


It would be very useful for my current task to have lists or sets in Crystal Reports. Unfortunately I haven't found anything in my documentation or online search. Anyone has an idea?


Solution

  • You will need to handle mutable list in an external function. You can create UFL and expose functions like ListCreate, ListAdd, ListRead, ListDispose

    If you don't want to deal with UFLs you can resize the array using redim preserve

    redim preserve arrayname[new size];

    Obviously this will copy the existing array into a new one and increase/decrease the size so there will be performance penalty. However, Crystal reports is slow anyway and I doubt copying a small array will be a significant performance issue.