.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

Grand total problem using sum(descedant) function

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Sql Server

Hi there:

I use the sum descendant function to sum the employees that has a sale using the following MDX

Employee with sale =

,[Measures].[Employee wSales Count1]

The result is like this if I have all job category selected.

Employee Group

Employee Count

Employee with sale

View Complete Post

More Related Resource Links

calculated member grand total e subtotal problem



I have a cube where I added a  calculated member to extract the last non null value of a measure. This is the script

Create Member CurrentCube.[Measures].[Trascinamento] as


([Data Rif].[Calendario].prevmember,[Measures].[Trascinamento]),


FORMAT_STRING = "Currency", VISIBLE = 1 ,


when viewing the aggregate data in a hierarchy, calculated totals and subtotals are accurate only if all the children of a member are zero at a certain date, and if either has a value, the original total is not zero, and thus is also used in calculated member.


hierarchy |          importo       | trascinamento

100-----10|     null                  |         10000
      ----20 |     null            &nb

Grand Total problem in SSRS export to PDF



I have one report in which i have to show list of patients, department wise.. so i added one group for Department and patient belonging to respected department fall under that group.. but the requirement is each department (group) should start from new page.. till now everything works fine.. now the point is at the end of report i have to print total no. of patients (Grand total) included in all departments.. but this Grand Total is appearing one new page even if previous page completes half of the page, as i have activted "New Page After" for group property.. how to overcome this problem ?


With Regards.

Sudha Thiru

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.

EF 4: Function Import problem with Stored Procedures


I have the following SP which includes a temp table:

 DECLARE @pos int

--create table to hold parsed values
CREATE TABLE #list (val varchar

