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

selection formula question

Status
Not open for further replies.
Nov 23, 2006
22
GB
Hi,

I have a history journal on my database which has many entries for one work order. I only want the latest date entry of the history log to appear in the details section of the report. Is it possible to ask for this in the selection formula?
 
You can either build in this requirement in a command (if you have CR 9 or above), or you could go to report->selection formula->GROUP and enter:

{historylog.date} = maximum({historylog.date},{table.workorder})

...where there is a group inserted on the workorder field.

-LB
 
I have CR9, but what do you mean by building a command?

]sorry, I'm still new at this and teaching myself
 
If you are just starting out, you are better off using the second suggestion, as using a command requires building a SQL query from scratch.

-LB
 
I am able to set parameters, formulate SQL for selection formulas, but my knowledge of the sql functions isn't that good. I can do if else, datetime, strgvar, I'm just struggling with this one and the help on CR9 doesn't prompt you unless you understand the more complex commands.

I have put{historylog.date} = maximum({historylog.date},{table.workorder}) into the selction formula so logically only one record per work order is sent in the details, but the error message is saying it can't do that as it needs to calculate later.

please help!?
 
Charlie,

Make sure you put this in the GROUP selection formula, not the record selection formula,

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Go to report->selection formula->GROUP and enter it there, using your actual field names, not the ones I used as an example.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top