I have a strange process going and would like to mimic how it works. on the IBM AS400 i have 4 queries going to produce the data set.
1. read the parts master and establish which parts are good as sellable.
2. read the sales summary table and match parts to the first set. Now i have taken these 2 temp tables and created a cr that the user enters
the month and year. for particular report they wanted now i had hard coded the 2 months they wanted to see no sales action on a part.
The CR produces which parts have had sales in the month year passed param, as well as the previous month to the passed.
3. Now is the tricky part. on the server what i did was exception match so that i got a list of those parts that are sellable but did not sell in specified months.
4. Final query simply joins various tables for some static data.
now at #3 in crystal, I am thinking I need to create a temp table to then run the exception query. this will work i have tested in sql. the question is
how to make such a temp table or do I out put to a sub report? then i think i can run the exception match in the command of the sub report.
the exception match looks like this. its an old way of processing i think but since the data is fine, I am leaning to sticking with that.
SELECT | ||
ALL | T01.IAPRT#, T01.IA101, T01.IAPRLC, T01.IARCC1, T01.IARCC2, | |
T01.IARCC3, T01.IARCC4, T01.IARCC5, T01.IARCC6, T01.IARCC7, | ||
T01.IARCC8, T01.IARCC9, T01.IARC10, T01.IARC11, T01.IARC12, | ||
T01.IARC13, T01.IARC14, T01.IARC15, T01.IAORDF | ||
FROM | CBLIB.INVPRT T01 LEFT EXCEPTION JOIN | |
CBLIB.SLDPRT T02 | ||
ON | T01.IAPRT# = T02.IAPRT# |