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

Eliminate part of the calculation from the report

Status
Not open for further replies.

surad

Technical User
Mar 10, 2003
37
US
I need to modify the call wait time report to eliminate all calls over 300 seconds from the calculation in these pre-existing report. I am not sure how to do that. I am listing all the functions related to this.

If more info. is needed can e-mail the report design once I get response.

@N Cha. & Cor.

IF {application.applname} IN ["USCHAPTER", "US_chap_other", "US_chers",
"USENTERPRISE", "USOA", "US_RaiserEdge", "US_bio_OA", "US_businessOjct",
"US_chapter_OA", "US_ent_other", "US_financial", "US_fund_raising", "US_hr_sys"] THEN
{applicperf.tot_hand_qtime}

@D Cha. & Cor -

IF {application.applname} IN ["USCHAPTER", "US_chap_other", "US_chers",
"USENTERPRISE", "USOA", "US_RaiserEdge", "US_bio_OA", "US_businessOjct",
"US_chapter_OA", "US_ent_other", "US_financial", "US_fund_raising", "US_hr_sys"] THEN
{applicperf.answ_calls}+
{applicperf.xferout_calls}+
{applicperf.disconn_calls}+
{applicperf.changefromapp}+
{applicperf.given_calls}+
{applicperf.cancelled_calls}

@Daily Cha. & Cor -

IF Sum ({@N Cha. & Cor.}, {applicperf.datestamp}, "daily") > 0 AND
Sum ({@D Cha. & Cor.}, {applicperf.datestamp}, "daily") > 0 THEN
Sum ({@N Cha. & Cor.}, {applicperf.datestamp}, "daily") / Sum ({@D Cha. & Cor.}, {applicperf.datestamp}, "daily")
ELSE 0


@D Biomedical -

IF {application.applname} IN ["USNBCS", "USOTHER", "US_bio_other", "US_component", "US_don_collect", "US_don_recruit", "US_donor", "US_hazard", "US_lab"] THEN
{applicperf.answ_calls}+
{applicperf.xferout_calls}+
{applicperf.disconn_calls}+
{applicperf.changefromapp}+
{applicperf.given_calls}+
{applicperf.cancelled_calls}

@N Biomedical -

IF {application.applname} IN ["USNBCS", "USOTHER", "US_bio_other", "US_component", "US_don_collect", "US_don_recruit", "US_donor", "US_hazard", "US_lab"] THEN
{applicperf.tot_hand_qtime}

@Daily Biomedical -

IF Sum ({@N Biomedical}, {applicperf.datestamp}, "daily") > 0 AND
Sum ({@D Biomedical}, {applicperf.datestamp}, "daily") > 0 THEN
Sum ({@N Biomedical}, {applicperf.datestamp}, "daily") / Sum ({@D Biomedical}, {applicperf.datestamp}, "daily")
ELSE 0

@RF Biomedical -

Sum ({@N Biomedical}) / Sum ({@D Biomedical})

@RF Cha. & Cor -

Sum ({@N Cha. & Cor.}) / Sum ({@D Cha. & Cor.})

- Thank you
 
I'd rewrite it as a set of logical tests and running totals. Quite a bit of tedious work, but at the end you have a more flexible set-up.

Madawc Williams
East Anglia, Great Britain
 
Do you have a database field or a formula field that indicates the call wait time?

If so, just modify your record selection formula:

{CallWaitTimeField}<=300

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
This field is the Total all handled calls waited in queue{plicperf.tot_hand_qtime}. However, if I modify and put a constraint on the @N Biomedical variable
{plicperf.tot_hand_qtime} <=300, I am getting error message saying &quot;A number field or currency amount field is required here &quot;({@N Biomedical}&quot; which is under the @Daily Biomedical variable -

IF Sum ({@N Biomedical}, {applicperf.datestamp}, &quot;daily&quot;) > 0 AND
Sum ({@D Biomedical}, {applicperf.datestamp}, &quot;daily&quot;) > 0 THEN
Sum ({@N Biomedical}, {applicperf.datestamp}, &quot;daily&quot;) / Sum ({@D Biomedical}, {applicperf.datestamp}, &quot;daily&quot;)
ELSE 0
Thanks
 
Why do you use the term &quot;variable&quot;? I see no indication of any variables in use in your formula. Please post the entire formula(s) for {@N Biomedical} and {@D Biomedical} and any other formulas you need to reference to restrict the report's records.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
dgillz's,

Sorry I meant functions. I've listed all of them in my first posting. As I have mentioned before these functions were written by somebody else and I need to modify them with not have alot of experience writing funtions.

For now I am making the modification on sql query by adding applicperf.tot_hand_qtime <= 300 but altimately I would like to know how to change it within crystal sql.

SELECT
application.applname,
applicperf.datestamp, applicperf.answ_calls, applicperf.xferout_calls, applicperf.cancelled_calls, applicperf.given_calls, applicperf.disconn_calls, applicperf.changefromapp, applicperf.tot_hand_qtime
FROM
acd:informix.application application,
acd:informix.applicperf applicperf
WHERE
application.applid = applicperf.applid AND
(application.applname = 'USOTHER' OR
application.applname = 'USOA' OR
application.applname = 'USNBCS' OR
application.applname = 'USENTERPRISE' OR
application.applname = 'USCHAPTER' OR
application.applname = 'US_RaisersEdge' OR
application.applname = 'US_lab' OR
application.applname = 'US_hr_sys' OR
application.applname = 'US_hazard' OR
application.applname = 'US_fund_raising' OR
application.applname = 'US_financial' OR
application.applname = 'US_ent_other' OR
application.applname = 'US_donor' OR
application.applname = 'US_don_recruit' OR
application.applname = 'US_don_collect' OR
application.applname = 'US_component' OR
application.applname = 'US_chers' OR
application.applname = 'US_chapter_OA' OR
application.applname = 'US_chap_other' OR
application.applname = 'US_businessOjct' OR
application.applname = 'US_bio_other' OR
application.applname = 'US_bio_OA') AND
applicperf.datestamp >= ? AND
applicperf.datestamp <= ? AND applicperf.tot_hand_qtime <= 300
ORDER BY
applicperf.datestamp ASC
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top