Solved

crystal parameter description into array rather than the parameter itself

Posted on 2011-02-23
3
719 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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