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

Query results of previous query

Status
Not open for further replies.

dingleberry

Programmer
Dec 13, 2002
143
US
Hey all,
Please help. I'm trying to do something that I know would be very easy to do if I could use a programming loop but I can't.

I want to search for a list of part numbers to populate a report. From that array, I'd like to perform another query on each entry in the same report. Please advise.

 
Use the first query (report) as a data source for the second report. Just add the report .imr to the same catalog. It will create a folder for the report data elements in the catalog and be accessible for writing the second report.

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
Magic with Data [pc2]
Want good answers? Read FAQ401-2487 first!
 
Can the first and second report be all one report using sub reports or something?
 
The final report uses the first report as a data source. Only one report is visible to the end user.

Reviewing what you are trying to do, I'm not really sure what the first report gets you. Any filtering you would do there to get the array of part numbers could just as easily be done in the final report.

In order to filter by a non-contiguous block of uncertain size, you are limited to a couple of prompt options, including a multi-select picklist and an instring comparison. Unless of course the part numbers share another dimension that you can filter on (i.e. vendor, etc).

Dave G.




The Decision Support Group
Reporting Consulting with Cognos BI Tools
Magic with Data [pc2]
Want good answers? Read FAQ401-2487 first!
 
Our database has like 10000 6 digit part numbers in it. It also has a bunch of other information about those part numbers like vendors, bills of material, cost, etc. Let's say in one report, I want to pick all part numbers that start with 123 and it'll return

123123
123444
123778
etc.

At the same time, In the same report, I'd like to also query the bill of materials for 123123, 123444, and 123778 to find the item(s) in the bill of materials that contain the word "turbine" in the description. I'd like to do this in one report at one time. So first, it'd have to do the first query, and secondly it would have to do a bunch of queries on the results of the first one. I anticipate this report will take a while to generate and I am okay with that. I'd like to avoid running a report, and then using that as a datasource to run another report later. I'd like it to all occur at once. Is this feasable?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top