Home » Microsoft Technologies

sum a particular column in reports

Have a nice day to all,

i have created report using report wizard in MS CRM 4.0 so

 how to sum a particular column in reports


2 Answers Found


Answer 1


I am not sure about report  wizared, but you can edit your report in visual studio and can apply sum  function on particular column.



Hope it will help you !!!


Answer 2

hi,  the report  Wizard supports only very simple calculations on a column  of data. For example, count, sum, average, etc.

make  sure the datatype of your column  is correct.

Also for  summarization,  you can use these options.


Export data to Microsoft Office Excel.

Use this approach when you need Excel features to summarize or aggregate data, or want to use a PivotTable to view your data in different perspectives. This approach is quick, easy, and flexible. If you come up with a spreadsheet that you'll need again, you can add it to Microsoft Dynamics crm  as a report. Each time you open it, the data can dynamically update.

Use a default report, or a report someone else created.

Microsoft Dynamics CRM includes many default reports, and may include custom reports  set up specifically for your organization. Many of these reports offer filtering, grouping, and sorting options to help you collect and display just the information you need.

Create your own report.

If the security role assigned to your account has permission, creating your own report using the Report wizard  is an easy way to get just the information you need. The wizard makes it easy to summarize and display data from two types of records at once.

This approach offers some advantages over exporting data to Excel:

It can create tables and charts that let you click an item to go right to a specific record in Microsoft Dynamics CRM. You don't need to know how to use Excel. The wizard guides you through selecting what you want in the report and displaying the data in an easy-to-use format. Data can be grouped by time intervals or by any field, and summarized by sum, average, maximum, minimum, or percentage. You can select to show just records with the most or least of one criteria, such as the top 10 accounts by revenue, or the 5 products with the fewest associated orders.

Advanced users can also create their own reports that are more complex than possible with the Report Wizard. This is typically done by an experienced report designer, because it requires setting up a report development environment and knowledge of Microsoft SQL Server Reporting Services. For more information, see the article Report customizations.




I have a matrix report that I want to have multiple columns. I went to Report Properties --> Layout --> Columns and chose 2 columns. This shows up in layout mode, I can see my matrix on the left and the column labelled "Column 2" on the right, but when I run the report, everything stays in one column. I've tried extending the width of my report (even to 40 inches just to ensure that that's not the problem, but I still only have one column. Does anyone know why this would be and have any suggestions on how to make a matrix report use multiple columns?


Hello! I've got columns in a repeating table. I have a second repeating table with a field that I'd like to put those totals in. The best way I can see to do it is to write the C# to add rows and insert the correct values.

I've got the part about adding the correct number of rows to the second table down, but I can't seem to figure out how to calculate the totals in each column in the original repeating table. This would be achieved by sum(fieldName) in a formula. Any hints?


i want to sum up number of Hours Column that i have in my SharePoint site , does anyone know how to sum up a single column ,I am using MOSS2007.

please i need to calculate the numbers in column such as 1234 in column i need 1+2+3+4 and i don't know the length if 33445566  it will sum 3+3+4+4+......


Hi everyone! Hope you can help me out. I have an Infopath form that im using in sharepoint that is opened in the browser. My problem is I have a calculated field/column(CredEarned) that I cannot sum in sharepoint, instead it just gives me the count function which I don't need. I tried using a workflow to extract the value from CredEarned and putting it in the Cred Sum column, but it doesn't give me the option to select CredEarned while making the workflow in Sharepoint Designer. Any help would be greatly appreciated! I attached a screenshot for reference.





I am really close but can't figure out what I am missing as to why my grouping is getting blown apart by my sum function....well I mean I know *I* am the one making the mistake somewhere.

T-SQL Equiv:

SELECT TransactionDate, LoanType, COUNT(LoanType) AS'CountLoans', Sum(LoanCurrPrincipal) AS'LoanValue'FROM Loan_CSM7 with(nolock)
WHERE Sourceid = 7
AND LoanType = 'DLSS'GROUPBY TransactionDate, LoanType
ORDERBY TransactionDate ASC


