.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

How to get current MDX query in action expression?

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :Sql Server
I have an action that is supposed to execute an URL with the current MDX query as an parameter. Does someone have any idea how to get the current MDX query?

View Complete Post

More Related Resource Links

Syntax error (missing operator) in query expression

Good Day Gurus!

I have a Excel user application which has a user form (named 'Registo') that displays criteria and an image that has been entered in it's corresponding spreadsheet. This works the way it should.  There's also the ability to search the spreadsheet via a form (by clicking 'Pesquisar' button) this opens a search form. However, I having a bit of a problem with it. When I try to search for something it basically doesn't do anything at all. It just sits there. So I tried to debug it and I think I'm having a problem with either the JET db engine or somethign with teh query or maybe I don't have the correct reference.

I 'borrowed' this Excel application from another forum because it's exactly what I'm looking for! However, I suck at vb.

So I was hoping somebody could take a look at the code and see if I'm missing something?  I'm kinda' desparate to get this working because I'm been trying to figure it out for days and I'm running out of time.  Cry
Option Explicit

'constantes para auxiliar na verificação do código
Private Const Ascendente As Byte = 0

Expression for Query.CommandText

Hi, I have an extensive query.commandtext in a report that access a SQL Server 2000 server and I'm getting this error message: "FORMULA ERROR: CANNOT CONVERT SET TO TUPLE - IN THE {...} FUNCTION". Any help will be very appreciated. This is the command: = " WITH MEMBER [Data].[Fiscal Year].[All Data].[Atual] As ' [Data].[Fiscal Year].[Ms].[ " & Parameters!MES.Label & "] ' SET [Medida] AS ' { [Measures].[Previso], [Measures].[Total Carteira], [Measures].[Faturado], [Measures].[vlICMI], [Measures].[vlFaturado], [Measures].[NIV Target], [Measures].[NIV Carteira], [Measures].[NIV Faturado], [Measures].[PPR Pedido %], [Measures].[PPR Faturado %], [Measures].[PPR Pedido], [Measures].[PPR Faturado], [Measures].[TPR Pedido], [Measures].[TPR Faturado],   [Measures].[Agreement on Invoice], [Measures].[Agreement on Invoice NF], [Measures].[NSV Estimado] } ' MEMBER [Produtos].[Linha].[Linha].[Caf].[Pilo Vero] As ' Aggregate({ [Produtos].[Linha].[Produto].[001250 - CAFE PILAO SABOR DE VERAO ALMOFA 10X500G], [Produtos].[Linha].[Produto].[001251 - CAFE PILAO SABOR DE VERAO ALMOFA 20X250G], [Produtos].[Linha].[Produto].[001285 - CAFE PILAO SABOR DE VERAO VACUO 20X500G], [Produtos].[Linha].[Produto].[001286 - CAFE PILAO SABOR DE VERAO VACUO 20X250G], [Produtos].[Linha].[Produto].[001290 - CAFE PILAO SABOR DE VERAO ALMOF 90X40 G] }) ' M

Excecution of wait for field change in current item action

Hi everybody, I've an SharePoint designer WorkFlow with two simple actions: wait for field change in current item (wait for the aproval status was approved) update item list(set a value to a field in the current item) how immediate is the execution of an workflow like this by the WF Runtime engine?, how it works? would be possible that WF runtime engine take time to execute this tasks, how much is waranteed acording the WF architecture? The Previous question becouse this solution is composed by an smart document and a workflow: -A workflow that have to copy the aproval status  to a field when this was aproved. -The document have to detect the change on the field value(seted by the workflow) when the document is closed by the user(this action could be executed just after the user approve). In conclusion the document depends from the workflow execution to detect the change, if the workflow were not executed "immediately" document actions would not be executed when the document were closed. by the above I need to know how reliable is this workaround and make a choice, this workaround or an event handler controling the itemupdating event(synchronous event) to do the tasks made by the workflow. Suggestions are welcome! PD and Background: The smart document(with managed code) is the template associated to the content type in a document library. The Current

How to get current user in an action of a workflow (without .NET coding) in SharePoint Designer


Does somebody know how to get current user (logon user) in an action of a workflow definition from the Sharepoint Designer 2007. I know how to do it by using .NET coding, but it requires to upload a dll to the bin directory of the application which is not an option due to my company Sharepoint policies.

webdav xmlhttprequest to query current users exchange mailbox items


I would like to use xmlhttp request to display the current users unread email count in a webpart.  I can get this to work if the user enters their username & pw, but I'm not able to get any pass-thru credentials to work.  How can we set this up to pass through the current user's credentials.  We tried to set the sharepoint wfe with kerberos trusted delegation, but this doesn't seem to work.

We do not want to create an account with full access to all private mailboxes.

