bombdesign Posted November 9, 2004 Posted November 9, 2004 Hi all In an order database i need to pull out some statistics namely how many of each products was sold by our different sales persons. The result should be something like: Pete; Product_001; 2 pieces Pete; Product_002; 5 pieces Brian; Product_001; 5 pieces Brian; Product_002; 3 pieces etc. Seller is in a value list and product is in a product number field where the productnumber is increased by 100 for each iteration eg. 101, 201, 301 etc. I need to figure out how to loop through the value list containing the sellers (whith Get(ScriptParameter) maybe?)for one product and then go to next product and do the same seller loop. Any little clue that could point me in the right direction would be appreciated. Thanks Thomas
Ugo DI LUCA Posted November 9, 2004 Posted November 9, 2004 It's not clear what exact loop you want. Just guessing... Create a relationship from a global gSeller to the Table where your "Products sold by" are stored, through a relationship gSeller::Seller. Create a Value List named "ProductsBySeller" using this relationship and returning the ProductIds. Each of your sellers can be parsed through a loop from the ValueListItems(Get(FileName);"MySellerList") and passed to gSeller. Then in turn, each of your Products for this gSeller can be parsed through a sub-loop from the ValueListItems(Get(FileName);"ProductsBySeller") HTH
Ender Posted November 9, 2004 Posted November 9, 2004 I'm not sure why you want to do this with a value list. It's probably easier to use a columnar report with sub-summary parts to summarize data.
Recommended Posts
This topic is 7322 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now