Skip to Content
Former Member
Apr 25, 2007 at 08:42 PM

Generate one report for each record in a table?


Post Author: calvin

CA Forum: General

I'm not sure how to even get started with this task. I have an application where the user wants several reports generated (actually this is one report generated several times with different criteria) from criteria that is entered into a 'request' table. For example, the table contains:ReqDate, CriteriaType, GroupIDs, CriteriaValue where CriteriaType can be ALL, LE, or GE and CriteriaValue is a date, used when the CriteriaType is LE or GE. The GroupIDs can be one or more group ID's in a CSV list, e.g. G1,G2,G3. Typically the user will enter the same GroupIDs but request reports with differing Criteria Types. For example (columns separated by hyphens to distinguish from CSV list in GroupIDs column):Record 1: 04/20/2007-LE-G1,G3-04/30/2007Record 2: 04/20/2007-GE-G1,G3-05/01/2007The user wants the report run twice, both selecting records (from another table) in Groups G1 or G3, once with CriteriaDate <= 04/30/2007 and the second time with CriteriaDate >= 05/01/2007.I have no problem creating the report & I can even set it up to select the criteria from the request table. The problem is running it once for each record (with the request date, which is entered as a parameter), using the criteria from that record.I think I need to use a subreport but I've never used them for anything so I'm not sure how to even get started.Thanks for any suggestions.