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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not purchased 1

Status
Not open for further replies.

Trainingjason

Instructor
Dec 6, 2001
127
GB
Using Xtreme I am grouping by customer and displaying each product that has been purchased.

Again within the same group how would I display products not purchased
regards


Jason
 
By applying the function Not() around whatever clause you're currently using.
 
One way would be to add an unlinked subreport to the group footer than contains all Products. Then in the main report, create two formulas:

//{@reset} to be placed in the group header:
whileprintingrecords;
shared stringvar prodID := "";

//{@accum} to be placed in the detail section:
whileprintingrecords;
shared stringvar prodID;

if instr(prodID,totext({Product.Product ID},"000000")) = 0 then
prodID := prodID + totext({Product.Product ID},"000000") + ", ";

In the subreport you would have the product ID and product name displayed. Then go to the subreport section expert->details->suppress->x+2 and enter:

whileprintingrecords;
shared stringvar prodID;

instr(prodID,totext({Product.Product ID},"000000")) > 0

This wouldn't work in 8.5 or lower, because you would hit the 255-character limit for the accumulation formula, but in higher versions this should work. I don't have access to my CR 11.0 right now, but I'm assuming that the Xtreme database has products with up to 6 digits--otherwise you can alter the formatting accordingly.

-LB
 
Jason, if you haven't already noticed, ignore my initial post, as I misread your requirements.
 
Thank you for your response, this is giving all products not bought on a line basis in the detail section.

I am trying to get a unique list of products purchased grouped by each customer, with a second list of products not bought

Thanks in advance

Jason
 
LB

You are cleverer than me, it works, thanks a lot. Xtreme has duplicate product names which threw me.

Regards


Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top