on 09-08-2011 2:01 PM
Hi,
I'm having trouble with a report. I would like to show all 'Deployed' and 'Auto-Added' Computers of all 'Active' Organizations.
I have 3 Tables: Computers, Organizational_Units, Status
When I just use Organization and Satus this is the SQL query it shows:
SELECT "Status"."Status", "Organizational_Units"."Name"
FROM "TEB-AlloyNavigatorDB6"."dbo"."Organizational_Units" "Organizational_Units" INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Status" "Status" ON "Organizational_Units"."Status_ID"="Status"."ID"
WHERE "Status"."Status"=N'Active'
When I add Computers, the report is empty. The SQL is:
SELECT "Status"."Status", "Organizational_Units"."Name", "Computers"."Computer_Name"
FROM ("TEB-AlloyNavigatorDB6"."dbo"."Computers" "Computers" INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Organizational_Units" "Organizational_Units" ON "Computers"."Organization_ID"="Organizational_Units"."ID") INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Status" "Status" ON ("Computers"."Status_ID"="Status"."ID") AND ("Organizational_Units"."Status_ID"="Status"."ID")
WHERE "Status"."Status"=N'Active'
Can anyone help me with this? To me it seems like Status is linked in a wrong way??
Edited by: B. Kleer on Sep 8, 2011 3:02 PM
Hi Kleer,
Please check the following Query and try to create a crystal report with the following query
SELECT "Status"."Status", "Organizational_Units"."Name", "Computers"."Computer_Name"
FROM ("TEB-AlloyNavigatorDB6"."dbo"."Computers" "Computers" INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Organizational_Units" "Organizational_Units" ON "Computers"."Organization_ID"="Organizational_Units"."ID") INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Status" "Status" ON ("Computers"."Status_ID"="Status"."ID")
WHERE "Status"."Status"=N'Active'
Thanks,
Naga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have built your report through Crystal's database editor, can you post your links here? I suspect your need to modify your link for status to an outer join.
Debi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kleer,
Thanks for your response. I suggested you, create a new crystal report by using the query through ADD Command.
SELECT "Status"."Status", "Organizational_Units"."Name", "Computers"."Computer_Name"
FROM ("TEB-AlloyNavigatorDB6"."dbo"."Computers" "Computers" INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Organizational_Units" "Organizational_Units" ON "Computers"."Organization_ID"="Organizational_Units"."ID") INNER JOIN "TEB-AlloyNavigatorDB6"."dbo"."Status" "Status" ON ("Computers"."Status_ID"="Status"."ID")
WHERE "Status"."Status"=N'Active'
Thanks,
Naga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.