Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to get sum of group as :
// Get the value of the current cell in the CategoryName column in the master report.
   int balance =Convert.ToInt32(GetCurrentColumnValue(Sum["stock"]));


What I have tried:

private void GroupHeader1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
       {
           try
           {
               int balance = Convert.ToInt32(xrTableCell10.Text);
               int min = Convert.ToInt32(xrTableCell8.Text);

               if (balance <= min)
               {
                   e.Cancel = true;
               }
               else if (balance > min)
               {
                   e.Cancel = false;
               }
           }
           catch(Exception ex) { Msg.Show("", ex.ToString(), 0); }



       }
Posted
Updated 3-Nov-18 5:09am
v2
Comments
BillWoodruff 3-Nov-18 22:09pm    
What happens, or goes wrong, when you run the code you show ?
Golden Basim 6-Nov-18 8:38am    
the balance value show only one record not the sum of all records for same item
BillWoodruff 6-Nov-18 10:05am    
"... the sum of all records for same item"

then, you need to query the records that match the item and add them up: where's your code for that ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900