Custom code not working RRS feed

  • Question

  • I have an issue with SSRS(sql2005, VS2005) report that I publish to a SharePoint 2007 site.  I have also converted the report to VS2008, and it seems like Custom code does not work there at all.

    On my report I use Custom Code to count the totals for the Top 5 Customers, report then shows totals for the Top 5 only.  This works fine in my dev Visual Studio 2005 environment, but when I deploy the report to SharePoint, my totals show up as zeros.

    Here is my Custom Code:

    Public monthTotal as double
    Public threeMTotal as double
    Public ytdTotal as double

    Function AddFunc(ByRef uTotal as double, num as double) as object
            uTotal = uTotal + num
            return uTotal
    End Function

    On group line, I have these two lines
    =code.AddFunc(code.monthTotal, sum(Fields!data1.Value))
    =code.AddFunc(code.threeMTotal, sum(Fields!data2.Value))

    and on the next group I have these two lines (these work in Visual Studio 2005, giving me my totals, but are zero in SharePoint site)

    Why does the Custom Code not working in SharePoint site nor in VS2008?

    Tuesday, June 30, 2009 3:51 PM