.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Need a group total for an expression result NOT from the elements value

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :Sql Server

Simple question and still new to SSRS 2005.  Did a bit of Crystal reports before.


I have created a bit of code that returns a 0 or a 1 in a column based on a text evaluation as I could not get IIF to behave for me.  But either way the textbox displays the 0 or the 1 if the result is true.


I want to sum up the results, but I cannot seem to find the proper name for the text box to use in a =sum(textbox38) sort of statement.


So I have a couple columns like this


talked to customer estimate given      1   0

talked to customer estimate accepted   0   1


I need to count up those 0 and 1s in the footer so I know how many estimates went out and how many were accepted




View Complete Post

More Related Resource Links

SSRS Report Group Total

I am trying to make a report in SSRS with Data source CUBE. I have a column which is calculated and inside the group. I could not take group total for that item. Please any guide my calculated column expression is =(Fields!Count_of_Passengers.Value/Sum(Fields!Count_of_Passengers.Value, "LHSH"))*100  

change row-groups: Hidden-expression of deleted group-object still interferes

Hallo,    I built a report with 23 Datasets. Each of them contained the same hierarchie of two row-groups. The visibility of the subgroup depended on the value of some report-parameters. Now I need to build the same report, only this time with a different rowgroup. I already included the Datafield for the rowgroup into each dataset, deleted all old row-groups and set up the new row-group for each dataset. I also deleted the old report-parameters. The problem is, I still get Error-messages like:       "The hidden-expression of the group-object 'group2' refers to a non-existant report-parameter xy." I checked all hidden-expressions of every single tablix and everywhere the hiddenproperty is correctly set to "visible". How can I make SSRS 2008 realise that the old hidden-expressions, which indeed did refer to the now deleted parameters, are no longer existant?   Any help on this would be much appreciated. NuramonTheWanderer  

I need to Group Elements in Nested Repeater Control



User Group Management
User Groups Add  Delete   Edit  View  Activate/Deactivate  Export
User Management

How to get group count and total count using one select statement?


How to obtain the resultset using one select statement?


Table 1

Users Add  Delete EditViewActivate/DeactivateExport
Roles Add  Delete EditViewActivate/DeactivateExport







access row group total from row details?

I need to access the total value for a row group from the row detail cells, how can I do this? 

Javier Guillen

Add total in group footer for calculation with multiplication and sum

Not sure if the topic title clarifies my problem correctly but this is what I'm trying to achieve:
I have a simple report, an overview of different projects grouped by accounts. Every project shows the revenue, the costs and the profit.
I want to have a total of all 3 colums, both in group footer as in the table footer. I know how to do a simple Sum(Fields!revenue.Value) but my calculation is a bit more complicated:


Basicly this adds up: Transportation cost (km*cost/km) + Preperation cost + Project Cost + Multiple other costs
The formula itself works perfectly.

