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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Dynamic MDX field

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server

Hi guys

I have an MDX query which returns a different field based on the parameter a user selected, i.e. if parameter A is selected, return field A. If parameter B is selected, return field B.

I would now like to use this dynamic field in a report, but since the field is only returned at runtime there doesn't seem to be a way to add it in design time to the report. I tried using a calculated field to do this, but how does one reference such a field if it is not in the Fields collection?

Any ideas?



Louis Young

View Complete Post

More Related Resource Links

dynamic 'Today field' in sharepoint


how to do i get a dynamic 'Today field' in sharepoint?

I found many examples such as this which is completely wrong.  In the example below the [Today] is only calculated on item creation and edit, not every time list item is accessed.
http://blogs.msdn.com/b/sharepointdesigner/archive/2008/08/01/date-functions-in-calculated-fields.aspx .

This is very important my customer wants it done asap.


Thank you.



nothing for members to see

Dynamic query for Null field checking

Hi I want dynamiclly find the table to null values finding.. Please give me quickly   Regards Ram

Dynamic query for datalength field checking

Hi   Please tell me the dynamic query length in table

Dynamic query for Null field checking

Hi I want dynamically check the data Formation query in SQL server please  provide me the query

Set up a validator that compare the value of the current field with an other (using Dynamic Data)

Hi! Most of it is in the title : I'd like have a validator on the DateTime_Edit template for example that allows to compare this field with an other DateTime field. My problem is when I am in the DateTime_Edit template of my "master field" (the one I want to check), how can I access to the other field given the architecture of Dynamic Data FieldTemplates? But perhaps I'm not thinking in a good way on this control. Any advice will be welcome. Thanks Raphaelp

how to read a custom dynamic data meta data attribute in a field template

All --Please help.I need to know how to read a custom dynamic data meta data attribute in a field template.I know how to do it in a page template because I have a handle to the meta table on the page.However, I do not know how to get a handle to the meta column at run time in a field template.Can you help?Please advise.Thank you.-- Mark Kamoski

ASP.Net Dynamic Data - DropDownList Field Template with AJAX Cascading DropDown Extension

Hi all,   Have spent hours trying to create a Dynamic Data Field Template holding a DropDownList which is extended by the AJAX Cascading DropDown extension. Final form holds multiple cascading dropdown boxes. User selects Country (Land) then Postcodes, Counties (Provincie) are populated. Once postcode is selected then towns (Plaats) are populated.  The problem I am now facing is that the viewstate for the dropdown lists is not being saved/restored after an insert action or custom validation error. So basically the dropdown lists are being reset to their default values. Some code (if missing parts, just ask and I will post them) - Don't mind the code structures etc... needs some refactoring :) Attribute I created:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Data { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] sealed public class CascadingDropDownParametersAttribute : Attribute { //public string TargetControlID; // The ID of the DropDownList to populate. public string Category; // The name of the category this DropDownList represents. public string PromptText; // Optional text to display before the user has selected a value from the DropDownList. public string

Dynamic Fill-in Field

I have a field that is a "Choice" field in which I have put in several names. The name of this field is Candidate 1. I have another field called Candidate Facility 1 in which I made this one a Person / Group field that the user can select a user from our network.Is there a way that I can have that second field "Candidate Facility 1" automatically fill in based on the selection on the first field, "Candidate 1"?Thanks,ChrisChris A

dynamic field in infopath 2010



I want to use dynamic field in info path 2010. Imagine for example i have textbox  that user can input desire data.depent on this textbox i want to create dynamic field.

user input below data:

How many books do you need?   3

then i want had been created this table:(I mean this table had been created with 3 row that user input this value, and user can fill ID,Name,Author & Year)

ID     Name        Author      Year

1        book1     Author1     2005

2        book2     Author2     2009

3        book3    Author3      2010

 Anybody can help me?!

thanx alot.

dynamic template field order


I have the following example with adds a dynamic template field to my gridview.  However its being added at index = 0.

I need it at the end of the gridview, which has columns determined by user entry, so they will not always be the same amount of columns.

How do I get this template field to be the last column in my gridview.  I have already tried    columns.Insert(index, mycolname) and I get an "out of range" error message


  Protected Sub rtrv_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtrv.Click
        Dim bldvw As base, ds As DataTable, dc As DataColumn
 bldvw = New base

        ds = bldvw.bldDynGrd(srCtr.Text, srActiv.Text, srAcct.Text)

        If ds IsNot DBNull.Value Then
            For Each dc In ds.Columns
                Dim bField As New BoundField
                'Initalize the DataField value.

display only the date (not time) from a sqlserver date field in dynamic data


I have some Date fields defined in my sqlserver database but these display with a time part as well (00:00:00).

how do i esnure that only the date part is displayed and not this redundant time?


create a dynamic field in the master page (site.Master)




I'm starting with ASP.NET MVC (1.0). I have a problem to resolve.

I have developed a web applicaton (an application of articles like e-commerce) with a head (logo and menu). I have defined the head (logo and menu) in the Master page (site.master). Now, I must display the number of articles in the head in a field (like the number of articles in the virtual basket in the e-commerce).

I can read the number of articles in the data base (in the controller), but i can't integrate it in the master page.


Please help ?   

Dynamic Data Field template edits - Tooltip text, Dynamic Data Page template edits - field sort


I have an ASP.net website build in VB 2010 web dev pro using 4.0 framework.  Its a dynamic data site and I am having some trouble formating some of the field and page canned templates.

Q1: Field Templates - the tooltip code (TextBox1.ToolTip = Column.Description) is within the ascx.vp pages for each of the field templates.  Where can I update each columns description (as the code references) so the tooptip will be column/field specific.  If its not as straight forward as that, I was trying to write an if/else statement because the tooltip code is set at the field type level (decimal, date, etc) and I want it to be column specific.  example;

if column.value = Financial Impact

then  TextBox1.ToolTip = "enter financial impact in whole dollars"

else TextBox1.ToolTip = "next fields tooltip text"



assign default value to dynamic data field



I have the script below and I want to apply a default value to the DynamicField StudentId (please see line in bold) below. Can anyone tell me how to do so?




        <asp:GridView ID="GridViewGuardians"  runat="server" SelectedIndex="1"
            AutoGenerateColumns="false" DataKeyNames="StudentGuardianId" DataSourceID="LinqDataSourceGuardians" ShowHeader="true" ShowFooter="True">
                   <asp:LinkButton  ID="lbInsertGuardianG" runat="server" CommandName="Insert" ValidateionGroup="addValidationGuardian" OnClick="lbInsertGuardianG_Click" >Insert</asp:LinkButton>

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Dynamic Data Templates in GridView ASP.NET 3.5

At a high level, Dynamic Data Templates can be seen as a system to very quickly build up a User Interface linked with the relevant data model, immediately enabling you to perform CRUD operations (Create, Read, Update, Delete) on the database using the specified data source. They provide a powerful method for building up these kinds of applications, and I'm going to focus on an overview of what Dynamic Data Templates actually are, and a few ways of customizing them to suit industry needs.

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.
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