Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where does a sql statement fo in Crystal? 1

Status
Not open for further replies.

LeighAnne

Technical User
Mar 8, 2002
65
GB
How and where does a sql statement go in Crystal? I found out the Expression Editor is a joke - that it's not meant for actual SQL Statements(from a document on crystal's website).

Can anyone help me please? Let me know if you need more inforamtion to help me but I think it's straight forward - I want to place a field in the report that looks up the PROJECTID field that = FORID and retunr the INFLUENCEID.

Here's what should work, I think, but I don't know where to place it or if it's syntax is ok for crystal-

SELECT tblInfluence.'InfluenceID'
FROM 'tblinfluence' tblinflence,
'tblproject' tblproject
WHERE tblProject.ProjectID =
tblInfluence.ForID



 
In CR 9, use
Database, Database Expert...
to select tables and join them.

To see the SQL statement, use
Database, Show SQL Query...

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Same idea:
Database, Visual Linking Expert...
Databakse, Show SQL Query...

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
How do I then allocate that code to a specific field?
 
hi
join your 2 tables on
tblProject.ProjectID =
tblInfluence.ForID
and from the report -> select expert
select your filter to what id should you return.
you can used a parameter to caal it also

cheers

pg

pgtek
 
Thanks, that worked !

I had already sussed the report -> select expert and when I first added the join it still didn't work.

I cleared all current joins and started again and hey presto!

Thanks again

Le
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top