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!

Formula

Status
Not open for further replies.

sjc1956

Technical User
Jan 14, 2004
19
I have a surgery schedule. The way it prints right now is like this:

0700 Dr. Joe Blow Jane Doe Tonsillectomy

0800 Dr. Joe Blow John Doe Vasectomy

---------------------------------------------------------

0700 Dr. Howdy Doody Jane Doe Face Lift

0745 Dr. Howdy Doody Jane Doe Total Knee Repl

What I need is instead of the specific times being listed, I want the second surgery and any to follow to show "TF" instead of the time.

0700 Dr. Joe Blow Jane Doe Tonsillectomy

TF Dr. Joe Blow John Doe Vasectomy

---------------------------------------------------------

0700 Dr. Howdy Doody Jane Doe Face Lift

TF Dr. Howdy Doody Jane Doe Total Knee Repl


The time is casemas.sh_start(string) and the physician is a subreport called docname. Any help would be greatly appreciated.


 
What are you grouped by if anything?

Posting technical information is important:

Crystal version
Database/connectivity used
Example data (not what you don't want it to look like, what IS in the database)
Expected output (you did this)

You might use a formula to check if the physician is the same physician as the previous in the subreport, as in:

If {table.physician} = previous({table.physician}) then
"TF"
else
SameAsPrev:= False

This should give you some ideas, otherwise please post specifics about how the subreport is linked, and what the main report is grouped by, if anything.

-k
 
I'd do it differently. Do a formula field
Code:
If {doctor} = previous({doctor}) and
{patient} = previous({patient})
then "TF"
else Totext({Time}, "HH:MM")
I'd also suppress doctor-name and patient-name when these are the same as the previous, but that's a matter of style. In Crystal 10 you have a 'Suppress if Duplicate' as a check-box, as well as suppress using a formula test.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
If I have read the requirement right, I'm not sure the previous doctor and previous patient combination is the correct approach.

sjc, can you provide more information on the grouping or ordering of this report? Your example suggests that there is a grouping by physician, but it isn't clear how your subreport comes into this. Is your subreport in the detail section? It's important to understand the relationship between the subreport and your main report to ascertain get closer to a solution.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top