INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Dynamic Global String Array Used in Formula

Dynamic Global String Array Used in Formula

(OP)
Greetings,

I am a long time amateur user of Crystal XI. I have a report that I believe I need to create an Global StringVar Array but I need your assistance. Below is the structure of my report.

GH1 {ORDRHDR.SOLDTOCUSTID}

GH2 @WaveBatchIfThen // When we schedule orders in our WMS, warehouse management system, we do so in groups of orders. A Wave is a small set of orders that have a unique combination of items required to be picked while a Batch is a set of identical orders. Thus Waves are picked discretely, while Batch picking collects an amount of each item to satisfy the group of orders.

GH3 {ORDRHDR.ORDERNUMBER}

Details Left blank, restated, no detail records are in the Details section of the report and is suppressed. Only GH1 and GH2 are visible. For the sake of discussion I've placed the {NOTES.NOTES} field into the Details section of my report.

Example:

GH1 Pioneer
GH2 Wave 630388
GH3 3963993-1
Details CHANGE
Details CARRIER SERVICE CODE
Details MUSTSHIP

As you can see, the {NOTES.NOTES} field will return unique values when placed into the Details section of my report. The {NOTES.NOTES} field is a String value.

My ultimate goal is to build an Array that I can use in a formula like this.

if @Notes Array = “MUSTSHIP”
then “MUSTSHIP”
else “”

I believe the Array must be a Global Array, and I would like it to be accumulative for the purpose of future use, [CHANGE, CARRIER SERVICE CODE, MUSTSHIP], and finally I feel that it must reset to an empty Array for reconsideration of each order within GH3.

Can you please provide your expertise in answering this question for me?

Thank you in advance for your time!

RE: Dynamic Global String Array Used in Formula

Hi jpstrzoch

Maybe I don't fully understand what you are trying to achieve, but based on what I think you are trying to do I don't see a need to use an array (and in 15 years as a Crystal Report developer I have rarely found it necessary to use arrays).

As I understand it, you want to display "Must Ship" on the report if it appears in any one of the detail rows. While not specified, I'm guessing that this would be in one of the Group Sections. If that is it, I would approach it this way:
  • Create a Formula like this:

    CODE --> {@MustShip_test}

    IF  	{NOTES.NOTES} = 'MUSTSHIP'
    THEN 	1
    ELSE	0 
  • Place it in the Details section and suppress that section;
  • Create the following Formula:

    CODE --> {@MustShip_display}

    IF	MAXIMUM({@MustShip_test}, {ORDRHDR.ORDERNUMBER}) = 1
    THEN	'Must Ship' 
  • Place it in the appropriate Group 3 Header/Footer (note that, because it uses a built in Crystal Summary, it can be used in both headers and footers). I assumed the test is applied at Group 3. If it needs to be tested at Group 2 or 1 simply change the group field in the 2nd formula and place it in the appropriate group header/footer.
Hope this helps. If I have misunderstood what you are trying to do let me know and I will take another look.


Cheers
Pete

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close