Results 1 to 12 of 12
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Data Labels in a Pivot Chart (2003)

    I'm trying to format data Labels in a Pivot Chart so that they show one decimal after the decimal separator using
    dlSeries1Labels.NumberFormat = "#,#.#; -#,#.#"
    in the FormatSeriesLabel Sub in Module1 of the attached mdb but when the point values in the chart series don't have decimals, the data labels display a dot after the value. Is there a way to avoid displaying the dot in such cases?
    To check it out, on the startup form, please set the "begins" date to March 1, 2004 and the "ends" date to March 31, 2004, select the "Lake Level" option button and click the Chart button.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    You can either omit the formattting altogether (or set it to General) and let Access deternine how to display the numbers, or set a format with one decimal <code>"#.0;-#.0"</code>. If you include the decimal separator in the formatting, it will always be displayed.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    Thank you Hans, the first option did the trick. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    Open the database with the Shift key held down.
    Select Tools | Customize...
    Activate the Toolbars tab of the Customize window.
    Click New...
    Give the new toolbar a name, for example ChartMenu, then click OK.
    With the new toolbar selected in the list of toolbars, click Properties.
    Set Type to Menu Bar.
    Click OK.
    Activate the Commands tab of the Customize window.
    Select New Menu in the list of Categories.
    Select New Menu in the list of Commands and drag it to the new toolbar.
    Right-click the new menu and change the name (caption).
    Select File in the list of Categories.
    Drag the items you need from the list of Commands to the new menu.
    You can also copy items from the built-in menus by dragging them to the new menu with Ctrl held down.
    (Note: if you don't hold down Ctrl, you will move the items off the built-in menus!)
    Repeat if you want to create more menus.
    Finally close the Customize window.
    Close and reopen the database, this time without holding down the Shift key.

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    If I open the attached mdb without pressing the shift key and then open the chart, the file command in the menu has only two items: Close and Exit. How can I add the Print Preview command to it?

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    I've carried out your advice and I've inserted a Print(Stampa) item to the menus dragging the Print Icon from the File Category but how come selecting File/Print command from the normal menu brings up a dialog box allowing you to choose the printer while the Print Icon in the newly added command just prints right away?

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    The Print button from the File category prints directly. To create a toolbar button that shows the Print dialog, copy the one from the File menu:
    - Select Tools | Customize...
    - Click on the File menu to make it drop down.
    - Drag the Print... item from the File menu to the Stampa toolbar (the File menu will disappear when you move the mouse over another menu or toolbar).
    - Important: hold down the Ctrl key when you drop the Print... item on the Stampa toolbar. Holding down Ctrl creates a copy of the button instead of moving it.

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    Thank you Hans,
    I've carried that out and now the Print(Stampa) item only appears if you open the mdb holding down the Shift key. Why is it so?

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    The Print... button only makes sense if there is something to print. You haven't set a startup form in this database. If you set a startup form, the Print... item will be visible.

  10. #10
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    Thank you Hans,
    How come the Print item remains invisible if I open a form in Pivot Chart view?
    On the startup form of the attached mdb, set Begin Date to Nov 1, 2005 and End Date to Nov 30, 2005, check the option button labeled "Portata Mazzunno" and click the Grafico button. You'll see the pivot chart form that opens up doesn't make the Print item available.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    I don't know, sorry. Try the following instead:
    Create a function in a standard module:

    Public Function PrintDialog()
    On Error Resume Next
    RunCommand acCmdPrint
    End Function

    Select Tools | Customize...
    Remove the Print... item from the Stampa menu.
    Drag the Custom button from the File category to the Stampa menu.
    Right-click the custom button and select Properties.
    Change the Caption property to Print... (or Stampa...)
    Set the OnAction property to =PrintDialog()
    Click Close (twice).

  12. #12
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Data Labels in a Pivot Chart (2003)

    You're absolutely Great. <img src=/S/joy.gif border=0 alt=joy width=23 height=23> Thank you Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •