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


Top 5 Contributors of the Month
satyapriyanayak
Post New Web Links

displaying row data in a vertical column format

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

The results of my query display the output in rows.  Each row of data belongs to an entity and contains about 12 fields.  I would like to generate a report that lists the entity and its corresponding data below it, in a column format. 

Instead of:

companyname1  contact1 phone1  email1 address1

companyname2  contact2 phone2  email2 address2

companyname(n) contact(n) phone(n) email(n) address(n)

I would like to have the info reported as follows:

companyname1

contact1

phone1

email1

address1

 

companyname2

contact2

phone2

email2

address2

 

How do I do this?  If I can get the query data displayed this way, I can export it to another program to do the last of the formatting.  I also have tried using Microsoft SQL Server Report Builder with the table/matrix format and with the list option.  The list option sort of works, but doesn't look very good.  Any ideas?

 

 

 




View Complete Post


More Related Resource Links

Managed metadata column not displaying data

  

Hi

We are in process of rolling out our new intranet on SharePoint. Two days away from the launch we have run into a strange problem. We have various custom content types and within that we have custom columns which are managed metadata. The columns are then exposed in various document libraries and users choose appropriate metadata when adding the documents to the library. Everything was working fine, until yesterday all of a sudden we were not able to see any data in the columns which were managed metadata columns. But if we edit the properties of the document we can see the field is populated.

Another strange thing is that if the user has full permission in central admin they can see the metadata in the columns, but anyone else (including site owners) cannot.

Can anyone please shed some light on this and if someone knows how to resolve this?

Regards

Gaurav


Displaying column data from another source?

  

 I have a gridview databound to a database table, and i want to make a gridview column display data that is accessed using the primary key data from the databound source to address a table which is not the one databound - how would I do this please?


How to Format Data inside a Bound Column of Gridview?

  

Hello,

I have a bound column.

<asp:BoundField DataField="WorkPreference"  HeaderText="WorkPreference"
                    HeaderStyle-HorizontalAlign="Left">
                    <HeaderStyle HorizontalAlign="Left" />
  </asp:BoundField>

dr["WorkPreference"] = sa.WorkPreference ( This is how I bind the data  to a DataRow)


The example of the data which gets bound to this column is like the following:

Communications and Marketing Officers; Environmental Assessors; Geologists and Geosciences; Geospatial/Spatial Information Officers;

What I want is that the data should be presented to the user like the following:

Communications and Marketing Officers

Environmental Assessors

Geologists and Geosciences

Geospatial/Spatial Information Officers


In short: I basicaly want to put a break where there is a colon and then bind the data to the gridview.

It looks like simple but if you can let me know. Thanks.





displaying data together to a printable format

  

hi,

I have a page with a datalist on it.

The datalist shows numerous rows with various data in each column, each showin in a textbox.

I'd like the user to be able to select or not select each row (displayed in datalist), and then to click a button which would place all of the data in selected rows into one big label so that it can be printed or emailed.

Can anyone suggest a way to do this?

Thanks!


Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

  
Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!

Displaying Data using ASP.NET 2.0 Repeater and C#

  
This tutorial will show you how to display data using the .NET Repeater Control, ASP.NET 2.0 and C#.NET


The Repeater control is a powerful tool and is easy to use.

First, you will need to import the System.Data.SqlClient namespace.

Rendering data with HTML tags in the DD Gridview for a selected column

  

I am having trouble finding out where and how to HTML Encode a cell's data on the Dynamic Data (v4.0) gridview of List.aspx.  As a simple case, suppose I have formatted cell data that is A<br/>B in the DB.    Obviously, I want A stacked on B in the cell.

It seems gridView1.HtmlEncode = true has gone away.

So maybe I'll try to catch it on the RowDataBound event:

protected void GridView1_RowDataBound(Object sender, GridViewRowEventArgs e)

        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                // Html Encode the cells
            }

        }

but this event never fires?


Has anyone figured out how to properly render HTML tags data in the List.aspx's GridView1? 

If I figure this out, then I can add a MetaAttribute called something like [EncodeAsHtml(true)] and be on my way.  Thanks!


Data Points: Column Expressions, DataRelations, and Computations

  

This month John Papa fields some of his favorite questions regarding data manipulation with ADO.NET.

John Papa

MSDN Magazine January 2007


split one data column into many?

  

Hi, I've a database table contains survey questions and answers. But the problem is both 'question' and 'answer' are saved in the same column(like below).

SubmissionDate                                                          Submission

2010-02-15 14:53:59.657                     ***What's your pet's name?***  Lili ***Tell us about yourself*** I'm a teacher

2010-02-15 14:53:59.657                     ***What's your pet's name?***  Lucy ***Tell us about yourself*** I'm a five star cook


I'd like to use a simple datagrid to display the survey result, but I need to separate the submission column into multiple columns ('question' as column name, 'answer' as data)

the number of questions or questions being asked are different for each survey so they are not fixed. 

Is it even possible to get something like this below in a gridview? 

SubmissionDate                                    

Business Data Column cascade

  

Good afternoon, I would like to know if is possible to have two business data columns linked to each other. This is the scenario that I want:

BD Column 1 called State with all US states

BD Column 2 called City with all the cities based on the state selected on BD Column 1


Use BDC data in list as multi-select column

  
I have a document library that uses values from another system for its metadata.  Right now, we copy the values from the primary system into SharePoint so users can choose them.  I want to find a way to use the BDC connection that I have set up to automatically pull those values.  The problem is that the current metadata is set to multi-select.  So, I have a file that is in the library and it can be used for multiple clients - clients is a column in my library and users can select many entries.  When I set up a column to pull BDC data, it only allows single entry.  Does anyone have any ideas?

BDC Entity as a Data Source for a Lookup column

  
Is it possible to create a custom lookup field type to have a BDC entity as the data source?

Sharepoint list group by column data ,display in webcontrol like panel or label

  

I  have a sharepoint list[Managers] with groupby sector column. like below

1)Sector1
a)Dep1
b)Dep2

2)Sector2
a)Dep3

3)Sector3
a)Dep4
b)Dep4
c)Dep4

Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?

REgards
mansoor

 


Regards, Mansoor

DVWP not displaying a column as per the original list

  

I have a data view web part which displays a list column that allows multiple items to be selected from another list.  So in this column (in the actual list), the content in a particular cell is as follows:

6698; 1211; 3342; 1231; 1231

However, when I insert this field into the DVWP, the content above ends up losing all the spaces and so looks like this:

6698;1211;3342;1231;1231

I am not sure why this is happening, and plus some of the entries in this column are made up of a very long string of numbers.  Even if I control the width of the column, this long list only ever gets displayed on one line (i.e. width restriction is ignored), therefore my page is being displayed very wide.  I think this is happening because of the lack of spaces in the string, but am not sure.

Does anyone know what is going on here?

Thanks for taking time to read.
Nirav


Categories: 
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