SPView query to find if the current user belongs to a Group


HI All,

I´m trying to write a query for a list view that should return all items if the current user belong to a group. If the user doesn´t belongs to this group, no items should be returned.

So far, I could find many equal examples about using the CAML Membership element in a comparison with an AssignetTo field. But not making a comparison between the current user and a specific Sharepoint Group.

Any suggestions, please?


Using Now() to get the current date in a MDX expression




Could anyone please let me know how I could use the VBA function Now() to get the current time and assign it to the (year-month) hierarchy?

I need this for a report which retrieves amount collected in the past 24 months from the current date.

I have read that I could use the VBA functions but I am not sure how to assign it to the time dimension hierarchy and then use the LASTPERIODS function to get the past 24 months of data.


Any help would be greatly appreciated.



How to query private Tags of Current User?


Hello. I need to query current logged user private tags.

I want to show a links.


I'm using the following code:


using (SPSite site = new SPSite(@"http://dev2:27397/"))
        using (SPWeb web = site.OpenWeb())
          SPServiceContext serviceContext = SPServiceContext.GetContext(site);
          SocialTagManager tagManager = new SocialTagManager(serviceContext);
          UserProfileManager userManager = new UserProfileManager(serviceContext, true);
          SPUser user = web.CurrentUser;
          UserProfile userProfile = userManager.GetUserProfile(user.LoginName);

          var allTags = tagManager.GetTags(new Uri("http://dev2:27397/Lists/TaskList/..."));
          var onlyOpenTags = tagManager.GetTags(userProfile);                   


Here I can get private tags for specific url and public for user.


But how to get private and public tags for current User?



Calculate database query value by using Math expression ?


I'm currently develop a monitoring and evaluation database with many indicators

For example: I have two input  indicator :  car , truck

Input_IndicatorID        quantity

Car                               3

Truck                            2

I'd like to create an output indicator have field: formular. The result of vehicle = car + truck = 5

Output_indicatorID      formular

Vehicle                         Car + truck

I don't now how to parse this string, detect parameter: car, truck  to get the answer

I search on Google and find some Math parse like:  muParser, bcnet  but it just for a string


Please help me solve this

Content Query WebPart shows page items with status "draft", and page items that current user does no



I have this issue that CQWP is rendring items that it should not render. I test this with a read-only user, that should NOT see draft pages or pages with different permissions. But the read-only user do see the items, but when I click on the link I get access denied. This access denied is correct, but why does the page items appear in the CQWP at all?


1) I use OOTB CQWP (inherits from ContentByQueryWebPart in my .webpart file) : "<type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart ....." and I have my custom xsl to get the look and feel I need

2) The issue with page items showing when status = drafts only appear when using the PublishingExpirationDate field. When I try creating new pages and give them status draft by using "check in to share draft" (logged on as an contributer/approver user), this item wil NOT appear in the CQWP for the read-only user. When I change a pages' status from approved to draft, this item will still be shown in the CQWP, but this will point correctly to the published version. But after the pages' expired date (PublishingExpirationDate) is expired, the page gets status "draft" (handeled by a timer job I guess), and this page item will still be rendered in the CQWP, but sending the read-only user to an access-

MDX query for current


Hello guys,


I am currently browsing a cube with MDX using this query

select [Measures].[LOAN] on columns,[Dim Period].[PERIOD].[PERIOD KEY].&[201001] on rows from skyebank_financial_cube

The above query hardcode the year and the month from the Period dimension, however is there a way I can modify the query to dynamically find the current year month and year in the cube.


Thank you

Showing Null value in a string expression to show fullName in T-SQL query



I have a SQL query which calculates the full name from firstname, middlename and lastname. When any of the column contains a null value the calculated value shows null.


FirstName + ' ' + MiddleName + ' '+ LastName as FullName

from <table name>

FirstName : Ruben

MiddleNAme : Null

LastName : Torres

FullName : Null

Why it does not leave the null column and have the string concatanated as :

Ruben Torres




How to get connection id for action expression


I need to retrieve current connection Id from the cube. I need to do this in 'Action expression' field at Action definition. ConnectionID will be later used for searching proper entries in sql server traces.

How can I get this?

How to tell if current action is asynchronous?


I'm writing a global action filter and would like to determine if the currect action is asynchronous.  However the ActionExecutingContext doesn't expose any properties for me to make this determination.  I can get a handle on the controller if it is an AsyncController assume that the action is also asynchrous. However that doesn't guarantee that the current action is asynchronous since you can have a synchrouns action in a AsyncController.

We have a distributed team, so there is the potential for a filter to invoke a service asynchronously on a synchonous action.  This particular filter needs to access the session store, which is unavailable in this scenario.

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend