.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

Sum Issue in Group Footer and report Footer

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

In attached SSRS 2005 report i am grouping by date and within date i'm showing acconuts.
In group footer i'm trying to do sum depends on TYPE field.
For Receipt Column
=IIf((Fields!Type1.Value= "R"),Sum(Fields!Amount.Value),"")
For Disbursement Column
=IIf((Fields!Type1.Value= "D"),Sum(Fields!Amount.Value),"")

But report is putting sum either in RECEIPT or in DISBURSEMENT column depends on whatever record is 1st.

For Receipt Column in report footer
=IIf((Fields!Type1.Value="R"), Sum(Fields!Amount.Value), "$0.00")
For Disbursement Column in report footer
=IIf((Fields!Type1.Value="D"), Sum(Fields!Amount.Value), "$0.00")

Same way page footer is not showing the correct value.
Instead of $257673.61, it should have been 257673.61-9340-2875.98 = $245457.63
And Disbursement column in report footer instead of $0.00 it should be $12215.98
Any Suggestions what i'm doing wrong here.


View Complete Post

More Related Resource Links

Displaying a Parameter Value in the report footer that corresponds with the parameterized data on ea

I've got a report that has only one parameter, it determines the department (or departments) to base the report on, the parameter is set to allow for multiple values. The report returns only on page per department, so the report could be anywhere from one to a hundred pages, one page per department. I've included a text box in the report footer that displays the report name and the parameter value, the expression looks like this: =Globals!ReportName & " For Department " & Parameters!Dept.Value(0)    I know that in this example the zero inside of the parenthesis of the parameter value is what is returning the actual value when the report is rendered, and I understand that the zero is value in the array of parameter values. What I'm looking to do is adapt this expression so that the parameter value rendered on each page corresponds with the data (departement) displayed on the specific page. So using the example of the data, if the user selected three departments in the parameter drop down, then each page that displayed the different department’s information would also display that departments name in the page footer text box. I'm thinking that each time a page is rendered that there is a group or global variable that can be called to provide this dynamically but I can't seem to find the information. Appreciate any help, Dan

Adding a footer to a pre-existing row group

Hi, I want to add a group footer to my report which includes the individual provider name for each page. I have already added a parent row group for details relating to each provider without specifying to include a footer to the row group. When I now add a footer using the insert footer path this places the footer below my row grouping, when I then add the provider field to the footer every page returns the first provider in the list. How do I include the footer to the grouping so ever footer relates to the individual provider type in the main body of the report? Thanks James

SSRS 2008 group footer totals on a new page has a non-expected large cell height

SSRS 2008 group footer totals on a new page has a non-expected large cell height. When the group total is the first component on a new page, then this happens, but when it is part of the group on but not the first component, then it reverts to normal cell height. I have played with the advance settings now for hours, but cannot get this to work. Any ideas?  

Absolutely page-bottom alignment on "report footer": Impossible?


Relative newb to SSRS here, but the answer to this question evades me; answers and insight are appreciated.

Report in question is an invoice form. It requires an absolutely bottom-of-page aligned footer that has databound elements.

This is so that whatever page that footer finally appears on will print in such a way that the address will align in a windowed envelope.

Ironically, Books Online gives this exact scenario in explaining headers and footers in SSRS, but they cleverly don't explain how an absolutely bottom-of-page-aligned and data-bound footer can be made to happen. Headers at absolute page top is obviously no problem. Footers at page bottom, not so much.

So, this is not a "page footer"--page footers are employed in the body. Also this footer is databound, so a page footer as it's known in SSRS is out the window anyway.

Most of the time this will print on a single page, but if it breaks to multiple pages, that footer needs to go all the way to the absolute bottom.

I grasp that the "report footer" for SSRS is just what appears at the end of any repeating controls that you've implemented in your body. Because SSRS uses this kind of repeating-control based idiom rather than a section-based idiom as Crystal does, this kind of (what I would consider very basic) positioning control is looking fairly impos

Reporting Services Orphaned Group footer on PDF / Print

Good afternoon

The report I have created using reporting services (VS2005) has a group header which is set to repeat on every new page, and the group footer appears only at the end of the group.

It looks fine in preview mode, and also on the screen, However; when the report is exported to PDF or printed, If the group FOOTER has is pushed onto a new page because of a pagebreak, the group HEADER is not displayed on this new page.

Is there a fix for this?  I have spent hours searching on the web, but have not found a solution.


Add total in group footer for calculation with multiplication and sum

Not sure if the topic title clarifies my problem correctly but this is what I'm trying to achieve:
I have a simple report, an overview of different projects grouped by accounts. Every project shows the revenue, the costs and the profit.
I want to have a total of all 3 colums, both in group footer as in the table footer. I know how to do a simple Sum(Fields!revenue.Value) but my calculation is a bit more complicated:


Basicly this adds up: Transportation cost (km*cost/km) + Preperation cost + Project Cost + Multiple other costs
The formula itself works perfectly.

