Solved

crystal parameter description into array rather than the parameter itself

Posted on 2011-02-23
3
714 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

20 Experts available now in Live!

Get 1:1 Help Now