datalist printOut() function Problem

  • i m using below code..by using it i able to write asp data into word file n format it.but i m facing problen in print out..

    it show exception

    Message = "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))"

    please hav a look at below code....

  •  .................div data...................   
  •   <div id="printdiv" runat="server">   
  •     <table style="border: 5px solid #FF00FF; width:100%">   
  •     <tr>   

  • table valued function problem

    This is my table-valued function Problem is it is returning only 1 record but it is supposed to return more than one i stuck with this problem plz replyALTER function [dbo].[funcqidata](@dst int,@mth int,@yer int) returns @cqi_rpt table ( hosp_name varchar(100) NULL, bedded_strength int NULL, out_patients int NULL, in_patients int NULL, minor_surgeries int NULL, major_surgeries int NULL, deliveries int NULL, radio int NULL, lab_test int NULL, tot_part1 int NULL, waste_man int NULL, swab_test int NULL, attendence int NULL, drug int NULL, charges_thismonth int NULL, charges_lastmonth int NULL, usr_charges_marks int NULL, tot_part2 int NULL --grand_tot int NULL ) as BEGIN DECLARE @hosp_name varchar(100), @bedded_strength int, @out_patients int, @in_patients int, @minor_surgeries int, @major_surgeries int, @deliveries int, @radio int, @lab_test int, @tot_part1 int, @opd_handled int, @opd_target int, --------- supporting variables declared for calculation ----------- @ipd_handled int, @ipd_target int, @minor_handled int, @minor_target int, @major_handled int, @major_target int, @delivery_handled int, @delivery_target int, @radio_handled int, @radio_target int, @lab_handled int, @lab_target int, -------- end of declaring variables ----------------------------- @check_charges int, @waste_man int, @swab_test int,

    Excel 2003 pivot table - parent showing grand total than the sum of its children

    All, In Excel 2003, I have a product hierarchy, for simplistic sake lets say it goes A > B > C > model nbr.  I have filtered on model nbr 1.  I have the product hierarchy in my pivot table and unit cnt as the measure. Starting at level A in the hierarchy I am showing a total unit of 12000, if I drill down to B it still shows 12000, if I drill down to C it shows 100 and if I drill down to model nbr it shows me model nbr 1 with a unit cnt of 100. So my question is why are my parents not filtering the model nbr, it is taking the total for ALL records that have level A as their parent regardless of the model nbr? This does NOT happen in Excel 2007 or when I browse my cube in SSAS.

    Problem with appointment function

    I am beginner of asp.net and c#Currently i am learning on create a website with appointment feature. The website i am doing basically a dental appointment web, which show the free slot of dentist on the website and enable patient to book appointment by schedule an appointment based on time and date given. I have done others thing such as register, login, report those however i have no idea on doing the appointment module. I am trying to learn easy way to create booking feature for dental website. Is that a tutorial on learning to do this or others way which i can easily learn it. Thank you.

    Tablix - Grand Total not match up

    I'm having a problem in my grand totals when using tablix. You can notice that grand totals are not totalling up. Name Code Total  Items No of Users Total  Due % Due Total Completed % Completed Company Units # of Units Health System 00 447,041 5,163 35,422 8% 411,597 92% Test A CEU 2218.75 Test B CEU 4305.5 Test C Hours 22121 Test D ct Hours 15.8 Test E CEU 18.75 Hospitals 01 47,952 511 2,099 4% 45,853 96% Test A CEU 34.25 Test B CEU 136 Test C Hours 1823.25 Non-Health 9999 9,643 658 2,064 21% 7,579 79% Test C CEU 11.5 Test D CEU 17.75 Test E Hours 478 Trainings Test 34 9 22 65% 12 35%     0 Grand Total:    2,408,024 29,331 189,621 8% 2,218,293 92%              

    how to write a inscope function which can capture total from one cell.

      I am having a matrix  report in ssrs 2005.It is having three  column grouping and one row grouping.                           Column group 1                          Column group2                          Column_group3 Column1   PercentageColumn2  Percentage    Total(A+B)           47 63.51% 1 1.35% 74 18 24.32% 7 9.46% 1 1.35% 0 0.00% 66   8                      A               C           B                 D                E                    

    Weird query plan problem where total is over 100%

    Hi All, I am looking at the query plan for a stored procedure and I am seeing things like 1400% on the execution plan, the stored procedure I believe is called within a loop quite a lot of times, but I don’t quite understand why the percentages will be over 100 for one section of the execution plan. Any explanation for this ? Thanks in advance.

    Showing Total and grand total in rdlc

    Hi All, I have RDLC report. My Detail report is bringing the data group by the criteria selected. For example I select the criteria Age. so all data with age 11 comes up, then all data with age 12 comes up.Till here I am able to do with stored proc but now what I want is, Say there are 4 rows with age 11,  I want total at the bottom of row to show 4. Then say there are 6 rows with age 12 , At the bottom of 12 age show Total 6. Then Grand total = 10 (4+6 ). How do I achieve this. Any Idea..I want something like (This one sorted by Contact Relationship) Child's Name Age Contact Name Contact Relationship    Agency Date Received Phil Drummond 16 Paul Berryman Family Member DCF 5/22/2008 Lawrence Higgins 1 Fredrick Pleasant Family Member DPH 7/12/2008 Paul Cote 9 Kittie Hawkins Family Member DCF 7/14/2008 Devlin Harris 11 Cheri Glasser Family Member DYS 9/19/2008         Total:  4 Robert Sherman 12 Ron Smith Social Worker DYS 5/3/2008 Brian Montgomery 5 Deice Drumgold Social Worker DYS 6/30/2008 Peter Zimmerman 16 Dale Everson Social Worker DCF 8/21/2008 Sean Johnson 17 Glen Mondale Social Worker DTA 9/17/2008         Total:  4 Roger Donoghue 17 Jesse Venture Unknown DYS 6/30/2008 Kevin Draper 14 Gary Forester Unknown DYS 8/27/2008       &nbs

    Problem with IndexOf function in Java script?


    Hi all,  i have one problem while using Index Of function in java script. I am using this in this way:

    var ss=(document.getElementById('<%=HiddenField1.ClientID%>').value.indexOf(","+document.getElementById('<%=yyy.ClientID%>').value+"-"+document.getElementById(str).value,20));                       

    Problem with WCF CallBack function



    I have a problem with WCF CallBack function (DuplexChannel). The main problem is that when I invoke that method on the client I got a message format like that below:

    <ClientCallBackFunc xmlns="http://tempuri.org/ ">

    where ClientCallBackFunc is name of callback method.

    I made service:

    public interface IClientCallBack



        void ClientCallBackFunc(string IssueId, string AgreementId, string LimitId);




    public interface IService


        string ServerMethod(string IssueId, string AgreementId, string LimitId);


    but I should prefer to get like this:




    So, when I want send message from server side (callba

    TopCount dynamic named set + "Others" and "Grand Total"


    After going through all available posts, unfortunately I could not find a solution for my problem. I have to create a dynamic named set of with TopCount in a cube that will be accessed with excel 2007. This how the outcome should look like:

    Brand_A        $50.00

    Brand_Z        $40.00

    Brand_B        $10.00

    Others           $200.00

    Grand Total   $300.00


    This is the MDX I used which gives me the top 3 but not the "Others" and the "Grand Total." Just to keep it simple I used top 3 Brands.

    , DISPLAY_FOLDER = 'Sets';

    Now I am stuck here. After reviewing many posts it seems that Excel 2007 has some issues with handling sets. I found two possible solutions from Raymond-Lee which I think may work.

    Solution 1 - Use a named query in dsv

    Solution 2 - create a dummy "Others"

    Here is the post: http://social.msdn.microsoft.com/Forums/en-US/sqlanalys

    disable the sub/grand total column in calculated memebers


    Is it possible to disable the sub/grand total column in calculated memebers programmatically. I don't want to display the sub/grand totals in pivot table? I know I can manually disable the sub/ grand totals in pivot table.



    function problem



    i have the following function in my app_code which gets the data from database with datareader

    now on anothe page i need to output all of the data to a label

    i do not want to use datalist or gridview

    hwo should i do this?

    the function loops through the data ,i can put the function on the same page and use label.text += mydata

    but since it's a function and i want to use it on other pages how is it possible?

    Public Function getMembers(ByVal userID As Integer) As Boolean
                Dim Conn As New SqlConnection(HttpRuntime.Cache("con"))
                Dim dr As SqlDataReader
                Dim strSQL As String
                strSQL = "select * from test "
                Dim cmd As New SqlCommand(strSQL, Conn)
                cmd.Parameters.Add(New SqlParameter("@userID", userID))
                dr = cmd.Execute

    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