×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

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.

Students Click Here

Crystal Reports - how to display all prompts I input?

Crystal Reports - how to display all prompts I input?

Crystal Reports - how to display all prompts I input?

(OP)
I would like to be able to display in the header of the report all of the prompts that were entered into the report when it was run.  If an input parameter allows MORE THAN ONE values to input.  If I put that parameter field on the report it will only give me the first parameter that I input even though the report will print all of the data associated with all parameters input.  Is there a special field that will capture all of those parameter values that I just input into the report? Or is there a way to build a string of the values that I just inputted into the report so I can display them on a header?
 This is only a problem when there is a parameter that allows more than one value to input.

Thanks in Advance,
Bessebo

RE: Crystal Reports - how to display all prompts I input?

I don't know your version, but if your version is compatible with the Join function, use it like this:

Join({?My Parameter},', ')

Naith

RE: Crystal Reports - how to display all prompts I input?

(OP)
Naith,
  Can you be a little more descriptive in what you are saying. If I wanted to create a formula which will be put in the header should I do the following?

'These are my inputs...' + Join({?My Parameter},', ')


REgards,
Bessebo

I cannot get the above to work...

RE: Crystal Reports - how to display all prompts I input?

That's exactly how it should look, providing all the above is in a formula.

You still haven't mentioned your version of Crystal Reports, so I'll assume that Join is a supported function for you.

When you say that you 'can't get it to work', exactly what kind of error are you getting?

Naith

RE: Crystal Reports - how to display all prompts I input?

(OP)
This is exactly how I put it in the formula:

'(Inputs for report + ' + Join({?Cust_Code},', ') + ')'

where {?Cust_Code} is my input variable.  The error I get is the following:

"A number, currency amount, boolean, or string is expected here." The cursor sits right in front of the Join.  I use Crystal Reports 7 and I find nothing in the Index that talks about a Join operator...

When I try to use the ToText function in front of the Join it tells me "The ) is missing".  

Can you do this in your Crystal Reports designer and then send me the code?

Thanks,
Bessebo

RE: Crystal Reports - how to display all prompts I input?

Providing {?Cust_Code} is a string parameter, what you posted would work in my designer.

But then, that's why it's good to post what version you're on. Because the reason it'd work for me and not for you is because I'm on v8.5 and you're on v7. Join was introduced in v8.

You will have to make an array for your parameter to mimic the join functionality instead. It's a little longer winded but does the same thing:

You'd probably have to use an array to check the number of values in the parameter instead.

WhilePrintingRecords;
NumberVar ValueCount;
StringVar Array ParameterArray := {?MyParameter};

ValueCount := Count({?MyParameter});

ParameterArray[1] +

(If ValueCount > 1 Then ', ' + ParameterArray[2] +
 If ValueCount > 2 Then ', ' + ParameterArray[3] +
 ... etc)

...keep going for as many values as you want to represent.

Naith

RE: Crystal Reports - how to display all prompts I input?

(OP)
Naith,
  You are the man.  It works like a charm.  Thanks so much...

Bessebo

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! Already a Member? Login


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