Talk with the Author
 Crystal Reports Forum : General Information : Talk with the Author
Message Icon Topic: Limiting Record Selection in Sub Reports Post Reply Post New Topic
Author Message
mwahid
Newbie
Newbie
Avatar

Joined: 05 Mar 2007
Location: United States
Online Status: Offline
Posts: 8
Quote mwahid Replybullet Topic: Limiting Record Selection in Sub Reports
    Posted: 18 Mar 2007 at 5:50pm

Hi,

I have a sub report that takes part number (multi-valued Cascade Pick List parameter).  Since users can pick as many part as they want from pick list, I want to restrict their choices to the first 4 they pick.
I initially tried to use Redim Preserve function in a sub report forumula that
1. Reads the linked parameter from main report into a string variable
2. Sets the dimension to 4 elements and
3. Returns one of the elements like below:
 
WhileReadingRecords;
// Read linked main report parameter to a local array variable
StringVar Array PartList := {?Pm - PartNumber - PART_NO}
Redim PartList [4];
Partlist [1]
 
I named the formula PartListSub1 have 3 more formulas like the one above for rest of the elements in the array.  Then, I put them in a selection formula for the subreport like below
 
{PART_VIEW.PART_NO} = {@PartListSub1} or
{PART_VIEW.PART_NO} = {@PartListSub2} or
{PART_VIEW.PART_NO} = {@PartListSub3} or
{PART_VIEW.PART_NO} = {@PartListSub4}
 
It is not working for some reason. What am I doing wrong? Or is there another way to restrict the parameter entry to only 4 elements (besides putting a warning in the prompt).
 
Thanks in advance for your help.
MW
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.