Prev: Quickly changing RDL files
Next: Export to Excel?
From: Geoff on 18 Mar 2010 17:22 I have on my report a list grouped by username. What I need is to count the number of times the grouped username appears in another column within the dataset (both inside and outside the grouping). I have tried everything I can think of (which is why I am here.) What I have so far is some code and a "SUM(IIF(..." statement. In the code below you will find the values I use to get/set the list's current username and the values of the related text boxes. The code to set and retrieve the username work. (I can set the value of a textbox inside the list to =Code.Username and get the correct username.) My problem is that the value for my 'alternate count textbox' (also on the list) is processed before the list and the Code.Username variable has a null value when its evaluated. I need an alternative method or some way to push the evaluation of the alternate count text box's value until after the list has been initialized. 'Code 'List title textbox value =SetCurrentUser(Fields!Username.Value) 'Alternate count textbox value =SUM(IIF(Fields!PendedBy.Value = Code.Username, 1, 0), "UserReportDataSet_Details") 'Report Code public dim Username as string public function SetCurrentUser(username as string) as string me.Username = username SetCurrentUser = me.Username end function Submitted via EggHeadCafe - Software Developer Portal of Choice Join Lists with LINQ - SharePoint 2010 http://www.eggheadcafe.com/tutorials/aspnet/b0c1cd0d-fe82-444e-a16e-7d3fb7d38eca/join-lists-with-linq--sh.aspx
|
Pages: 1 Prev: Quickly changing RDL files Next: Export to Excel? |