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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can i pass sub query or query as parameter to crystal from VB

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have my dsr file in vb.
Now my query will be in this form.
select * from table1 where table1.field1=(select field1 from table2).
So i dont want to make recordset as it is using lots of memory.
I want to pass it to crystal directly .
Please suggest me how to solve.
I am a new to crystal.So some code example will be of great help

Thanx in advance
 
Crystal 8.5 and earlier does not directly support what you want to do.

In 8.5 (I missed a couple versions, not sure the first one you can do this in) you can edit the SQL statement to contain what you just wrote. You can only change the where statement, anything else is discarded. Select database, show SQL query and then edit it directly.

If you need an output field that is a nested query you need to use a subreport.

I have not had an opportunity to evaluate Crystal 9.0 but it supposedly supports full control of SQL.

Lisa
 
Hi,
My query will be created dynamically depending upon certain crirterias.So I dont know what will be the exact query.
But there will be some sub query for sure.
When i can make a recordset and pass it to crystal but its taking up huge memory and programs hang.
So i want to pass query directly.
Or some give selectedformula.
Pleas help me

Thanx
 
I don't believe that you can pass Crystal a query that it normally wouldn't mind having. For this you might want to approach the dataset from a stored procedure perspective?

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top