Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Percentage on Report Summary

Introduction.

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.


Design a Sample Report to Try.

  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.

Creating Page-Level Totals

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

Share:

No comments:

Post a Comment

Comments are subject to moderation before publishing.

Translate



PageRank
Subscribe in a reader
Your email address:

Delivered by FeedBurner

Search

Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Follow by Email

Labels

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

Featured Post

Opening Access Objects from Desktop

Frequently Used Methods. Set the Form Name in Display Form Option of Current Database in Access Options . BIG DEAL!, this is the first t...

Labels

Blog Archive

Recent Posts