Help with a join query into Crystal Reports 6 Exception Report 
Author Message
 Help with a join query into Crystal Reports 6 Exception Report

Hello Group,

What I am working on is an Exception Report.
Here is what the two tables look like.

Table 1 fields
CustomerID | MeasureID | DateVisited (unique) | Result

Table 2 fields
MeasureID (unique) | MeasureLimit

notes: Table1.MeasureID is joined to Table2.MeasureID.  Every time a
customer visits a new record in Table1 hence the unique date.  There is a
set group of unique Measures which all have a record in the Table2.

I want to do  a report that breaks down like this :

MeasureID sorted. Then CustomerID sorted. Dates going accross.

  QUESTION: If  NONE of the results (for any of the days) for MeasureID for
a particular customerID exceed the limit, I DON'T want that information in
the report.  Basically , If there is a violation of the limit I want that in
the report, if it falls within the norms I don't want it shown.  The problem
I have had is everyway I try to do this It tells me that "has not been
evaluated" error.

Any help would be appreciated.

Thanks in advance,

Matt Lefevre



Mon, 06 May 2002 03:00:00 GMT  
 Help with a join query into Crystal Reports 6 Exception Report
M;

I'll take a whack at it.

Select [Whatever from Table1 and Whatever From Table2] From Table1
    inner join table2 on (Table1.MeasureID = Table2.MeasureID and
Table2.MeasureLimit <= Table1.Result)
    order by MeasureID, CustomerID, DateVisited

That would give all rows from table1 that have a match in table2 which
satisfy the ON criteria, which would be the same measureID as the current
row in table1 and the measurelimit less than or equal to result.

What the selection criteria is is a little fuzzy.

ds


Quote:
> Hello Group,

> What I am working on is an Exception Report.
> Here is what the two tables look like.

> Table 1 fields
> CustomerID | MeasureID | DateVisited (unique) | Result

> Table 2 fields
> MeasureID (unique) | MeasureLimit

> notes: Table1.MeasureID is joined to Table2.MeasureID.  Every time a
> customer visits a new record in Table1 hence the unique date.  There is a
> set group of unique Measures which all have a record in the Table2.

> I want to do  a report that breaks down like this :

> MeasureID sorted. Then CustomerID sorted. Dates going accross.

>   QUESTION: If  NONE of the results (for any of the days) for MeasureID
for
> a particular customerID exceed the limit, I DON'T want that information in
> the report.  Basically , If there is a violation of the limit I want that
in
> the report, if it falls within the norms I don't want it shown.  The
problem
> I have had is everyway I try to do this It tells me that "has not been
> evaluated" error.

> Any help would be appreciated.

> Thanks in advance,

> Matt Lefevre



Fri, 17 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CRYSTAL REPORT, run time query report by date

2. Q: Pass a SQL query from VB to crystal report sub-report

3. sub-report (2 query's ) in crystal reports

4. Crystal Reports bug - report off new query

5. sub-report (2 query's ) in crystal reports

6. Printing Crystal Reports without Crystal Control ActiveX or Crystal Reports API call

7. Crystal Reports Exception

8. Crystal Reports Exception

9. CRYSTAL REPORTS: License exception

10. Crystal Reports Logon Exception for Subreports

11. Using Sub Query in Sql Query - Crystal Report 5.0

12. Crystal Reports Help Pls - Multiple Tables or Queries

 

 
Powered by phpBB® Forum Software