Hi, I am using CR 10, and I think what I need to do is to use the results of a subreport to act as parameters in my main report, although I am open to suggestions if you see a better way to do this.
I am building product recall report, so that if we identify a batch of unsuitable raw materials, which have already been used in a work order, we can tell what those order numbers were.
I have a report that does this already, it is a simple query of BatchNo, which then tells me all the OrderNo's that were pulled from that batch.
What I am now trying to do is to go one step beyond that and identify whether any of the product resulting from those workorders was then used to make an even higher level assembly, and so on.
What I run the report I will always know the original "bad" BatchNo, and I can rely that the workorder "OrderNo" will always become the BatchNo of the resulting product. So I want to run a subreport whereby I enter the original "bad" BatchNo, and generate workorder "OrderNo's" which will then be delivered to the main report, which will run the same query using those "OrderNo's" as the next level "BatchNo's".
Right now, I am trying to get this to work for one level (One subreport feeding into the main report, to get two capture two levels of product to recall). Ultimately, I am hopeing to figure out how to run the query one time and have it repeat until there are no more workorder "OrderNo's" being output, which would mean that the query had reached the last level of unusable product.
I have used subreports before, but I only know how to make a single value available for use in a main report, for instance a collumn total. But I don't know how to make every value in that collumn available.
Any suggestions for making the entire column available to be used as a parameter in the main query, or for making the process repeat untill all workorders have been identified (without having to manually relaunch the query)?
Thanks,
Paul