Crystal Reports How To — Parse Comma Separated String Parameters

Peter Musu`
1 min readAug 4, 2020

--

Crystal Reports How To — Parse Comma Separated String Parameters

Create a multi-value parameter ({?Customer Name}) with these properties: • Default Value: ALL • All multiple values: TRUE Add a row to the parameter’s pick-list grid; supply ‘ALL’ and ‘ALL’ (without single quotes) Create a Custom Function (named ‘Delimit’) with this text: // Delimit()// enclose each value in array in **, returning an arrayFunction (Stringvar Array params) Split(“*” + Join(params, “*,*”) + “*”, “,”) Modify the report’s record-selection formula: If {?Customer Name}<>”ALL” Then {TABLE.CUSTOMER_NAME} LIKE Delimit({?Customer Name})Else True Optionally, create a formula to display the parameter’s values with this text: //{@Customer Name}Join( Delimit({?Customer Name}), “;”)

https://stackoverflow.com/questions/10093544/looping-through-a-multiple-value-parameter-array

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response