.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

SSRS2008 Sort columns by row Subtotals

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :Sql Server
Hi! Have problem with sort some data report. Use Tablix in report, where have Total, Month, Subtotal, Week, Day as ROWS and City as COLUMN. In data cell there is SaleAmount. So in Subtotal and Total there is SUM(SaleAmount) for every City - properly view because of grouping. I'm wondering how to make parameter for sorting data in this report, where have to choose 1.Sort WeekSale 2.Sort MonthSale greets Tomek

View Complete Post

More Related Resource Links

Sort WPF Datagrid using multiple columns



Is it possible to sort a WPF datagrid using more than one column ?



Sort Display Columns



I want to be able to sort the display columns in the insert/edit screen in Dynamic Data.  I'm using VS 2010.

I have a the following structure:

Table:  Mentor


Column:  PersonId references Person Table(LastName, FirstName, MiddleName)

Column: AddressId references Address Table(Street, City, State, ZipCode)


I'm trying to insert a mentor and the mentor screen shows up with Address first then Person.  How can I code it with Person data showing first?

Here's the Mentor.cs:

    public partial class Mentor
        partial void OnValidate(ChangeAction changeAction)



    public partial class MentorMetaData
        [Display(Order = 0, GroupName = "Personal Information")]
        [UIHint("Person", null, "persontype", "P")]

How to sort the lookup columns in edit mode?




I have a custom list "A" which has a lookup field from another custom list "B".

In the edit mode of "A", the items' order in the little pickup window is by alphabetically ascending order of that field from
"B". No matter how I change the default view's order in "B", I cannot let the field to be ordered by ID in "A"'s edit mode.


Is there any way to do that?




How can I use ORDER BY by passing different columns and sort orders?


Hi all

Here is what I am trying to do:

declare @dateBegin as datetime, @dateEnd as datetime
declare @column as varchar(30), @order as varchar(4)
set @dateBegin = null
set @dateEnd  = null
set @column  = 'created'
set @order   = 'DESC'

	(@dateBegin is null or startTime >= @dateBegin) and (@dateEnd is null or endTime <= @dateEnd)

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

add columns with textboxes in gridview using C#

'm working on a shopping cart in a website and I have my items(which have been added to the cart) in an arraylist. And using these values I've read the rest of the values from the db and and have populated on the gridview successfully.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Sorting GridView Columns Manually

We all know that GridView columns can be sorted automatically when SQLDataSource is being used. But what if you are not using SqlDataSource to populate the GridView. Sorting the GridView manually is pretty straight forward task take a look at the code below

How to sort GridView?

In this article I will discuss how to sort columns in grid and more. At the end it will help answer some very frequently asked questions like following

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


How to let user edit selected gridview columns, not entire row



I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?


Sort by gridview SortExpression parameter via Stored Procedure


I have a gridview that calls data via a stored procedure.  I am unable to enable the gridview columns to be sortable. I need to set the parameter in the Stored Procedure, can someone help me with this?

Here is my gridview:

<asp:GridView ID="AllUsersGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="UserName"
                        GridLines="Vertical" Width="900px" DataSourceID="SqlDataSource1" AllowSorting="True"
                        SelectedRowStyle-Height="30px" CellPadding="4" BackColor="White">
                            <asp:TemplateField HeaderText="Full Name" SortExpression="lastname">
                                    <asp:Label ID="DisplayName" runat="server" Text='<%# Eval("firstname").ToString() & " " & Eval("lastname").ToString() %>' />
                            <asp:BoundField HeaderText="User Name" DataField="UserName" />

How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

Filter search over multiple text columns


Hi everyone,

I'm working on a library that stores information on various cases. The case table has several columns that contain descriptive strings on what happened in the case. I would like to create a single filter that returns all cases where the search string is found in any of the columns. I've looked at Dynamic Data Filtering, but as far as I can tell, the "Contains" filter only allows you to connect to each column individually. Has anyone tried this?



Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

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