Tuesday, April 17, 2012

How to get Member Properties in MDX

Normally  MDX queries are returning caption for reports when we are using data in SSRS. But  we need other information such as UniqueNumber and other when passing as parameters to other reports and datasets.

Below shows example query used for get the member properties. (We can declare it using WITH MEMBER). DayKey is the custom column we are creating

with member DayKey as [Date].[Date].currentmember.uniquename


} ON ROWS FROM [RetailigenceBI]

Tuesday, April 10, 2012

Month Sorting Issue in SQL Server Reporting Services (SSRS)

This error Occurred to me while I design the query in the Query Builder and generate the report in SSRS ( MDX). Months are showing alphabetical order (April , August,..) , but it should be January , February ..

I did some background works and even follows the the thread http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/27765eda-371d-4428-ab13-2e96b2fbb6ca.

But ultimately I  found there is a sorting adding by default to that column. I Deleted it ..

Bingo .. It worked .. 


Monday, April 2, 2012

Cross-thread operation not valid: Control xxx accessed from a thread other than the thread it was created on.

This error is occurring when  you are going to access the UI with another thread. There are method you can use to over come this situation.

The best approach is to use method Invoker to update the UI when it is required.

if (txtDataRx.InvokeRequired)
new MethodInvoker(delegate { txtDataRx.Text = txtDataRx.Text + szData; }));
txtDataRx.Text = txtDataRx.Text + szData;

user profile synchronization service not starting in SharePoint 2010

I had a difficult time to get user profile service synchronization started. Following are the errors encountered to me when I tried to start the synchronization manually as well as through SharePoint.

Errors Encountered

  • Windows could not start the forefront identity manager synchronization services on local computer
  • The system cannot find the file specified. …
  • Windows could not start the forefront identity manager synchronization services on local computer
  • You account is not a member if a required security group (came from Forefront Identity Manager)
  • The Forefront Identity Manager Service cannot connect to the SQL Database Server.
  • Windows Could not start the Forefront Identity Manager Synchronization Service on local. for more info review the system event log. If this is a non Microsoft service contact the vendor and refer the specific error code 2145185792.


These are things we need to consider to make it work.

  • First make sure you don’t give fully qualified name for the database in the SharePoint Product Configuration Wizard.

(giving the database name with domain postfix (fully qualified name) cause to connection issues in User profile synchronization service )


  • Add the User profile Synchronization user to Farm Administration Group.


  • Make sure the User profile Synchronization user in the Local Administrator Group.



  • Delegate the User profile Synchronization user to have Active directory access.

(How to add user profile service user to active directory delegation)

Go to the Active Directory User and Computer console.


Then Specify the user who want to access the Active Directory (this is use for synchronization).


Then Select Custom task to delegate.


Then delegate for folders and existing objects.


Then delegate active directory replication with general permissions.


  • Then add the user for Active Directory Configuration.

For that go to run window and type adsiedit.msc


Then Go to properties and add the User profile Synchronization user to the configuration.


Then make sure that user is having Replicate Directory Changes permission.


  • And check whether you can start the two synchronization services manually by giving specified username and password. This will help you to identify any other errors related to the synchronization services (Forefront Identity Manager Service,Forefront Identity Manager Service Synchronization ).


First check whether you can start the services using specified username and password.


  • Check the User Profile Service User has relevant permission in the  user profile services. If not add it.


Then add the full control for the user.


Other References