TransactionDate       LoanType     CountLoans           LoanValue
2010-06-22                 DLSS          3381                  6878441.00

Linq Query which works perfectly until I add the sum operation:

(from LoanStatistics in Loan_CSM7s
where LoanStatistics.SourceID.Equals(7)
&& LoanStatistics.LoanType == "DLSS"group LoanStatistics.LoanType bynew { TransDate = LoanStatistics.TransactionDate, LoanTyp = LoanStatistics.LoanType, LoanVal = LoanStatistics.LoanCurrPrincipal} into grpLoanType
orderby grpLoanType.Key.TransDate
selectnew { LoanType = grpLoanType.Key.LoanTyp, TransDate = grpLoanType.Key.TransDate, DailyLoanCount = grpLoanType.Count(), DailyLoanValue = grpLoanType.Sum(LoanStatistics => grpLoanType.Key.LoanVal) })


LoanType     TransDate      DailyLoanCount   DailyLoanValue
DLSS           06/22/2010     1                       164.00
DLSS           06/22/2010     1                       192.00
DLSS           06/22/2010     1                       407.00
DLSS           06/22/2010     1                       484.00

I was expecting it to sum all the values like the original T-SQL so any help greatly appreciated.




I request your help to solve this problem ...

I do not speak English, I used an online translator ..

I added fields to add the values of certain columns in the ReportViewer.

* Field Sum Total Invoices

* Field Bills Paid

* Field Overdue Bills

* Field to Win Bills

So far so good ...


The point is that the field of Overdue Bills placed the following condition:

-If the Maturity date <system date, add all the fields in the Value column where ValorPago = 0!

= IIf (Fields! Vencimento_cai.value <now, FormatCurrency (Sum (Fields! Valor_cai.Value AND Fields! Valor_pag_cai.value = 0.00), 2), 0.00)


The correct would be for him to compare the cell (Maturity Date) in all lines.


Does anyone have a hint??


I thank everyone's attention!


Sorry if I posted in the wrong place ...


I have an underlying dataset for my datagridview which it is bound to. I've done most of the DGV code programatically.

I'm calculating quantity x Price and displaying it in a cell like this, which works well:

 PrivateSub DGVAdviceDetail_CellFormatting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DGVAdviceDetail.CellFormatting        
         ' calculate gross amount
        If DGVAdviceDetail.Columns(e.ColumnIndex).Name _
       = "GrossAmount"Then
            ' e.value = quantity x price
            e.Value = System.Math.Round(DGVAdviceDetail.Rows(e.RowIndex).Cells("TQTY09").Value * _
                    DGVAdviceDetail.Rows(e.RowIndex).Cells("ORDP09").Value, 2, MidpointRounding.AwayFromZero)

Can I somehow fire an event to carry the line total (e,value) to the end of the DGV and display it as a grand total sum, say in a textbox or add a row with aq column for it?

If I can't carry the calculation from line to line, do I just iterate over the DGV and sum it after its loaded somehow? Which is best and cleaner. I would never expect this DGV to have more then 50 rows.

Examples appreciated, thanks much.

BTW this DGV is Read Only, no editing.

I'm just starting to analyze with SQL 2005 reporting services and trying to build a test report using the report wizard.
This is how i've got it in SQL reports now:
Opportunity ID             Product Name    Cost
---------------------            ---------------------  ----------------
1                                 Orange               $1
1                                  Apple                $2
1                                 Grapes               $4
2                                 Orange               $1
2                                 Apple                 $2
3                                 Orange               $1
Now, what if I wanted to group them to provide subtotals like:
Order                          Product Name    Cost
---------------------            ---------------------  ----------------
1                                 Orange               $1
                                   Apple                $2
                                   Grapes               $4
    SubTotal                                             $7
2                                 Orange               $1
                                  Apple                 $2
    SubTotal                                           $3
3                                 Orange               $1
    SubTotal                                           $1
