Focal Point
[SOLVED] ReportCaster-Send e-mail with conditions

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8667054316

November 25, 2011, 02:31 AM
Elaine
[SOLVED] ReportCaster-Send e-mail with conditions
Does anyone know that if ReportCaster could send e-mail through the thresholds trigger?
For example:
There is a field A in a report. If A>100 then send the report.Otherwise,the report will not be sent.

This message has been edited. Last edited by: Kerry,
November 25, 2011, 04:47 AM
Tewy
You could test the value of A within the fex, and if it is not > 100 branch to the end of the fex not running the report. This way no email would be sent, in addition the test conditions could be as complex as you wanted.

Eg

TABLE FILE filename
SUM
A
ON TABLE HOLD AS MYHOLD
END
-RUN
-READ MYHOLD &A.I3.
-IF &A LT 100 GOTO :theEnd;

put the email report here

-:theEnd


WF 7.6.11
Output: HTML, PDF, Excel
November 25, 2011, 06:41 AM
Elaine
Hi Tewy,
I created an AlertTest procedure and added it in the distribution list. But it didn't work. I found some error message in the log,it said that 'Error connecting to the Managed Reporting Repository:'.
Do you know why this happened?
My procedure code:
  
-* Created by Alert Wizard
-* version 1.0
-* start of the test report
TABLE FILE EMPLOYEE
-* Generated by Report Assist
SUM EMPLOYEE.PAYINFO.SALARY
BY EMPLOYEE.EMPINFO.DEPARTMENT
BY EMPLOYEE.EMPINFO.FIRST_NAME
BY EMPLOYEE.EMPINFO.LAST_NAME
WHERE EMPLOYEE.PAYINFO.SALARY GT 25000;
ON TABLE HOLD
END
-* end of the test report
-* start of the test
-RUN
-IF &LINES EQ 0 GOTO ALERTEXIT;
-* end of the test
-* start of the output report
-* Description at creation time
-**alert
TABLE FILE EMPLOYEE
-* Generated by Report Assist
SUM EMPLOYEE.PAYINFO.SALARY
BY EMPLOYEE.EMPINFO.DEPARTMENT
BY  EMPLOYEE.EMPINFO.FIRST_NAME
BY  EMPLOYEE.EMPINFO.LAST_NAME
WHERE EMPLOYEE.PAYINFO.SALARY GT 25000;
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END
-* end of the output report
-* start of the options
-* TWO_WAY_EMAIL=
-* TWO_WAY_EMAILDOMAIN=
-* TWO_WAY_EMAILDESCRIPTION=
-* TWO_WAY_EMAILFOLDER=
-* end of the options
-ALERTEXIT
-* End Alert Wizard

November 25, 2011, 08:44 AM
Tewy
When you say it didn't work, what didn't work? Can you explain the behaviour you observed, and what you expected to happen.

I don't have MRE here so I'm not familiar with it, but the error message doesn't seem to be related to the code, have you tried running it without the branching to see if that works for you?


WF 7.6.11
Output: HTML, PDF, Excel
November 25, 2011, 09:09 AM
Elaine
It didn't work. I mean Report Caster didn't send the e-mail and with an error message. When I executed a task with the type of WF Server Procedure, it works fine. But in my alert report task, I have to use the task type of Stardard Report and the Reprot Caster need to connect to MR. I thind the problem is my report caster couldn't attach to MR. But I don't know why. Frowner
November 25, 2011, 12:46 PM
MCKELPA99
You may need to enter an execution id and password when setting up the task in ReportCaster.


WebFOCUS 7.7.02
Unix
All Output
November 25, 2011, 01:02 PM
Elaine
I already know what the problem is.
Thank you all of you for helping me. Big Grin