Solved

Crystal: Passing an Array to a selection expert on sub report

Posted on 2014-04-15
5
1,763 Views
Last Modified: 2014-04-15
I have an array :

GLOBAL STRINGVAR ARRAY Lot_Num_Array;

It is variable to how many items are in it.  I need to pass this array to a subreport, then have the record selection expert print only those items that match to {Command.AME_DESCRIPTION}.
0
Comment
Question by:Kent Fichtner
  • 4
5 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40002211
Try this idea

Create a formula in the main report
Name - CreateParameter

WhilePrintingrecords;
GLOBAL STRINGVAR ARRAY Lot_Num_Array;
Join(Lot_Num_Array,'^')

Open in new window


RIght click the subreport
Click CHANGE SUBREPORT LINKS
Select your formula CreateParameter
Use the suggested parameter from the subreport pm_CreateParameter
CHoose the field in the subreport to filter on {Command.AME_DESCRIPTION}.
Click OK

Edit the subreport
CLick REPORT --> SELECTION FORMULA --> RECORD
Change the line that is

    {Command.AME_DESCRIPTION} = {?pm_CreateParameter}
 
to

     {Command.AME_DESCRIPTION} IN Split( {?pm_CreateParameter},'^')

mlmcc
0
 
LVL 4

Author Comment

by:Kent Fichtner
ID: 40002441
That now brings back info in the sub report, but not the correct information:

Attached is a picture of the report.

1- the first Lot number from Detail 1
2- the above read out of the formula in your code box
(above 2 is the sub report that also appends lot numbers to the array in detail b)
3-the lot number of the new sub report

I can't find out why they don't match, even the part code doesn't match...it is really odd.
0
 
LVL 4

Author Comment

by:Kent Fichtner
ID: 40002444
sorry forgot to upload the file
Untitled.jpg
0
 
LVL 4

Author Comment

by:Kent Fichtner
ID: 40002449
Sorry i found the issue, i had the subreport in GF1 not Dc.  Doing some testing now.
0
 
LVL 4

Author Closing Comment

by:Kent Fichtner
ID: 40002633
i really wish i could give you more points!  you made me look really good to the CFO and my manager!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb example issues 3 26
SQL, How to do aggregation on extracting field and range band field? 2 31
SQL Query 2 34
SQL USE DATABASE VARIABLE 5 28
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

837 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