.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

How to define field source in dataset

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :
I have an MDX query that returns data fine in Query Analyzer. In BIDS, I haven't been able to figure out how to define the field source for one of the returned columns, which is a set of time periods I need to create a line chart over. The query is as follows:
WITH Member [measures].[PostClick]
					[Measures].[Post Click Apply Completes]
					+ [Measures].[Post Click Apply Starts]
					+ [Measures].[Post Click Landing Page Hits]

					MEMBER [Measures].[PostImp]
					[Measures].[Post Impression Apply Completes]
					+ [Measures].[Post Impression Apply Starts]
					+ [Measures].[Post Impression Landing Page Hits]

					MEMBER [Measures].[Total]
					[measures].[PostClick] + [Measures].[PostImp]
					SET [RptPeriods] AS
					{ STRtoMember(@ReportDate):STRtoMember(@ReportDate).Lag(4) } 


					SELECT {[measures].[PostClick], [Measures].[PostImp],[Measures].[Total]} on 0,
					, [Measures].[Fact Candidate Source Response Count]), DESC)

					 on 1
					SELECT STRTOSET(@PlacementFilter) on 0
					SELECT STRTOSET(@Industry) on 0
					SELECT STRtoMember(@ReportDate):STRtoMember(@ReportDate).Lag(4) on 0
					SELECT [Placement_Sources_Reported] on 0
					FROM [Cube])))) 

View Complete Post

More Related Resource Links

SSRS 2008 R2 Dataset Field Value Property Data Type not numeric

We're building SSRS 2008 R2 reports using SSAS as data sources.  There are several occaissions where the data types of certain dataset field values that represent cube measures are not numeric.  As such, when these fields are used in an aggregate function they throw an error.  Is there a way to remedy this in the dataset? Thanks for your help.

Is there a way to manually or programmatically set the dataset field's data type? This dataset is

Is there a way to manually or programmatically set the dataset field's data type?  The reason I am asking this question is that I am trying to sum a column of data in a report.  I noticed it is possible to sum a column of data if the datatype of a field in the .rdl file is of type <rd:TypeName>System.Int32</rd:TypeName>. Whereas it is not possible to sum a column of data in an .rdl file when the datatype of a field is <rd:TypeName>System.String</rd:TypeName> . When I create a dataset in BIDS 2008, by default, the dataset gives a field a type System.String.  I need to be able to change the field type to System.Int32 in order to sum the column. My datasource is a web service.  The results returned by the web service method has a datatype of int as follows: <xs:element name="Dollars" type="xs:int" minOccurs="0" /> So it seems the dataset created by the reporting services is giving my webservice a type of System.String. Is there some way of manually changing the type? thanks, Lloyd

A field or property with the name 'FieldName' was not found on the selected data source


I'm attempting to load a GridView dynamically on a button is pressed.

The gridview has AutoGenerateColumns="True" (set in skin definition) and has a declarative column definitions as follows:

<asp:GridView runat="server"
        SkinID="GridViewDetail" ID="gvReport"
            <asp:TemplateField HeaderText="Date">
                        <asp:LinkButton  OnClick="

Dataset field list will not refresh

Using VS 2003, my dataset field list will NOT refresh when I hit the refresh button, and the field list shows NO fields!  If I switch the dataset type to TEXT and enter EXEC <storedprocname>, I get fields in the list, but when I switch the type to Stored Procedure (so it can accept parameters), the field list goes blank, and WILL NOT refresh, even though I can RUN the dataset and see the data returned by the stored proc.  How do I get my field list back, so that my report will compile and run correctly?  Or do I have to wait for SQL Server and Reporting Services 2008 SP3??

Getting SSRS Report DataSet Field list from C#


Hi All,


1. We have requirement where users can build there own SSRS Reports and integrate it with the existing system dynamically.

2. We have an Existing Application (Called APP1), our approach is user will build the report as per there requirement and from APP1 we have report configuration screen when user will select the report file to import to our system.

3. While doing importing, we have special requirement like

3.1 Retrieve the all fields from the Report DataSource and display to the user

3.2 User configures that what values they want to filter when the report is shown from the application. ex: employee information is      displayed in the report, DataSet query is "select empid,empname,..... * from employee" 

        3.3 from APP1 when user gives the report we have to dynamically load the report and get the fields from the dataset, so user can                configure like this, when the report is shown report must ask for parameter value for empid .


A field or property with the name 'User_x0020_Name' was not found on the selected data source.


I am trying to bind the XML data to a datagrid from an XML file.  I don't know why I am getting the message: "A field or property with the name 'User_x0020_Name' was not found on the selected data source."

The "User_x0020_Name" field does exist in the XML file.  This is a portion of the XML file.

