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

Need to use a formula field in SQL Query...

Status
Not open for further replies.

Slingky

IS-IT--Management
Mar 4, 2003
67
CA
ok... i have two tables i want to link.
GLJrnDtl and POHeader

I link both with the field "Company"

and i made a formula field called "PO" which is an extraction of a part of the "Description" field in the GLJrnDtl table.

And i want to link the "PoNum" field in the POHeader table to the "PO" formula field.

When i do it, either in the record selection formula or in the SQL Query window...

I get "Syntax Error (7587)" message... when i run the report.

I use Crystal Reports 8 Professional and a Progress 9.1 database.
 
hi

can you give more detail and
can you copy your formula
and do you have a group on your report

pgtek
 
A Crystal formula can't be used to join tables.

You might manually edit the SQL and use Progress SQL to do the equivalent of your formula for the join.

Or you might create a View in Progress.

Or in Crystal you would have to create a subreport and link via your formula, which will work, but it's less efficient.

-k
 
The SubReport solution is ok...except that i can't group in main report on a shared variable.

So, please help me to make a view or stored procedure which will give the correct extract string.

I remember you that i'm in progress database 9.1

I tried The "InStr" SQL92 function of progress, but it give me syntax error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top