Skip to main content

Posts

Showing posts from July, 2012

Email Alerts are not received...

In one of application, Email alerts are sent using SQL sp_send_dbmail stored procedure. Email alerts were working properly, but suddenly noticed email alerts are not received.

To troubleshoot the issue, first I checked the msdb.dbo.sysmail_event_log table using the below query.

SELECT log_id, event_type, log_date, description, process_id, mailitem_id, account_id, last_mod_date, last_mod_user
FROM
msdb.dbo.sysmail_event_log 
ORDER BY
log_date DESC

If there is any error, you should see records with the event_type value as error.
In my case there are records with event_type value as error, and the description value for those records is same as below

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2018-02-01T10:41:27). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required).  )

As per the error descript…

Configuring SSRS Report Subscription using a Remote SMTP Server...

In one of my previous post, I mentioned how to Configure SSRS Report Subscription using Gmail as the SMTP Server.
But in some situations we may need to configure it using Remote SMTP Server. It is bit easier than the previous one.
Open the Reporting Services Configuration Manager and connect to the reporting service instance. Then go to the E-mail Settings. In that provide the appropriate Sender Address and SMTP Server values.
That is it.
If you check the rsreportserver.config file, you can see that the sender address and smtp server values are in the file. Also you can see that the SendUsing value is set to 2, indicating that the smtp server is a remote server.

Filtering Dimension Members having the same name in a MDX Query...

Sometimes different dimension members having different key values may have the same name. This kind of situations mainly occurs when we set a default value to those unknown dimension member values. As an example if we set the value as "Unknown" for the items in the sales records, which do not match our existing items, then the key value for those items in the cube will be different but the name value will be same.

But if we try to filter those "Unknown" member values using the query designer, it will only filter the selected members. Otherwise we have to select all the members having the name value as Unknown, to filter those. But if there are large number of members having the same name, then it will be difficult and not feasible to select all those.

We can filter those in the MDX query using INSTR function. The query will looks as below.

1:SELECT NON EMPTY { [Measures].[Sales] } ON COLUMNS, NON EMPTY { ( 2: [Items—Items_Vendor_Item].[Item Name].ALLMEMBERS ) …

SSRS table border double is not working...

I wanted to add double line for the bottom of the each row in a SSRS table. But when I set the Border Style for the Bottom of the Row as Double and preview the report, I was unable to see the double line at the bottom of any row.

Actually the reason was even though it was applied, it was not visible. To fix it just change the Border Style for the Top to None while keeping the Border Style for the Bottom as Double. Then increase the Border Width for the Bottom as 2pt. Then try to preview the report. I was able to get the double line by setting the border width as 2pt.
But if still you are not getting it, try to increase the border width for the bottom as 2.5pt or 3pt. Then you should be able to see the double line at the bottom of each row.

How to make SSRS Indicator as fix size...

If you just add the Indicator in SSRS 2008 R2 or 2010 to a cell in a table and try to preview the report, you will see that the Indicator will be stretched if the row has multiline records.

To fix this what you have to do is just add a Rectangle to the cell and after that add the Indicator.
Then try to preview the report and you will see that even though the row has more than single line, Indicator size is fit to the height of a single line and it is not stretched.