I need to calculate a percentage of time that is billable calculation for groups.
I am grouping by Manager,Employee, Month,Timesheet… the timesheet has multiple rows for different projects worked.
I need to calculate the percentage of time that has been submitted that is billable based on a 40 hour work week for each grouping.
I have successfully calculated the percentage for each data row. I cannot seem to get the number of timesheet group rows to calculate how many timesheets or 40 hour increments that I need to use for calculation. I always get the number of data rows.
I attached the files i'm working on… the screen.jpg is a sample of what i'm trying to do.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Ira:
We have an example that illustrates how to calculate a custom group summary based on a condition. Please check the following report for more detailed information:
Q252170
Thanks
Kate.
I'm not able to access that, it says it's marked private… thanks…
Hi Ira:
I'm sorry for this error.
I've attached a sample from this report that illustrates a solution. Please check the attachment.
Thanks
Kate.
Thanks Kate, that got me closer. The problem I'm now having is getting it to get the correct count. I am grouping it by docnbr which is the timesheet number. Each timesheet will have multiple records for different projects. Instead of counting all the records for the timesheet, I need to count the number of timesheets to multiply times the 40 hour work week and get the total_hrs billable which will give me the amount of billable utilization.
example:
Approver:
Employee:
Period:
Docnbr:
<detail records>
Docnbr Group Footer: 1 timesheet X 40 / total_hours = percentage of utilization
Period Group Footer: 5 Timesheets X 40 / total_hours = percentage of utilization
Employee Group Footer: 100 Timesheets X 40 / total_hours = percentage of utilization
Approver Group Footer: 1000 Timesheets X 40 / total_hours = percentage
Total footer:
Hi Ira:
I'm working on this question and will answer you as soon as possible. Please accept my apologies for the delay.
Thanks
Kate.
Thank you…
Hi Ira:
I'm sorry for the delay.
I assume that you can create two group summaries for the "docnbr" column. One of them will be hidden and will have the Sum type. The other one will be visible and will have the Custom type:
<GroupSummary>
<dx:ASPxSummaryItem FieldName="docnbr" SummaryType="Sum" />
<dx:ASPxSummaryItem FieldName="docnbr" ShowInGroupFooterColumn="UnitPrice" DisplayFormat="{0}" SummaryType="Custom"/>
</GroupSummary>
Also, a grid should have a total summary for the "total_hrs" column with the type Sum and custom group summaries for the "Period", " Employee" and "Approver" columns.
The custom summaries should be calculated using a value from the hidden "docnbr" summary in the CustomSummaryCalculate event handler. For example:
protected void grid_CustomSummaryCalculate(object sender, DevExpress.Data.CustomSummaryEventArgs e) { if (e.IsGroupSummary) { int timesheets = Convert.ToInt32(e.GetGroupSummary(e.GroupRowHandle, grid.GroupSummary["docnbr"])); int totalHours = Convert.ToInt32(grid.GetTotalSummaryValue(grid.TotalSummary["total_hrs"])); e.TotalValue = timesheets*40/totalHours; } }
Thanks
Kate.