Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS Access

Posted Oct 6, 2003

MS Access for the Business Environment: Reporting in MS Access: Grouped Transactional Report Part II - Page 5

By William Pearson

Let's practice the selection, moving and sizing techniques in the Details section of our report, where we dropped the six fields we dragged from the Field List above.

9.  Click the ProductID compound control at any point.

The Sizing and Move handles appear for the ProductID control pair.

10.  Hover the cursor over the area to the immediate right of the second Move handle.

The cursor becomes a hand image.

11.  Click and drag the ProductID compound control to a position approximately 1/4-inch on the horizontal (across the top of the Design View) ruler; keep the control as close to flush to the top of the Detail section as possible.

12.  Click the ProductName compound control at any point.

The Sizing and Move handles appear for the ProductName control pair.

13.  Hover the cursor over the area to the immediate right of the second Move handle.

The cursor becomes a hand image.

14.  Click and drag the ProductName compound control to the immediate right of, and aligned with, the ProductID compound control.

15.  Drop the ProductName compound control, as shown in partial view of the Detail section in Illustration 14.


Illustration 14: New Placement of the ProductName Compound Control

16.  Click the label control (the left control in the pair) for ProductID.

17.  Press the Delete key.

The ProductID label disappears. We will likewise remove the label controls from each of the fields we dragged into the Detail section, as we do not want to show these in the report.

18.  Delete the label controls for each of the remaining control pairs in the Detail section of the report:

  • ProductName
  • UnitPrice
  • Quantity
  • Discount
  • NetOrder

The Detail section of the report appears as shown in Illustration 15.


Illustration 15: The Detail Section Controls - sans Labels

19.  Resize the ProductID text control to have the right border touch the 1-1/4 inch horizontal marker line (as we proceed, ensure that all Detail section controls are placed snug against the top of the Detail section).

20.  Move the ProductName control to align with ProductID vertically, with the ProductName left border at the 1-1/4 inch horizontal marker line.

21.  Resize the ProductName control, if required, so that its right border touches the 2-1/2 inch horizontal marker line.

22.  Move the UnitPrice control to touch ProductName's right border at the 2-1/2 inch horizontal marker line.

23.  Resize the UnitPrice control, as necessary, so that its right border touches the 3-inch horizontal marker line.

24.  Position the Quantity control so that its left edge touches the 3-1/4 inch horizontal marker line.

25.  Resize the Quantity control, as necessary, so that its right border touches the 3-3/4 inch horizontal marker line.

26.  Position the Discount control so that its left edge touches the 4-inch horizontal marker line.

27.  Resize the Discount control, as necessary, so that its right border touches the 4-1/2 inch horizontal marker line.

28.  Position the Net Order control so that its left edge touches the 4-3/4 inch horizontal marker line. (The page will automatically widen as required.)

29.  Resize the Net Order control, as necessary, so that its right border touches the 5-1/2 inch horizontal marker line.

Now let's size the Detail section to ensure that our detail transactions are presented in compact fashion.

30.  Move the pointer to the bottom of the Detail section, placing it between the Detail section and the OrderDate footer section.

The pointer becomes a "double-headed arrow," indicating that it is in position for dragging the Detail section border to the desired position.

31.  Hold down the left button on the mouse, as soon as the arrow image appears.

32.  Drag the Detail section border up, until a tight fit is achieved for the controls we have included.

33.  Release the button to fix the border in place.

The Detail section of the report now appears as depicted in Illustration 16.


Illustration 16: Detail Section (Partial View) with Our Adjustments to the Border

We can perform an ongoing preview of our evolving report through the use of the Preview feature. Let's do so now, to get a feel for the effectiveness of our design work thus far.

34.  Click the Print Preview button (shown in Illustration 17) on the main toolbar.


Illustration 17: The Print Preview Button

We are prompted for an "As Of" date, via an Enter Parameter Value dialog that appears, and which is initialized because of the logic we built into our underlying data source, a query that we constructed in the first half of this lesson. Recall that our intent with this query is to enable an information consumer to generate the customer order information found in this report "as of" any given date in time (or at least "as of" any date that is included within the data itself). For more information regarding the setup or reasoning behind the prompt, see Part I.

35.  Type the following (a date which we know to be preceded in time with transactions, within our database) into the AsOfDate box:

16-Oct-1996

The Enter Parameter Value dialog appears, with our input, as shown in Illustration 18.


Illustration 18: The Enter Parameter Value Dialog

36.  Click OK to apply the date.

The report executes, returning data that appears similar to that partially shown in Illustration 19.

Illustration 19: The Report Preview - Partial Detail Section

We can see that the Detail section of the report is shaping up nicely and that the data is appearing in accordance with our alignment and placement intentions. The spaces that appear between the detail sections are due to the placement of our header / footer sections, which are currently empty. We will see in the next section how to populate, as appropriate, these sections.

37.  Click the Close button to close the Preview window.

38.  Save your work as desired, as a safety measure.



MS Access Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS Access Forum
Topic By Replies Updated
Help With Microsoft Access kasy 0 September 4th, 07:35 PM
Linked table not sorting or filtering - ODBC error Java 1 August 28th, 10:37 AM
Use Parameter in select statement (Sql in Microsoft Access) katty.jonh 1 July 25th, 06:45 AM
Query Issue algebroni 7 July 23rd, 04:22 PM


















Thanks for your registration, follow us on our social networks to keep up-to-date