Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting selection to first record of VendorID

Status
Not open for further replies.

LindaNavitas

Technical User
Nov 11, 2012
2
US
I am trying to create a report that first selects new vendors (so I must have only 1 record per VendorID). Then I'm linking in a subreport by VendorID to show all the customer applications submitted by those vendors.

My issue is that the way that I have to select who is a new vendor in the main report sometimes produces more than one VendorID record. Possible Solution 1: Is there a way to limit the selection criteria to only select the first VendorID record?

Possible Solution 2: I know that I can group by VendorID, which would print only 1 VendorID record in the main report, but when I link the subreport by VendorID I get multiple copies of everything in the subreport (becuase there are multiple records of VendorID in the main report). And crystal doesn't allow me to link subreports by Group, but just by a field. Is there a way to link subreports by Group (VendorID group)?

Possible Solution 3: ? Have no idea. ;)

This is an example of trying to do 2 different selection processes in one crystal report. The main report selects the new vendors and the subreport selects the customer applications (but only those application who use a new vendor).

This is driving me crazy. Any suggestions would be extremely welcome.

Thanks,
Linda
 
You should link by vendor ID and place the subreport in the group section. If you want the sub data to appear below the group header, insert a group header_b section and place the sub there.

-LB
 
lbass: Thanks! Worked like a charm.

Now I need to master group the subreport by salesrep. But when I try to insert salesrep as a higher level group , I start getting lots of multiples in groups and records. (Each vendor is associated with only 1 salesrep.)

example of what I need:

Salesrep1
VendorID1
Application 1, vendor1
Application 2, vendor1
VendorID2
Application 3, vendor2
Application 4, vendor2
VendorID3
Application 5, vendor3

Salesrep2
VendorID4
Application 7, vendor4
VendorID5
Application 8, vendor5
Application 9, vendor5

etc.

Any ideas?
Linda
 
What tables are you using in the sub, and how are you linking them? Also please show a sample of the results you ARE getting.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top