Now when I have 3 projects with an account, I want to know the total. I've tried the following:
- =Sum(Formula)
- =Sum(km*cost/km) + Sum(Preperation cost + Sum(Project Cost) + Sum(MultipleOtherCosts)
- =Sum(ReportItems!textbox2.Value)

But either I get errors, or the total is incorrect because of the multiplication. The problem is I need to mulitplie km*cost/km first and not Sum(km)*Sum(Cost/km) because than the total is incorrect.

Is there someone who sees a solution for my problem?


Deploying new group in elements doesn't show


When I run the feature my web parts create the group just fine. But when I deploy the wsp file to the server, my groups are not created.

  <File Path="WebpartName.webpart" Url="vpDashboard_DCSSales.webpart" Type="GhostableInLibrary" >
   <Property Name="Group" Value="SalesCharts"

Group Total in Footer (SSRS)



I am using SSRS and have a group named "G_Invoice" . In the footer I need to total the group's total. I used the following lines

=Sum( Fields!InvoiceAmount.Value ,"G_Invoice") in the textbox .

I also tried

=RunningValue(Fields!InvoiceAmount.Value ,sum,"G_Invoice")

In both the cases, it shows an error


The Value expression for the textbox ‘textbox27’ has a scope parameter that is not valid for an aggregate function.  The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set.


How to achieve it?





Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Group Calendars in SharePoint 2010

One of the many requests I had in SharePoint 2007 was the ability to place SharePoint Calendars on top of each other like you can in Outlook 2007 saving you having to look at each and work out when the best time is for a meeting.

How to use getElementById to get the elements in a form

There are many ways of accessing form elements, of which the easiest is by using the cross-browser W3C DOM document.getElementById method. Before we learn more about this method, it would be useful to know something about the Document Object Model (DOM), the concept of HTML nodes or elements, and the concept of containers.

Each time you load an HTML page, the web browser generates an internal representation of the page in the form of an inverted tree structure. Let us look at a simple form. We will use this form later to demonstrate the use of the getElementById method.

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.

ListViewControl - how to group items by their value, for eg. date range



I have a table containing courses, columns are 

Name - "Yoga Classes"

DateStart - "2/23/2010"

DateEnd - "2/24/2010"

I am using ListView Control to bind it, is there a way to display them and group them by Month? 

for eg.


Piano Class (10th Jan 2010 - 11th Jan 2010)
Guitar Class (10th Jan 2010 - 11th Jan 2010)


Yoga Class (15th Feb 2010 - 16th Feb 2010)

Thanks for help.

Active Directory and .NET: paging the search result

Hi everybody!

I have a question about Active Directory in .NET
For my project I need to fetch results from Active Directory search page by page, because later I would need to bind it to the pageable DataGrid.

I tried to use .NET library DirectoryServices for that, but paging provided by this library is transparent to the user and is used only to increase the efficiency of searching, when results are too big. I.e. I cannot tell the DirectorySearcher to give me first page, then the next or previous page, it returns me all resulting pages in one bundle.

However, what I need is to explicitely get page after page directly from the AD searcher and to be able to go at least one page forward or backward.

The solution with copying all results to the DataBase and then do the paging is not accepeted by the clent, since it is too inefficient. And since it's a Web app, I cannot keep results in memory either.

I found some hints about COM Interface, but I could not find good and detailed examples or explanations. I aslo found this line of code: DirectoryServices.Interop.IDirectorySearch.ExecuteSearch(), but I don't know which libraries should i add to be able to compile this code.

If somebody could help me out with that problem, any suggestion is welcome, 'cause this issue is eating me alive :)

Thank you!

How do I get the emails of all the members of a given group in ActiveDirectory - Need help



  I have a need to send out emails to all the people who are in a given group say "HR Department". I need to be able to get all the emails through a for loop and then as it retrieves I should send emails to them. Can some one please help me with the code

this is what I came up with but not sure how to go about writing a for loop to get all the emails in the given group.

public static string SendEmails(string loginName)
        string Department = "HR Department"
        string userName = ExtractUserName(loginName);
        DirectorySearcher search = new DirectorySearcher();
        search.Filter = String.Format("(SAMAccountName={0})", userName);
        //search.Filter = String.Format("(SAMAccountName={FAY ImprovmentForm})", userName);
        //LdapSearcher.Filter = string.Format("(&(objectClass=user)(department={0}))", Department); 
        //search.Filter = string.Format("(&(objectClass=group)(SAMAccountName=" + Department + "))", userName);

Need Help in LINQ query for group By with chunks of record


I am assigning and unique id [strShipperIdSequence] on my List on bases of some properties which are grouped together uniquely.
Now what i needed is that my group should be further break down to some maximum amount of chunks.[Let say 10]
that mean's even i am having Same value in 12 records i should get 2 groups[I of 10 items and other of 2 items]

var uniqueGroups = objMdbContentInfoList.GroupBy(p => new
}).Select(g => g.First()).ToList();
foreach (var objUnique in uniqueGroups)
string strShipperIdSequence = APIGlobalMethods.GetShipperRequestID();
foreach (MdbContentInfo obj in objMdbContentInfoList.FindAll(h => (h.CON_ENTRY_POINT == objUnique.CON_ENTRY_POINT &&
h.APPTType == objUnique.APPTType &&

[How??] Lamda expression with ByRef parameter


How to write lamda expression with ByRef/ref parameter in c# ??

The code below causing syntax error:

item.OnAction = (p1, p2, ref p3) => {
   return true;

item.OnAction = (p1, p2, & p3) => {
   return true;

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