Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating Chart (2000 SP3)

    I have main report with 2 sub reports that are charts. I am setting the y-axis so both charts have the same scale. When the report is previewed each page has the correct y-axis scale. When the report is printed the scales are not updating. I am using the following code to set the y-axis. I have also tried putting the code in the On Print event with no luck.

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    With Me.chart_eff_2.axes(2)
    .minimumscale = 0
    .maximumscale = Report_zrpt_max_eff_2![max_eff_]
    End With
    End Sub

    Is there something I am missing to update charts when the printing the report.

    Thanks,

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

    Re: Updating Chart (2000 SP3)

    Try putting the code in the On Print event of the Detail section instead of in the On Format event (or in both - that's slightly less efficient, but you probably won't notice that).

  3. #3
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updating Chart (2000 SP3)

    I added the code to both On Print and On Format events of the report. I did not notice any performance difference. But this did not work.

    What I found out is that I had the controls for the y-axis in another sub report. I changed my queries around to add it to the main report it in a text box. Now it works perfect with the code only in the On Format event.

Posting Permissions

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