Solved

crystal parameter description into array rather than the parameter itself

Posted on 2011-02-23
3
715 Views
Last Modified: 2012-05-11
I have an array that is shown in the report header that shows the parameters selected.

The current array is as follows:

        stringVar array Sel_Dept := {?Department};
        numberVar Counter := 0;
        stringVar Dept_List := "";

        for Counter := 1 to UBound (Sel_Dept)
        do
        Dept_List := Dept_List & Sel_Dept [Counter] & chr (13);

        Dept_List

The issue is these parameters are name fields rather than the codes for the field.

e.g. code = 1 name = CORE

In an attempt to speed up the report, I have changed the parameter to use the code rather than the name and moved the name to the parameter description (but just show the description in the parameter list). Trouble is I don't know how to pass the parameter descriptions into an array rather than the parameters themselves.

Can anyone assist with this?

Thanks in advance.
0
Comment
Question by:delkent
  • 2
3 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 34959404
The descriptions are only visible for the selection dialog.  You can't use them in the report.  If you want to 'decode' the parameter value you will need to create another formula field or a general function to do that.

From your problem description it looks like you could just set up an array of descriptions and use the Code to get each value.
0
 

Author Comment

by:delkent
ID: 34959451
Hi peter57r

Thanks. What you are saying makes sense as there is only 10 different departments

"From your problem description it looks like you could just set up an array of descriptions and use the Code to get each value."

How would I do that?
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34959559
Then assuming you have using numbers 1-10 as the paramater values
//department to display
stringvar depts:=["dept1", "dept2", "Dept3"] ;  //as many as you need.
 stringVar array Sel_Dept := {?Department};
        numberVar Counter := 0;
        stringVar Dept_List := "";

        for Counter := 1 to UBound (Sel_Dept)
        do
        Dept_List := Dept_List & depts[Sel_Dept [Counter]] & chr (13);

        Dept_List

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Formatting a Crystal Reports Report 9 76
Ignore parameter if no value entered 22 46
Crystal Reports - group header 2 38
Crystal Reports CSV data source, field types 6 61
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now