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!

Adding Alert Message to Report Header 1

Status
Not open for further replies.

YANKRAY

Technical User
Nov 7, 2003
283
In CE9.0, how do you add an Alert Message to the Report Header.

For Example, I have three alert messages in my report. One Alert gives "Work Orders over Budget", another gives "Work Orders not Closed" if the conditions are met.

If "Work Orders over Budget" message appears, and the user selects view records, I want to see "Work Orders over Budget" in the Report Header only when the view records is selected.

Thanks,
 
There are a few functions that you can use:

IsAlertTriggered() - the argument is the report name in quotes
and
AlertMessage() - and again, the argument is the report name in quotes

Try something like this:
Code:
if IsAlertTriggered ("WOOverBudget") then
    AlertMessage ("Work Orders over Budget")
else if IsAlertTriggered ("WONotClosed") then
    AlertMessage ("Work Orders not Closed")
else
    ""

Add another else if in there if you need to test for another Alert.

~Brian
 
I was getting an error message when I used the AlertMessage. I took this out and left just the text I wanted to see.

This worked ok, but if a report gives three alerts, the first alert is on the header page if I close out the alerts and don't choose one. The one(s) I do choose have the proper message text in the header.

Any suggestions on how to not show a message in the Report Header in my base report that does not select an Alert Trigger?

(I am using a formula for this - I assumed that is where you wanted me to try)
 
Yes, I wanted you to use a formula.

Can you post the contents of your formula please?

~Brian
 
Here is the formula I am using:

if IsAlertTriggered ("Over 90") then
"Open Cards with 90% of Estimated Hours used"
else if IsAlertTriggered ("OverBudget") then
"Cards Exceeding Estimated Hours"
else if IsAlertTriggered ("Estimates") then
"Cards With Estimated Hrs <= .1"
else
 
When you used AlertMessage() did you write it this way:

if IsAlertTriggered ("Over 90") then
IsAlertTriggered ("Over 90")
else if IsAlertTriggered ("OverBudget") then
IsAlertTriggered ("OverBudget")
else if IsAlertTriggered ("Estimates") then
IsAlertTriggered ("Estimates")
else ""

I created a test report and if I did not choose to View Records for one of the reports, I did not get a message from the formula.

~Brian
 
Did you mean to have IsAlertTriggered for every entry? You asked me abut AlertMessage.
 
Typo on my part, should have been:

if IsAlertTriggered ("Over 90") then
AlertMessage ("Over 90")
else if IsAlertTriggered ("OverBudget") then
AlertMessage ("OverBudget")
else if IsAlertTriggered ("Estimates") then
AlertMessage ("Estimates")
else ""

Is this what you had when you said it wasn't working as expected?


~Brian
 
Thanks Brian. That worked. I was trying to dictate the message content in my formula. I understand the concept now.
 
Brian,

I have a problem with my new formula. It is a strange one. Everything works perfectly...except...

When I select the "OverBudget" Trigger, I get the "Over 90" Trigger message in the Report Header.

I have tried the following:

Checked to be sure the message was written correctly.
Rearranged the formula thinking the 2nd IF statement might be the problem.
Changed the name of "OverBudget"

Nothing has worked. Any ideas?
 
I did some testing on this and I am seeing the same resutls that you are. It seems to work fine when there is only one Alert, but gets really buggy after more are added.
I will keep playing with this to see if I can come up with a way around.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top