none
Matrix Incorrect Total RRS feed

  • Question

  • Hi to all,
    I have the following matrix
    Dep    User    Admin
    30                  20           
    60      1          440           

    When I add a sub-total by Dep, I got

    Dep    User    Admin
    30                   20           
    60       1          440           
    Total   1          440

    Why? the total in the first column is correct, but in the second column is incorrect.
    Why?


    Thanks in advance by the help.
    Wednesday, June 20, 2007 4:01 PM

Answers

  • OK, I understand what you did, but I am not sure it is a bug.  I think you are misunderstanding what "subtotal" is going to do there, and I am not equipped to explain that <s>.  (Here is a good article to help you figure it out: http://www.databasejournal.com/features/mssql/article.php/3586081 -- you will definitely find subtotals in there)

     

     Your subtotal is basically only looking at one row because it is grouping by the same values, on a row and column basis, that is producing the single cell in the matrix.  Does that make sense? 

     

    I think what you want is an outer row grouping (or maybe just a grand total row), but I am not sure what you described.  Not a subtotal, IOW.

     

    >L<

     

     

     

     

     

     

     

     

    Friday, June 22, 2007 3:38 PM

All replies

  • Wild Guess: Is the value for User in the first column NULL?  If so, perhaps the total is ignoring nulls.
    Wednesday, June 20, 2007 4:10 PM
  • Thanks Chazoo for your help.

    Yes, your right. How can I fix that?
    I try to put, to the column (data):
    =Iif(IsNothing(Fields!Totals.Value), 0, Fields!Totals.Value)
    And I have the same problem.

    Dep   User   Admin
    30      0         20
    60      1         440
    Total   1        440
    Wednesday, June 20, 2007 4:30 PM
  • Can you give more complete example?

     

    What does the code look like that you are you using to calculate the total?

    Wednesday, June 20, 2007 6:32 PM
  • I don't use any code, this data are returned from store procedude in SQL Server.
    It's true that the field (30, User) don't have data (is null), but so, how suppose that I can get the total? I think that putting a 0 in the field fix the problem, but don't.
    Thursday, June 21, 2007 3:18 AM
  • What expressions did you put on the two integer columns in the Total line?  It looks like they aren't actually summing at all, at first glance... is that possible?

     

    If this is a subtotal , maybe it's a scope problem?

     

    >L<

    Friday, June 22, 2007 5:19 AM
  • I don't put any expression  I only select my row (dep), I put a subtotal field. 
    If is a scope problem, I think that is in the subtotal field,  but I can't modify the behavior of this field, maybe it's a bug, I really don't know. 
    Anyway, meanwhile, I had to past those total as parameters and  play with them to show it's the report or put as part of the table.
    Friday, June 22, 2007 2:05 PM
  • OK, I understand what you did, but I am not sure it is a bug.  I think you are misunderstanding what "subtotal" is going to do there, and I am not equipped to explain that <s>.  (Here is a good article to help you figure it out: http://www.databasejournal.com/features/mssql/article.php/3586081 -- you will definitely find subtotals in there)

     

     Your subtotal is basically only looking at one row because it is grouping by the same values, on a row and column basis, that is producing the single cell in the matrix.  Does that make sense? 

     

    I think what you want is an outer row grouping (or maybe just a grand total row), but I am not sure what you described.  Not a subtotal, IOW.

     

    >L<

     

     

     

     

     

     

     

     

    Friday, June 22, 2007 3:38 PM
  • Ok Lisa.
    You''re rigth.
    I was putting a field that have null value, that don't like to re reportviewer.
    I can see where was my error.
    Thanks anyway for the help.
    Sunday, June 24, 2007 12:23 AM
  • You're welcome, although honestly I don't think I helped you very much <s>.  Good luck ...

     

    >L<

    Sunday, June 24, 2007 3:49 AM