Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 2 list boxes;
List Box 1 have Products A, B, C and List Box 2 have Items 1, 2, 3 (all these items belongs to product B only). Now on the report, I want to see Product A, B, C and Items 1, 2 only.
The problem is, when I am selecting Item 1 and 2, its deselecting Product A and C and only showing Product B with Item 1 and 2. I have see all these selection on the report, which will be Product A, B and C with item 1 and 2.
Please let me know, if you know any way around. Thanks in advance.
~Sachin
OK, so items 1, 2 and 3 are sub-categories of product B, where products A and C don't have these sub categories?
So your data looks something like this?
[Sales]:
LOAD * INLINE [
Product,Item,Quantity
A,,5
B,1,2
B,2,4
B,3,8
C,,3
D,,7
];
And when you select Products A, B and C and items 1 and 2, you want to see this?
Product Item Quantity
A 5
B 1 2
B 2 4
C 3
I can think of a few approaches.
You say that all of your items are for product B. If you select any items, you can logically only see product B. There are no items for products A and C, so how can you expect to see items that don't exist on your report? Am I missing something?
I am sorry for the confusion. I took a hypothetical example. You can suppose there is no sub category for product A and C, however product B have 3 sub items in it. Product A and C also have sale and product B have sale at the product level as well we can classify them at Items level.
OK, so items 1, 2 and 3 are sub-categories of product B, where products A and C don't have these sub categories?
So your data looks something like this?
[Sales]:
LOAD * INLINE [
Product,Item,Quantity
A,,5
B,1,2
B,2,4
B,3,8
C,,3
D,,7
];
And when you select Products A, B and C and items 1 and 2, you want to see this?
Product Item Quantity
A 5
B 1 2
B 2 4
C 3
I can think of a few approaches.
I was able to make this type of selection by setting up a flag. In both tables, I set up a field (Sale) with a 1 or 0 depending on whether it should be selected or not. I named them the same, but I'm not sure if they shouldn't be two different names.
By selecting 1 in the Sale column, I get A, C and the 2 Items in B.
Here's the Inline I used:
LOAD * INLINE [
Product, Sale
A, 1
B, 0
C, 1
];
LOAD * INLINE [
Product, SubItem, Sale
B, 1, 1
B, 2, 0
B, 3, 1
];
EDIT: I posted before seeing John's reply. One of his suggestions should work for you.
Thanks a lot. Both of yours' suggestions seem to be working fine.