Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Sub Query Post Reply Post New Topic
Author Message
taoh
Newbie
Newbie
Avatar

Joined: 01 Jul 2011
Location: United Kingdom
Online Status: Offline
Posts: 1
Quote taoh Replybullet Topic: Sub Query
    Posted: 01 Jul 2011 at 3:13am
Hi

I've come back to CR Reporting after a long layoff and forgotten most of what I used to use, so I need help.

I am using CR XI to query Active directory. I want to produce a list of all groups and their  users.
As far as I can see there is no way via ADO to created the required SQL Statement.

So far I have two test reorts which do what I want.
The first
SELECT distinguishedName FROM 'LDAP://dc=Blah,dc=local'
WHERE  objectCategory='Group'
and
SELECT sAMAccountName, distinguishedName
     FROM 'LDAP://dc=Blah,dc=local'
     WHERE objectClass='person' AND  memberOf=
'CN=mygroup,DC=Blah,DC=local'

Is there any way of creating a report using the second qury based on the results of the first query.
e.g. using the distinguishedName from query 1 instead of 
CN=myGroup,DC=Blah,DC=local

Cheers
Taoh

IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 06 Jul 2011 at 4:55am
put it in a stored procedure feed the first query into a temp table
then the 2nd query i would join the temp table and use it as my final query
sharona
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.