Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1934
  • Last Modified:

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

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
Kent Fichtner
Asked:
Kent Fichtner
  • 4
1 Solution
 
mlmccCommented:
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
 
Kent FichtnerInformation Technology Systems SupervisorAuthor Commented:
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
 
Kent FichtnerInformation Technology Systems SupervisorAuthor Commented:
sorry forgot to upload the file
Untitled.jpg
0
 
Kent FichtnerInformation Technology Systems SupervisorAuthor Commented:
Sorry i found the issue, i had the subreport in GF1 not Dc.  Doing some testing now.
0
 
Kent FichtnerInformation Technology Systems SupervisorAuthor Commented:
i really wish i could give you more points!  you made me look really good to the CFO and my manager!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now