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!

I am using Seagate Info 7.0. When I

Status
Not open for further replies.

beginnerkid

Programmer
Jul 20, 2001
50
IN
I am using Seagate Info 7.0. When I write selection formula for record selection, Not all the selection criteria appear on SQL query's where clause. Just one field appear on SQL Query string where clause criteria.

Please help
Thanks
 
Not all CR criteria can be converted into SQL. When it isn't converted, that means that CR is processing those rules at the client. Functions in the formula will usually prevent a field from moving to the SQL. If you post your record selection formula we can see if you can use alternative syntax or a SQL expression. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Yes Ken, I am using formula field in the selction formula. The whole thing is like this. I want to fetch records from backend database(Oracle) for a particular customer Id within a time period ( supplied by user as paratmer value ( start date and End date in mm/dd/format) but these parameter values are to be compared with database values which are in number form.

So selection formula looks like

{Table_name.Custmore_id} = 'My-Cuatomer'
AND
(({@OpenDate} >= {?Start Date} AND {@OpenDate} <= {?End Date})
OR
({@CloseDate} >= {?Start Date} AND {@CloseDate} <= {?End Date}))


Where OpenDate formula converts the date from number to dd/mm/yy format.

My problem is Crystal Info converts only the &quot;{Table_name.Custmore_id} = 'My-Cuatomer'&quot; part in to SQL selection criteria and leaves rest. I want all this criteria in to SQL query. Please help ( I will much appreciate if there is other way to get this done, no matter how hard )

Regards

 
CR can't convert most of it's own functions into SQL, so you can't use those date formulas.

Can you give me an example of how your date field values are stored as numerics? Is it something like:

20010831

You could prompt for 2 numbers instead of 2 dates. It should then go to SQL Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Date is stored in Epoch Time, while I have to have input dates in statndard time format (mm/dd/yy) from user. Is there anyway I can convert parameter values right after user types in and then aupply it to selectin formula as value. One more question, In above formula, Even i tried to give constant value replacing very formula function it doesnt appear in SQL query. Is it that I am using various commbination of AND and OR.
Thanks for your kind attention
Regards
 
Correct, the OR can't be converted either.

You can try to convert it via formula, but if you need functions to convert it, I think it has to wait till the data is read.

What is the database backend?
Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Sorry for not being precise. It is Oracle v 7.3
Thanks for the help
Regards
 
Sorry, I don't know what Epoch time is.

Another approach to try would be to write a view or stored procedure in the datbase that has it's own parameters. I believe that SP parameters can be exposed in CR. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top