The problem that i'm having right now is on the layout designer somehow programming the subtotals based on the IDs.
Am i thinking in the right direction that I should be using the layout designer to do this? Or should this be done programmatically?


I have a listView and i want the column sum in text box how can i do?


          data = from r in m_DataDoc.Elements("DashBoardData").Elements("Table1")
                ForecastTotal_t = r.Element("ForecastTotal").Value,
                QuotaTotal_t = r.Element("QuotaTotal").Value
              bynew { PhysicalRegion = r.Element("PhysicalRegion").Value, PhysicalDistrict = r.Element("PhysicalDistrict").Value, Atu = r.Element("Atu").Value, ForecastType = r.Element("ForecastType").Value } into g

                ForecastTotal=g.Sum(r=> decimal.Parse(r.ForecastTotal_t)),

I used this to group by fields region,district,Forecasttype and i need to sum ForecastTotal and QuotaTotal Can somebody help me? :( ANd this code is not even able to compile 


I am getting below exception

Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<AnonymousType#1>' to 'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'. An explicit conversion exists (are you missing a cast?)


I have implemented column tolals in the footer of my gridview using the technicque described in this article http://aspalliance.com/782 .

Now I would like to have a total of the 7 column totals that are displayed in the footer.  Can anyone tell me how to do this.  I would like to display this in a label or an addition row in the footer if that is possible.


i have a simple matrix where is display yearly sales: i want to show avg_1_year, avg_2_year, which uses the formula : yearly amount / number of month...

for avg_1_year: 2010 amount / 8 (since we are in august)..

customer       2010      2009    2008 2007  avg_1_year  avg_2_year

 A                    500     200      200  200      500/8         (500+200)/20

i dont know how to get values of 2010 for avg_1_year and of 2010+2009 for avg_2_year



I have a SP which calls 2 UDFs. These UDFs returns an interger value each.

I would like to add the UDF values and display them row wise.

The following is the code I have used:


SELECT dbo.fnc_IsConformanceCount(OBS.Behaviour_Id, @company_id) AS 'Is_Conf_Count'

, dbo.fnc_IsNonConformanceCount(OBS.Behaviour_Id, @company_id) AS 'Is_Non_Conf_Count'

, ("Is_Conf_Count"+"Is_Non_Conf_Count")


Please suggest.








I want to sum the calculated column. I found some ways to do that in SharePoint 2007 but how to achieve this in SharePoint 2010. I guess I need to use SPD 2010.  

Thanks in advance!   



I have a about 100 columns created for survey questions. I need to get the sum of each column into SSRS. Can it be done in dataset instead of adding the aggregate expression in the footer of ssrs table.

Some research that I have done so far.......Under the sharepoint list there is an option for Total for each columns. I can select the sum option and it appears in the list, but how can I access this sum in SSRS.


I have a data form web part with the "sharepoint list with currency columns" data source. I have added a footer to sum the rows. It seems like because of the number columns as currency format are formatted as "$2,000,000.00", the total shows up on the footer is "NaN".

Looking at the XSLT, I don't see any issues with the XSLT code - <xsl:value-of select="sum($nodeset/@Year_x0020_1_x0020_P_x0026_L_x002)" />

Is there any reason why currency columns are not summable in the XSLT? Has anyone came across this kind of issue?


Hi All, I need one help...

my source is having column1...




I need a query to display my output like this...

column1  totalSum
   2           14
   3           14
   4           14
   5           14

Thanks in Advance,





anybody can help me to solve my problem??

i have a matrix report and i want to calculate just column 1 and column 3...

So any idea to solve my problem?

Thanks before :)




when i use datagrid its like this

column1   colum2  colum3 

10000     50000       300

    100         200     1000

i do not want to sum it in footer but   like this   

 column1   colum2   column3

   10100     50200    1300

any body help me , and the other is i have 110 column its long long 2 meters on screen, how can i adjust it 10 colum and down to other 10 colum  thank , sorry  english


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure