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

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

Getting SSRS Report DataSet Field list from C#

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

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 .


View Complete Post

More Related Resource Links

Crystal report with dataset and list - please help


Hi Guys;

i'm new in reporting so thanks to be patient with me,

here is my problem, i have created a report then a report viewer,, i passed some parameters to the report it goes well.

i'm working with local data stored in List<object>, i tried to fill my dataset (data) with those local data stored in the list, i filed Cry

looking for yor help


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.

How do I stop line feeds in a Hierarchy field from a SharePoint list to prevent wrapping in a SSRS r

I'm developing a Reporting Services 2005 report that includes a Hierarchy field from a SharePoint 2007 list.  The Data Source for the report is an XML type. I would like to display the Hierarchy field on 1 line.  However, it is displaying in 2 or more lines in Visual Studio 2005. The field also wraps when rendering to Acrobat (PDF) file.  How can I get rid of the embedded line feed (I believe it's "&#xA").  I've tried using the Replace function in an expression, other functions and changed the properties, e.g., the CanGrow property.  Nothing seems to work.   Here's what I get: LAW>Administrative Law LAW>Criminal Law LAW>International Law   I'd like to see something like this (I'm able to add the "/"): LAW>Administrative Law /LAW>Criminal Law /LAW>International Law/

Pass parameter to Hidden Field in SSRS Report

Hi, I have Two Columns in a Table Say As Table1 Column1 = Text Column2= id My SSrs Report has two parameter values as Column1 and Column2. Column2 should be hidden SELECT DISTINCT COlumn1 FROM Table1. i have passed this query dataset to Column1 parameter. Now My requirement is that, when ever column1 drop is selected. the hidden field column2 should fecth the corresponding ID. this column2 has Storeprocedure which will Display the Output when View Report button is clicked Thanks, Saraswathy

Convert Xml content from a Dataset to another Dataset for SSRS report?

Hi All Does anybody know how to convert xml field from SQL Query to Dataset? For example I have a table T with Fields A(VARCHAR), B(INT), & C(XML). Field C has <test><row>ROW 1</row><row>ROW 2</row></test> I make a query to get this data and call this Dataset1 Now I want the Column C content to be converted into a dataset  call it Dataset2 so that I can drag and drop tables from there to make my reports. Is it possible to do it without using webservice?Another limitation I have, I should not have to connect to DB again, so this boils down to use the already data contained in Dataset1. I was trying to somehow embed this XML content in the query at runtime dynamically? I am currently looking for a way to use the Dataset1 as the datasource and and parse the XML content of Dataset1 to Dataset2. Also, is it that XML content needs to hardcoded in the query, can't we do it dynamically and run the query?

How to use .XSD file as DataSet to create SSRS report?



I am  planning to create a SSRS report and lunch it in a ASP.NET web application (not using report server). Since the dataset need to be manipulated before used to generate report (some data fields of tables need to be filled  using data got from other system using COM+ components) , I hope I can use a .XSD file as the DataSet to create SSRS report and bind data source dynamically in code. It is not a problem using Crystal Report, but I have no idea how to do it either in Report Designer or in VS 2005. Please advise





List of Month and Year in SSRS report parameter?

Hi, I have two parameters in my SSRS Report i.e. Month and Year. I want to show the list of all Months in dropdown and years for a particular range say 1995-Current Year.
Can any one suggest me the query for how to get it to work.
Thanks!! MCP

Rdl Report's Parameter DataSet Using SSRS




I have to design a Page Similar to Report Server's Viewer Page where if any Parameter is multivalued and if any Stored Procedure/Query Name is specified in the Report, then a it is internally executed and checkbox dropdown list is displayed to select the values.

Similar to that I have to design an aspx page with the similar behaviour. How to get Stored Procedure Name(if Specified/Query) of any Parameter of a report? So that I can bind my Checkbox list on the aspx page.


Please Help!


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??

Urgent!!!How can we sort the parameter list in report created using report model in ssrs 2008 r2?


How can we sort the parameter list in report created using report model in ssrs 2008 r2? Do I need to change some property in Model or elsewhere?


how to execute all the dataset in SSRS report in parallel.


hi All,

I have created report in SSRS R2 ,in which ihave used 7 dataset.

Individually each dataset took 10 sec to execute and hence when i ran the report ,report took 70 sec to execute,it gives a sense that each dataset execute in sequence ,though i want to execute the all the dataset in parallel so that it took only 10 sec to execute the report.


kindly Suggest


how to add report parameters to filter list data in a ssrs report for a SharePoint List



i am using SQl Server 2005 reporting services to generate reports from MOSS 2007 Lists.

I need to define a parameter in the report to filter the data repective to that parameter dynamically.

like: in moss list there are three fileds A, B and C and i want to define field A as the report parameter, whenever i select the value of field A then on "View report" value of field B and C pertaining to field A should be display in report.

I am able to add report parameters but not able to attach to the report so that filtering can work.

Please guide me with solution

Image not displaying in SSRS Report from moss 2007 list


Hi, I am generating SSRS report for one of sharepoint list, In this list one filed is picture type for KPI Indicators. After generating report i added picture field by using the below procedure:



Then it is displaying an image holder with RED CROSS image in it.

I tried a lot of things but not able to rectify this as Images for my report is mendatory.


Querying a SharePoint List: Creating a Report Parameter based on a SharePoint List field

I have been struggling with this problem over a week now and am at my wits end.   I have created a RS(2005) report and am currently querying data from a SharePoint List.  If anybody is interested in seeing how I set it up I follow this simply walk through on Code Project.  http://www.codeproject.com/KB/reporting-services/ReportFromSharePoint.aspx.  

I need to create a custom report parameter and reference a field that I have created in my SharePoint list.   When I run the report I would like to 'Filter' the result set with the value selected in the report parameter field.  I have looked anywhere and everywhere and don't know if I am over complicating this problem but I have yet to find a solution. 

Please and Thank you
Software Engineer

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

Include a Crystal Report in .NET Web Service for Dynamic In-Memory-Only DataSet



I would like to use Crystal Reports in a .NET web service.  Ultimately I would like to convert my report document to a PDF and then return the PDF as a byte array. 

My .NET DataSet is generated dynamically at run-time.  It consists of four related tables.  Since my DataSet does not have a physical datasource, I created an XML Schema file.  I then added the XML Schema file to the web service project with Add Existing Item. 

A solution for working with a dynamic in-memory DataSet exists for ASP.NET web sites and client-based forms.  I tried to use this method as it is published.  When that didn't work I tried creating the report and XML Schema directly in the web service project, but that also didn't work.


The problem is apparent when you try to set the datasource.......the code bombs on the call to SetDataSource(DataSet) with the message
ex = {"The data source object is invalid."}

Crystal Reports would save me a lot

FormView Text Field Being Set by A Drop Down List


Hello, I have a FormView which is used to insert a record into a database.  Outside of this formview i have a drop down list, I want to grab the value from that drop down list and set one of the text fields within the formview to it's currently selected value.  I've tried the following code, but the dynamic categorytextbox line is what seems to not be working.

                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
DataSourceID="SqlDataSourceCategory" DataTextField="CategoryName"
DataValueField="CategoryID" Width="200px">

                            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
Text='<%# Bind("CategoryID") %>' Visible="False" />

        protected void FormView1_DataBound(object sender, EventArgs e)
dynamic varCategory = ddlCategory.SelectedValue;
dynamic categoryTextBox = FormView1.FindControl("CategoryIDText
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