Pivot result Display in Gridview(Asp.net)

Hi , I have a doubt and i am sending you the details below, what i want to display in Gridview. below i am describing the sql Table Structure.

  Original Table Structure.
  ID                Date             TimeLogged(Hrs)        UserName
  1             10/8/2012               5.50                          Bubai
  2             11/8/2012               2.30                          Bubai
  3             10/8/2012               3.30                          Bhanu
  4             11/8/2012               7.30                          Bhanu

I want result like below. User Name should be dynamic. May be lot of users. User name will come from Database table. i want to show details in Gridview(Front End).

 Date                    Bubai               Bhanu                     Total
 10/8/2012              5.30                   3                         8. 30
 11/8/2012              2.30                  7.30                       10
 Total                   8                    10.30                   18.30

Please help me to solve this issue. It’s really urgent. if you can reply early I’ll really appreciate. Thanks in advance.

Thanks and Regards Bubai Banerjee

more ▼

asked Aug 23, 2012 at 06:31 AM in Default

avatar image

0 1 1 1

Thanks for your question but this is a SQL Server forum so you may not get a very quick, or detailed, reply. Can you post what error you are getting or where you are stuck. It seems to me that the you will need some sort of tablix control like SSRS uses in cases like this but I am not an ASP.Net developer

Aug 23, 2012 at 09:32 AM Fatherjack ♦♦
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Pivot result? Don't know if this circumstance suited for a C# pivot grid control. You may take a shot.

more ▼

answered Feb 25, 2014 at 02:20 AM

xiaoyuandlg (suspended)
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Aug 23, 2012 at 06:31 AM

Seen: 1895 times

Last Updated: Feb 25, 2014 at 02:20 AM

Copyright 2018 Redgate Software. Privacy Policy