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!

Crystal Report 11. Exclude suppressed records from grand total 1

Status
Not open for further replies.

trivalent

Technical User
Feb 21, 2007
28
US
I am new to Crystal report and need a little help. I have written a report that selects individual clients by
Program
Patient Name
Service value
Duration of stay
Cost of Service
Detail Section

I am using a selecetion formula to exclude selected patients from the report, as I am only interested in certain patients.
Question 1: How do you exclude the suppressed records from a grand total dollar amount. When I run a Sum() I am getting the excluded records in my calculation not just the selected. I just want to run a total dollar amount on the selected records.

I hope I have been descriptive enough.
 
If you exclude the patients in your record selection formula, they will not appear in the sums, as in:

not({table.patient} in ["Pt1","Pt4","Pt7])

This is much better than using suppression, since it will be faster and you won't have to correct for suppressed records. If there is some reason you need to include them in your report, then insert a running total on the amount field, evaluate using a formula:

not({table.patient} in ["Pt1","Pt4","Pt7])

Reset never (or on change of group, depending upon your needs. Running totals have to be placed in footer sections.

-LB
 
LB, I might not be doing my using suppression correctly. I am using this formula.
if {?Payor} = "MPRI" AND {billing_tx_history.v_service_value} LIKE "H*"
THEN
TRUE
ELSE
IF {?Payor}="Network 180 Block TH 35" AND{billing_tx_history.v_service_value} LIKE "H*"
THEN
TRUE
ELSE
IF {?Payor}="Network 180 Medicaid TH 35" AND {billing_tx_history.v_service_value} LIKE "H*"
THEN
TRUE
ELSE
IF {?Payor}="Self Pay" AND {billing_tx_history.v_service_value} LIKE "T*"
THEN
TRUE;
This is in the Section Expert under Suppress(No Drill-Down).
When the end user runs this report they first select a payor from a list. Then they select a serevice value. Im now not sure I have created this report properly?

 
This is fine as long as they are only selecting one value for {?Payor}, but again, why not set this up in the record selection formula? As in:

(
(
{?Payor} = "MPRI" AND
not({billing_tx_history.v_service_value} LIKE "H*")
) or
(
{?Payor}="Network 180 Block TH 35" AND
not({billing_tx_history.v_service_value} LIKE "H*")
) or
(
{?Payor}="Network 180 Medicaid TH 35" AND
not({billing_tx_history.v_service_value} LIKE "H*")
) or
(
{?Payor}="Self Pay" AND
not({billing_tx_history.v_service_value} LIKE "T*")
)
)

-LB
 
LB,
This tells you how new to crystal reports I am. I am not really sure as to how to implement a fromula into the record selection. I tried to enter it into the selection expert. I am not sure how to implement it.
 
You can skip the selection expert and go to report->selection formula->record and enter it there.

-LB
 
LB,
When I run the report I need to Select: a program, a payor and have a date range. I inserted the formula and got a compisition error. Do I need to alter my formula to add the select program and date range? I know this sounds like a bad question.

Also When I run my orginal report the correct files print to the screen but CR ( the lower right of the screen Records:234)show alot more were processed. Is this normal.
 
You have to add those criteria to the formula I gave you, but if you already used the criteria in the selection expert, then they should appear in report->selection formula->record already. You would modify the formula to look something like:

{table.program} = {?program} and
{table.date} = {?Daterange} and
(
(
{?Payor} = "MPRI" AND
not({billing_tx_history.v_service_value} LIKE "H*")
) or
(
{?Payor}="Network 180 Block TH 35" AND
not({billing_tx_history.v_service_value} LIKE "H*")
) or
(
{?Payor}="Network 180 Medicaid TH 35" AND
not({billing_tx_history.v_service_value} LIKE "H*")
) or
(
{?Payor}="Self Pay" AND
not({billing_tx_history.v_service_value} LIKE "T*")
)
)


I'm also not clear whether you only need the {billing_tx_history.v_service_value} to define the payor or whether {?payor} needs also to be linked to an additional database field of some kind, e.g., {table.payor}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top