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

passing a SQL in the record selection formula. 1

Status
Not open for further replies.

aajay

Technical User
Oct 28, 2004
36
Crystal report 9.0 with service pack 3
data base is sql server 2000


I have a report that runs from a view. I would like to filter records
in the report based on a SQL subquery that operates on the view. Is
there a way to accomplish this in crystal? This is very similar to
having a SQL in the record selection formula of the report although
I am quite sure you cannot pass a SQL in the record selection formula.

We could possibly change the view to a store procedure and then
incorporate the logic to run the subquery. But, then I would land
me redoing the report since crystal might remove some or all of the
fields from the report when I change the view to the store procedure
and register it with crystal report.

Any ideas how to accomplish this would be of great help.
 
If I'm reading this correctly, yes you can do it. You can use the RecordsectionFormula property of the report to achieve this eg.

Code:
Report.RecordsectionFormula={Table.FieldName} = <value>

Hope this helps,

Patrick
 
SQL Server 2000 / Crystal 8.5

We currently changed to SQL Server 2000 and previous reports are having to be changed. When trying to link the tables it is not giving me the option to do a partial match of string data. The first field has a number of 0000-00000-001 and the second field is 0000-00000. Because of the -001 it will not generate my information. Before going to SQL the option was available for the partial matching, is there any way around this?
 
Thanks for your help its working now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top