Use Custom Code to get Total but zero is shown

  • Hello,

    I am using 2014 SSRS I created a custom code to get Grand Totals for a monthly trend report, when I generate the report in IE I get zeros Grand Total amounts on the report, but when I export the report to Excel the Grand Total is shown and is correct.  Why is this happening?  How can I show the Grand Total amount in IE.

    Here is my Code:

    Dim public nettotal1 as Double

    Public Function Getvalue1 (ByVal subtotal AS Double) AS Double

    Nettotal1 = nettotal1 + subtotal

    return subtotal

    End Function

    Public Function Totalvalue1()

    return nettotal1

    End Function


    Code to start summarizing on the row.

    =code.Getvalue1(ReportItems!January.Value)


    Code to get Grand Total Amount.

    =code.Totalvalue1()

    See below screen shot.  Any tips will be appreciated.  Thank you in advance

    Example of report:

     

    1st Quarter

    GL Account

    Account Description

    January

    February

    March

    73415

    Computer Expense

    $35,000

    $2,416

    $555

    73420

    Warehouse Expense

    $205

    $456

    $26

    73450

    Operation Expense

    $140

    $654

    $78

    Grand Total

    $0

    $0

    $0

    When the report is exported to Excel the Grand Total Shows

     

    1st Quarter

    GL Account

    Account Description

    January

    February

    March

    73415

    Computer Expense

    $35,000

    $2,416

    $555

    73420

    Warehouse Expense

    $205

    $456

    $26

    73450

    Operation Expense

    $140

    $654

    $78

    Grand Total

    $35,345

    $3,526

    $659

  • A couple of things to try:

    1.) Try another browser, just to be sure you haven't run into something weird with IE.
    2.) Try re-booting your machine to be sure that the browser wasn't just "mucked up"...
    3.) Validate that there are no "conditional formats" that might cause the zero to appear because they are NOT based on your functions values, but on other things..

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • smunson,

    Thanks for the tip. This is what I did.

    Used Google Chrome
    Re-booted the machine
    There is no conditional formats.

    I still get zeros I am still trying to figure it out.  The funny thing is I have created over 10 reports with custom code for totals and never had this issue.  Again thanks for your tip.

  • Have you tried re-creating the report as a new report or a second table that follows the same format and customer formula for the grand total? Have you looked at the XML of the report to see if there is anything funny that could be causing the issue?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply