Wednesday, March 7, 2012

Crystal Alerts but in Reporting services

In Crystal Reports you can setup Alerts to alert you to a certain criteria when ever you refresh the report..

Is this possible within Reporting services?

If so how do you set them up?

Thanks

I'm not sure how well it would work for you because I am not sure of your criteria, but you could add a reference to System.Windows.Forms and then add code to the code window that displays a message box if certain criteria is met. If you can give me an example of your criteria I can try to give you an example.

Simone

|||

Hi Simone

Its a really simple criteria

In crystal I have setup

Sum ({@.Euro to Sterling GP}, {ACCOUNT_NAME}) < 25.00

Thanks for your help

|||

This is somewhat of a hack, but it should work:

Add a reference to System.Windows.Forms
In the code window, add a function similar to the following:

function ShowMessage(value as decimal) as decimal

If value < 25 then System.Windows.Forms.MessageBox.Show("Your Message")
ShowMessage = value
End function

In the field where you have the summary:


Add the following expression:
=Code.ShowMessage(Sum(FieldToSum,ScopeName))

I hope this helps. I've never used alerts in Crystal, but this will show a message box. You could also change the color of the field by using an expression if this is a better option for you. You may want to set a variable to only show the message once if multiple values are < 25.

Simone

|||This is not possible with Reporting Services. If you use the ReportViewer control you can trap events but not down to the data changes. With web reporting and rendering the report in a frame, you may try to get try to get a reference to the field but to track the change you need to track the old value so it will hairy.|||Thanks guys for all your help|||

I see that this only works in the development studio. I wondered how it would behave when displayed through IIS.

Thanks for the explanation.

No comments:

Post a Comment