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

    Slow-opening Report (2000)

    Please select Dicembre(December) and 2003 on the startup form of the attached mdb and open the RCons report. Is there any way to shorten the time it takes(minutes) to display the report?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Slow-opening Report (2000)

    When I try and run the report I get a message that says that report ConsFermDez does not exist.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Slow-opening Report (2000)

    When the report Rcons is run it calls 14483 the function EnerOm. This function contains Dlookup function and this is a slow function (like all domain functions). If you want more speed, you'll have to reconsider your function EnerOm.
    Francois

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Slow-opening Report (2000)

    I didn't download the report, but does it have a "Page 1 of 20 Pages" type of entry? This essentially causes the report to be run twice, the first time internally to get the total number of pages, even before it displays anything. Then it is run again for "real". This is a killer for really big reports.

    An additional thought. What about the report sequencing and criteria selection fields? If you don't have proper indexes on you tables, the more info the report must suck-in before it can run.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Slow-opening Report (2000)

    Wow, every field in that report is a DLookup statement. That is going to run very very very slow. You should bind your report to a query, which pulls the values for you.

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

    Re: Slow-opening Report (2000)

    Hi Drew, thanks for stopping by.
    How should that query be?

  7. #7
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Slow-opening Report (2000)

    Honestly can't tell, I must admit I'm not exactly sure what the query or report is doing, I think it's because it's a different language, throwing off my thought pattern! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Slow-opening Report (2000)

    From what I can see you are running an update query on a record you are editting, this would create a conflict as far as I know.

    Why don't you substitute the following:
    Energia = EnerOm("g1dez", "dezg1k", [Giorno], [ORE_MARC])
    for:
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "query7"
    DoCmd.SetWarnings True
    'Me.Refresh

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

    Re: Slow-opening Report (2000)

    Hi Francois, I've tried to cut down on the number of all those calls to the EnerOm function by substituting all those Dlookup functions in the Rcons report text boxes with several subreports, each one having a query as record source and also by pre-calculating the energy by using the EnerOm function only for the time range needed using a query but the report still opens painfully slow.
    So I've decided to create an Energia field in the G1Dez table that gets updated only when the Lettur text box in the MG1Dez form gets updated(please see attachment).
    The problem is that if you, for example, select December 30, 2003 on the calendar and modify the value in the Lettur text box, the Energia text box doesn't reflect the change.
    I thought the following code should take care of that but it doesn't.
    <font color=red>Private Sub LETTUR_AfterUpdate()
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "query7"
    DoCmd.SetWarnings True
    'Me.Refresh
    End Sub</font color=red>
    <img src=/S/help.gif border=0 alt=help width=23 height=15> <img src=/S/please.gif border=0 alt=please width=31 height=23>

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

    Re: Slow-opening Report (2000)

    Hi Pat, thank you.
    I've done what you've advised(please see attachment) but when you modify the value in the Lettur text box(try for example to type, say, 10677.28 for Dec 30, 2003) the Energia text box still doesn't reflect the change.

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Slow-opening Report (2000)

    Take out the Me.Refresh command and try it again

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

    Re: Slow-opening Report (2000)

    I've taken it out and typed 10677.28 for Dec 30, 2003 but the Energia text box value remains unchanged. I'd like to point out that if you keep on modifying the value in the Lettur text box, the value in the Energia text box does change but it always reflects the previous, not the current, change in the Lettur text box. That's why I tried and used the Refresh method to see if the current change in the Lettur text box could be reflected right away in a change in the Energia text box.

  13. #13
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Slow-opening Report (2000)

    Why don't you blank the Energia field and see what happens then.

    If it does not change then that's ok as the command overrides what is in the Energia field each time you enter the AfterUpdate event of the Letture field.

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

    Re: Slow-opening Report (2000)

    Thank you. I've blanked it but still the Energia text box value changes to reflect the previous(not the current) change in the Lettur text box.

  15. #15
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Slow-opening Report (2000)

    Giorgio,

    Put a breakpoint into that AfterUpdate event so you can be sure it is firing. If you type in a value in LETTUR and don't move off the field, the AfterUpdate won't fire and the code won't be executed.
    Charlotte

Page 1 of 2 12 LastLast

Posting Permissions

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