<?xml version="1.0" encoding="utf-8" ?> 
<DataSet xmlns="http://www.----------.com">
 <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
 <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
 <xs:choice minOccurs="0" maxOccurs="unbounded">
 <xs:element name="Table">
 <xs:element name="User_x0020_Name" msdata:ReadOnly="true" minOccurs="0">
 <xs:restriction base="xs:string">

Dataset has one field, populate a table 2 columns wide n rows deep



A dataset returns a single field of child names, instead of presenting this as a single column table, I would like it to be multi column.

Dataset returns:


I would like to display it as:

Child1 Child2 
Child3 Child4


Difference between typed dataset and data source controls...?


Hi all DotNeters,

I'm new to this community and got newbie question, briefly in data access in asp.net what is the difference between accessing dataset using typed Dataset and using data sources controls like SQL data source control .?

 As I noticed that using data source controls is much easier, but it allows only one data access method i.e. only one query. am I right with that..

Best regards.

InfoPath 2003 - Populate Data Field based on text field from secondary/different data source.


I have a form where the main fields are populated based on the results of a query field.
Ex, Main Data (SQL) Source: 

Fruit         Color
Apple       Red
Orange     Orange
Pear         Green
Banana     Yellow

Secondary Data Source (Sharepoint List)
Fruit         Code
Apple        1001
Orange     1002
Pear         1003
Banana     1004

What I would like to do is create form fields that will automatically populate based on the contents of the text field.
Ex,  (text field)   Please enter your fruit of choice:   [ Apple ]

(Field 2 - from main SQL data source)          The color of your fruit is [ RED ]

(Field 3 - from secondary Sharepoint List data source)  Your fruits code is  [ 1001 ]


Any suggestions would be greatly appreciated.

Define new Data Source using ASP.NET


Hello, guys!

Is it possible to define new Data Source in current Analysis Services database WITHOUT Business Intelligence Development Studio?

Because in my task i want to add new Data Sources to Analysis Services Database using ASP.NET.

Is it possible to implement it?

Refresh of a Report Builder Dataset does NOT show newly added field

I'm working with Report Builder 2.0 (we don't plan on getting SQL 2008 R2 - so NO 3.0 for us!) and have found that if I have an existing report using an existing stored procedure (it has 4 existing parameters) and I add a new field to the stored procedure it will not refresh the data set.  I have gone to the DataSet properties and executed the query(SPROC) where it does show the new field (so I know the sproc will execute), but when I click OK and hit Refresh Fields it stops responding.  I also tried the same steps without the Refresh Fields and still stops responding.  I also tried to add the field name and it errored out as invalid.

The only work around I've found is to

DataSet field missing while executing the query


Hi ... I have a dataset name distributorTotal in that there is a field name 'Current' which is Calculated field ... when i give ryt click on dataset -->query  then i executed query .. it is not showing any data and not showing field name as well..when i come out from that query designer ...field is missing under 'DistributorTotal' dataset..

now  there is no field under DistributorTotal...before i have 'current' field ...one more thing that 'Current' field doesnt have any data only null it had..that was null field actually

but i need that field to run the report.... getting tension...

please help me thank you...

Microsoft StyleCop: Source Code Analyzer for C#

StyleCop is similar in many ways to Microsoft Code Analysis (specifically FxCop), but there are some important distinctions. FxCop performs its analysis on compiled binaries, while StyleCop analyzes the source code directly. For this reason, FxCop focuses more on the design of the code, while StyleCop focuses on layout, readability and documentation. Most of that information is stripped away during the compilation process, and thus cannot be analyzed by FxCop.

Introducing ADO.NET and the Typed DataSet

In reviewing the applications it seemed everything they were doing involved database reads, writes, and manipulation. The development staff had been reviewing the articles and code samples for ADO.NET. They had spent many years refining their existing ADO based infrastructure and perfecting their use of ADO

Create and Use a Typed DataSet by Using Visual C# .NET

This article shows you how to create and use a typed DataSet in a small Web application. Typed DataSets, which inherit from the DataSet class, create first-class members of a DataSet's DataTables and DataColumns, yielding the many benefits that come with the use of strong typing.

C# and XML Source Code Documentation

Through many years of enterprise level software development and consulting, I became critically aware of the importance of good source code documentation, and several years ago when I began working with the first release of Visual Studio .NET beta 1 and found C# provided built-in support for inline XML code documentation, I was thrilled.

Get Top 1 Record from Dataset

Many of them in need of getting the Top 1 or Top 10 records from a Dataset without going to SQL query. It is possible to do from Code Behind. I have given the code below,
The below code is to get single record from a Dataset. Also I have given for getting 8 records at Green Color.
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