Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Percentage on Report Summary

We have worked with a Query to solve this problem earlier in the Blog Post: Percentage on Total Query.  This time let us see how it is done on a Report.  Our task is to show detail-line-wise value’s percentage on Report Summary Total.

The solution is simple.  Create a Report with some values in it with Report level summary.  Add a Text Box in the detail section and write an expression to divide the Report Summary Value into the detail level value.

Let us try it out.

  1. Import the Order Detail Table from Microsoft Access Sample Database: C:\Program Files\Microsoft Office\Office11\Sample\Northwind.mdb
  2. Open a new Query in SQL View; without selecting a Table from the displayed list.
  3. Copy and Paste the following SQL String into the SQL editing window of the new Query:
    SELECT [Order Details].[Order ID], Sum([Order Details].Quantity) AS TQuantity, Sum([Order Details].[Unit Price]) AS UnitPrice, Sum([Unit Price]*[Quantity]) AS TotalPrice
    FROM [Order Details]
    GROUP BY [Order Details].[Order ID];
    
  4. Save the Query with the name OrderSummary.
  5. Design a Report (as shown in the image given below) with the Detail Section and Report Footer summary controls using OrderSummary as Source.
  6. Click on the Text Box at the Footer of the Report to select it.
  7. Display the Property Sheet (F4 or ALT+Enter) of the Text Box.
  8. Change the Name Property Value to GTPrice (stands for Grand Total Price).
  9. Write the expression =Sum([TotalPrice]) in the Control Source Property.
  10. Select the Text Box at the right end in the Detail Section and display its Property Sheet.
  11. Write the expression =[TotalPrice]/[GTPrice] in the Control Source Property.
  12. In the Format Property select the Percent format from the drop-down list.
  13. Type 2 in the Decimal Places Property.
  14. Save and Close the Report.
  15. Open the OrderSummary in Print Preview and check the detail line percentage value calculated on Report Footer Grand Total Price.

Want to know how to calculate and display Page-wise control totals; you can learn it from here?

Share:

No comments:

Post a Comment

Translate



PageRank
Your email address:

Delivered by FeedBurner

Search

Infolinks Text Ads


Blogs Directory

Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Labels

Forms How Tos Functions MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Queries External Links msaccess reports msaccess tips Menus and Toolbars Accesstips MsaccessLinks Process Controls Art Work Downloads msaccess How Tos Graph Charts msaccessQuery List Boxes Command Buttons Emails and Alerts Query Combo Boxes Custom Wizards DOS Commands ms-access functions msaccess graphs msaccess reporttricks msaccess functions msaccessprocess security advanced Access Security Data Macros Menus Property Report Top Values VBA msaccess email msaccess menus progressmeter Access2007 Array Auto-Number Command Button Copy Custom Functions Form Join Microsoft Numbering System Records Security Split SubForm Table Utility Workgroup database msaccess wizards Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting Calculation ChDir Color Palette Conditional Formatting Controls Data Filtering Data Type Defining Pages Diagram Disk Dynamic Lookup Error Handler Excel Export Expression External Field Type Fields Filter Form Instances Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Methods Monitoring Object Reference Objects Octal Numbers Operating System Paste Primary-Key Product Rank Reading Recordset Rich Text Sequence SetFocus Summary Tab-Page Tables Time Difference Union Query User Users Variables Water-Mark Word automatically commands function hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar tutorial updating upload vba code

Featured Post

DIRectory and File Copy Utility

Last week we have seen how to use Dir() DOS Command , it’s ability to read files from the Disk  one by one and display it on the Debug Windo...

Labels

Blog Archive

Recent Posts