Grouping Question!
Hello, I have a stored procedure that I union two select statements. I had to add 4 new columns to the original output, and the other columns I placed nulls in so everything matches up. Basically I have two different kinds of orders that are associated with a part number. One order has a forecast type and the other order is an E2 order Number. ex: (some fields) PartNumber Forecast Type Due E2 Order E2Due 123456 Firm 3/10/2011 123456 Firm 2/28/2011 123456 8888 3/12/2011 But on my report instead of combining/ grouping all order numbers by part number into the table. It splits the two order types up into two reports. I've went into the list that is surrounding the table and grouped by partnumber, ive put multiple list's around my report and grouped by other fields and still no luck... No matter what I can't combine them into one report. Any incite would be appreciated! Thanks
March 23rd, 2011 4:33pm

Anyone at all?! Thanks
Free Windows Admin Tool Kit Click here and download it now
March 25th, 2011 4:38pm

Hi mxstar45, Do you want to display forecast type and E2 order Number alternately? if so you could make use of IIF function based on parameter's value, such as =IIF(Parameters!ParaName.value="ParaValue",Fields!forecastType.value, Fields!E2orderNumber.value) To the scenario of returnning two select statement in one store procedure, you could also divide the store procedure into two different datasets, which might be more flexible. If I misunderstand you, please feel free to let me know. Thanks, Challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
March 29th, 2011 5:02am

Well the way I have my procedure now is I have two select statements and a union between them. So that results in one dataset being returned... I want to display all the Forecast Types and E2 Numbers at the same time grouped by the Part Number. A Part Number may have 4 Forecast types and 2 E2 Numbers. Get what I mean! I have tried to split the results into two datasets as well but I kind of ran into the same problem. Basically I need like you an IIf function to put in place. But I do not know where to place one at... If I use the one you presented where would I place it at? Thank you much!
Free Windows Admin Tool Kit Click here and download it now
April 1st, 2011 2:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics