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

Data Suppression for multiple rows

Status
Not open for further replies.

JMB7

MIS
May 19, 2004
26
US
Crystal 8.5
SQL Database

Hi,
I have a report where I need to suppress data. In order to suppress lines that do not qualify for my formulas I placed a suppression in GF2 - which works. (I inserted summaries and used MAX to display my data in GF2).I also need to supress dupliate patient data (pt name, account#), which I accomplished by reset's and accums - problem is they do not work togethor.
If I place the suppression in GF2, I get repeating patient detail,(the reset & accum do not work) and if I use the rest and accum to suppress the patient detail, I get every line for my formulas with data and blanks.

Current Report:
Patient # Formula1 Formula2 Formula3 Formula4
A 12345 xxx
A 12345
A 12345 xxx


Want report:
Patient # Formula1 Formula2 Formula3 Formula4
A 12345 xxx
xxx
xxx
xxx
B 67890 xxx



I need both the patient detail and formula fields to be suppressed if there is no data.
Thank you

 
Do your formulas result in numbers or string datatypes?

-LB
 
I result should be a string datatype. Thank you
 
If your formulas are something like:

if {table.field} = "A" then "Result" else ""

...Then you should be able to use a combination of field suppression on the patientId and acct# fields (format->field->suppress if duplicated) and section suppression (section expert->details->suppress blank section). If a patient/account can have no results, then add a formula to the section suppression (section expert->details->suppress->x+2):

maximum([{@formula1},{@formula2},{@formula3},{@formula3}]) = ""

This is assuming you are working with the detail section.

If you wanted the results of all formulas in one line, you could be using a maximum on each formula.

-LB
 
Thanks for the suggestion-
This is what I have done so far.
1 - I added the 'suppress if duplicate' to patientID and acct# fields
2 - I added 'suppress blank section' the format section of detail
3 - and added the MAX syntax to the detail section, X-2
I am working in the detail section.
My results are as follows: seems to be breaking for each formula. Is this even possible?? Would a sub-report be easier?
Thank you for all your help!

Patient # Formula1 Formula2 Formula3 Formula4
A 12345 xxx
xxx
xxx
A 12345 xxx
xxx

B 45678 xxx
 
What are your group fields?

I'm not sure why the details are repeating. What are the results of a formula that you place in the detail section for line representing the second instance of "A 12345":

previous({table.patientID}) + totext(previous({table.acctno}))

-LB
 
My group fields are as follows:
patient ID
Account#
Admit Date
Dsch Date
Length of stay

The results of my formulas for the second instant (same patient) is any free text that the user typed in that is flagged by my formula. There is one line of data per formula per patient.
Here is an example of one of my formulas:
if {xxx_palliative.obsv_cd_ext_name} = 'DNR ORDER DATE' then {xxx_palliative.dsply_val} else '0'

Discharge Disp DNR Order
0 030506 (free text)
0 060606 (free text)
 
Did you suppress the group headers for groups 3 to 5?

-LB
 
Yes, the group headers are suppressed. I do not think this can be done or I am missing something.
Thank you for all you help.
JM
 
I think the problem is the intervening groups. If you don't need these group sections except to order data, then remove the groups and go to report->sort records and add them as sorting fields there. Then I think your problem will be solved, in conjunction with my earlier suggestion.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top