Now when I have 3 projects with an account, I want to know the total. I've tried the following:
- =Sum(Formula)
- =Sum(km*cost/km) + Sum(Preperation cost + Sum(Project Cost) + Sum(MultipleOtherCosts)
- =Sum(ReportItems!textbox2.Value)

But either I get errors, or the total is incorrect because of the multiplication. The problem is I need to mulitplie km*cost/km first and not Sum(km)*Sum(Cost/km) because than the total is incorrect.

Is there someone who sees a solution for my problem?


Cant put report item more than 1 in 1 expression, in footer


Help, this is emergency.

been developing too much with rs. cant turn my back now. too late. but im stuck. damn.

issue is in master report contain subreport.

since i cant get subreport footer to show up in master. i find tricky way by using summary dataset in master report.
but there is one problem, i need to display function display number as words. should have 2 parameters, money, and the currency, got this from report item.
the problem is one expression cant contain more than 1 report item. and when i try in custom code, cant do that also since i cant access report item there.
i cant use parameter since I really have to access report item. the report item is field in dataset of list in master table that group accounts and display their banking account statement.
i think its stupid, why in the world i couldnt use more than 1 report item in one expression.


How to show correct info in dataview group footer



I think this is more of an xslt type question. Still learning more about it everyday. Just need some help or a guide to the right direction.

I've created a dataview that has grouping enabled. There's just 1 level grouping. I've enabled both "Show group header" and "Show group footer".

In the group header section, I manually inserted the following to get certain info

 <xsl:value-of select="@Cost" />

I've added the same thing in the group footer. The group header shows the correct info, but in the group footer, it shows the info of the next group header. So, I believe in the group footer, I need to enter the xslt to get info from the previous node/row. Just not sure how to put that as xslt. Would you be able to help?



Can I display report item from sub report in footer


I am using SSRS 2005

I have a field in a sub report that needs to be shown in the footer of the report.  Normally, I would type something like =ReportItems!fieldname.value in a textbox in the footer.  How do I reference a field in a subreport?

The subreport is necessary as it deals with pagination issues with long fields that span to multiple pages.

-Report Writer 'SSRS User'

While Exporting to CSV (XComma Delimited), Report Header and Footer will get Exported Or not


Hi All,

I have Below Report in 2005.


My Report

how to have more than one group by clause and summation of data fields as well in group by footer!


How do we have more than one group by clause in SSRS  and summation of all fields in group by footer clause !

Is it possible to have nested group by clause in SSRS and summation of reports fields in those group by footer.

thanks in advance for your response.

Group Total in Footer (SSRS)



I am using SSRS and have a group named "G_Invoice" . In the footer I need to total the group's total. I used the following lines

=Sum( Fields!InvoiceAmount.Value ,"G_Invoice") in the textbox .

I also tried

=RunningValue(Fields!InvoiceAmount.Value ,sum,"G_Invoice")

In both the cases, it shows an error


The Value expression for the textbox ‘textbox27’ has a scope parameter that is not valid for an aggregate function.  The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set.


How to achieve it?





How to Fixed GridViews Header and Footer when scrolling in asp.net?

This article is to show you how to Fix GridView''s Header and Footer in a simple code with CSS and JavaScript

Show grand total running total in GridView Footer

In many scenarios we need to display Running total as well as Grand total in GridView footer. In this post i will try to explain in an easy way that how we can display running total & Grand total in a GridView footer combindly. To explain this solution using an example here i use a sales order report. The report contains all sales order amount in a tabular way. I will use a GridView to display sales order amount and use GridView footer to display Running total & Grand total. Let we have a customer table with id and name column plus an orders table with OrderID,CustomerID,OrderDate & Amount. Now our goal is to show all customers order with amount as well as page wise running total & grand total. Note that running total is necessary when you enable paging in a GridView where as Grand total is always you can consider.

inserting from gridview footer


I have been following the tutorials from Scott Mitchell on this site.  I am trying to insert a new record from the gridview footer.  I have my BLL set up as a .cs class in the App Code folder.  When I fill in the fields and click add, nothing happens.  The page refreshes and the text boxes empty, but nothing is added to the database.  The edit and delete functions work fine.  Have I put something in the wrong spot?


I have the rowcommand and the datasource_inserting on the code page as below.

protected void Oems_RowCommand(object sender, GridViewCommandEventArgs e)
    // Insert data if the CommandName == "Insert" 
    // and the validation controls indicate valid data...
    if (e.CommandName == "Insert" && Page.IsValid)
        // TODO: Insert new record...

protected void OemsDataSource1_Inserting
(object sender, ObjectDataSourceMethodEventArgs e)
    // Programmatically reference Web controls in the inserting interface...
    TextBox txtOem = (TextBox)GridView1.FooterRow.FindControl("txtOem");
    TextBox txtOemStreet = (TextBox)GridView1.FooterRow.FindControl("txtOemStreet");
    TextBox txtOemCity = (TextBox)GridView1.FooterRow.FindControl("txtOemCity");

I like to clear the IE browser Pagesetup--> Header and footer using 1.1 Dotnet framework


Hai all,

I like to clear the IE Pagesetup--> header and footer using Asp.net 1.1 , I have tried in 2.0 Dotnet it works fine it is not working in 1.1 and its urgent too

this is the code i tried ...........

 public void IESetupFooter()
        string strKey = "Software\\Microsoft\\Internet Explorer\\PageSetup";
        bool bolWritable = true;
        string strName = "footer";

header and footer problem


Hiii Coders,

I have made all the pages of my wesite centered aligned using the following code in masterpage:

<body background="Images/bg2.gif">
    <form id="form1" runat="server">
    <table style="width:960px; margin-left:auto; margin-right:auto; background-color:White;">
my content

No doubt, it works fine ut still it shows body background from top and bottom. I don't want to show it from top and bottom. Means that website should be centered align from left and right sides only whereas should display my form/webpage fron top and bottom.

plz helpand provide some code snippet

thanx and regards 

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