PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Re: Export to RTF very slow when code is present in Access report.

 
 
Dale Dixon [MSFT]
Guest
Posts: n/a
 
      3rd Sep 2004
Hi Ryan,

My name is Dale and I'm reveiwing your issue:

I attempted to make this response earlier this week but messed it up. This
should work better.

ISSUE:

=====

Export to RTF very slow when code is present in Access report.

Occurs with reports with 200-600 pages

ENVIRONMENT

===========

Access 2003

Widows 2000 or XP.

STEPS TAKEN

==============

1. Simple code in the Detail_Format event of a report: displays or hides

certain text boxes.

2. Report is exported to Word it hangs for 2.5 minutes displaying the Now

outputting window but output to RTF begins.

3. Preview the report with the code still in detail section - Displays

normal

4. If code is commented out , output to RTF works fine.

5. A breakpoint is placed in the Detail_Format event and it didn't break

during outputting to RTF

Appears that items 2 and 5 are issues to address at this point: the report

hanging during the output operation and the fact that putting a breakpoint

in his code does not break during execution of the output to RTF operation.

STEPS TO TAKE

============

1. Need to gather more specific information about the environment, such as:

- Service packs and versions of applications like Word.

- Versions of Jet, MDAC

- Need to determine if this can be reproduced in the Northwind sample

database or similar database

2. It will be a good idea to provide the specific steps to reproduce the

issue in a similar environment.

3. If its possible please provide sample code, or a sample database with a

report which displays this behavior.

- specific fields

- specific code used in detail section

- specific data used in the report

- specific configuration of database and system when issue occurs

NOTES

=====

The breakpoints being ignored may be attributed to the issue addressed in

the following article:

ACC2000: Breakpoints Are Ignored in Visual Basic for Applications Code

(296848)

http://support.microsoft.com/default...b;EN-US;296848

NEXT STEPS

=========

Ryan if its possible for you to provide specific repro steps and a sample

database that would be great for me to troubleshoot here also. Also Ryan

please review the informtion above and let me know if this correct.

Thanks

Dale

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am using the following code, as a test example, in the report:
> ----------------------------------------------------
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
> If Report_ReportonqryNotPassThrough!txtFirstName.Value = "sdf" Then
> Report_ReportonqryNotPassThrough!txtFirstName.Visible = True
> Report_ReportonqryNotPassThrough!txtBoldFirstName.Visible = False
> Report_ReportonqryNotPassThrough!txtLastName.Visible = True
> Report_ReportonqryNotPassThrough!txtBoldLastName.Visible = False
> Else
> Report_ReportonqryNotPassThrough!txtFirstName.Visible = False
> Report_ReportonqryNotPassThrough!txtBoldFirstName.Visible = True
> Report_ReportonqryNotPassThrough!txtLastName.Visible = False
> Report_ReportonqryNotPassThrough!txtBoldLastName.Visible = True
> End If
> End Sub
> ---------------------------------------------------
> I have the report based on a table with 3 fields and 10,000 rows.
>
> The code works fine when I preview the report. When I export to Word it
> will "hang" at outputting... for 2.5 minutes and then begin outputting
> page
> 1, 2, ...
>
> If I comment out the code AFTER I have already opened it in Preview mode
> it
> will begin outputting page 1,2,... immediately.
>
> I included a Stop command in the code and when I output to Word it never
> breaks to the code leading me to believe the code never runs during the
> output to Word. If the code never runs why is there such a delay when the
> code is there?
>
> Ryan
>
> "Vikrant V Dalwale [MSFT]" wrote:
>
>>
>>
>> Hello Ryan,
>>
>> I would appreciate your patience while I am having tech experts look
>> into
>> this issue.
>>
>> Thanks for using MSDN Managed Newsgroup.
>>
>> Vikrant Dalwale
>>
>> Microsoft SQL Server Support Professional
>>
>>
>> Microsoft highly recommends to all of our customers that they visit the
>> http://www.microsoft.com/protect site and perform the three
>> straightforward
>> steps listed to improve your computer's security.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>>
>> --------------------
>> >Thread-Topic: Export to RTF very slow when code is present in Access

>> report.
>> >thread-index: AcSJ7tC6+pF1b2QHTKqoZGtsXszArQ==
>> >X-WBNR-Posting-Host: 156.153.255.134
>> >From: "=?Utf-8?B?UnlhbkBuZXdzZ3JvdXBzLm5vc3BhbQ==?="

>> <(E-Mail Removed)>
>> >Subject: Export to RTF very slow when code is present in Access report.
>> >Date: Tue, 24 Aug 2004 08:27:07 -0700
>> >Lines: 20
>> >Message-ID: <(E-Mail Removed)>
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 7bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >Newsgroups: microsoft.public.access.reports
>> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
>> >Xref: cpmsftngxa10.phx.gbl microsoft.public.access.reports:145104
>> >X-Tomcat-NG: microsoft.public.access.reports
>> >
>> >I have seen this happen with reports anywhere from 200-600 pages in
>> >Access
>> >2003 running on Windows 2000 or XP.
>> >
>> >I have some simple code in the Detail_Format event of a report that
>> >either
>> >displays or hides certain text boxes.
>> >
>> >When I export the report to Word it hangs for 2.5 minutes on the Now
>> >outputting...
>> >window and then finally it will begin to output to RTF.
>> >
>> >If I preview the report with the code still there the report comes up
>> >fine
>> >as normal and then if I comment out the code it will output to RTF just

>> fine.
>> > I put a breakpoint in the Detail_Format event and it didn't even break

>> when
>> >outputting to RTF so I can't imagine why the code would cause it to have

>> such
>> >a delay.
>> >
>> >Any ideas?
>> >
>> >Ryan
>> >
>> >

>>
>>



 
Reply With Quote
 
 
 
 
Dale Dixon
Guest
Posts: n/a
 
      6th Sep 2004
Hi Ryan,

I did receive your information, thanks for the information I will use it to
reproduce your issue,
I'm presently attempting to repro and will provide feedback 09/07/2004 on
my results.

Dale

 
Reply With Quote
 
 
 
 
Dale Dixon
Guest
Posts: n/a
 
      9th Sep 2004
Hi Ryan

I'm listing below a sample of a test I performed based on the information
you provided:

Created a sample database with the following fields in a table:
* txtFirstName Text 50
* txtLastName Text 50
* txtBoldFirstName Text 50
* Attempts made with 14,000 plus and 10,000 records same results.

Created 2 reports to test :

1. OnPrint code added to the report detail section of the sample Report
=========================================
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Reports!rpt3!txtFirstName.Value = "Nancy" Then
Reports!rpt3!txtFirstName.Visible = True
Reports!rpt3!txtBoldFirstName.Visible = False
Reports!rpt3!txtLastName.Visible = True
Reports!rpt3!txtBoldLastName.Visible = False
Else
Reports!rpt3!txtFirstName.Visible = False
Reports!rpt3!txtBoldFirstName.Visible = True
Reports!rpt3!txtLastName.Visible = False
Reports!rpt3!txtBoldLastName.Visible = True
End If
End Sub

RESULTS
======
* preview of the report was satisfactory
* export to .rtf was satisfactory
* publish it to Microsoft Word was satisfactory.

2. OnFormat code added to the report detail section

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Reports!rpt3Flds!txtFirstName.Value = "Nancy" Then
Reports!rpt3Flds!txtFirstName.Visible = True
Reports!rpt3Flds!txtBoldFirstName.Visible = False
Reports!rpt3Flds!txtLastName.Visible = True
Reports!rpt3Flds!txtBoldLastName.Visible = False
Else
Reports!rpt3Flds!txtFirstName.Visible = False
Reports!rpt3Flds!txtBoldFirstName.Visible = True
Reports!rpt3Flds!txtLastName.Visible = False
Reports!rpt3Flds!txtBoldLastName.Visible = True
End If

End Sub

RESULTS
======
* preview of the report was satisfactory
* export to .rtf was satisfactory
* publish it to Microsoft Word received overflow error. once but continued
satisfacatory

Next Steps
=======
Ryan could you verify that the test performed are the steps you are also
taking also:
1. See if moving the code to the OnPrint property display the same results
2. Let me know if export to .rtf is what you are accomplishing or are you
using publish it to word in Office links.

Thanks
ddixon

 
Reply With Quote
 
Dale Dixon
Guest
Posts: n/a
 
      10th Sep 2004
Hi Ryan,

Thanks for the update, the possible solution provided was one based on
previous related issues which have been reported , related to code and
calculations in the reports format event.

You state that the print event works sufficiently, however would like to
know why the fomat event appears "checked". I'm not exactly sure I know
what you mean by appearing checked. Could you let me know what is the exact
display which indicates that the format event is checked and I will respond
to your question.

Thanks.

Dale

 
Reply With Quote
 
=?Utf-8?B?UnlhbkBuZXdzZ3JvdXBzLm5vc3BhbQ==?=
Guest
Posts: n/a
 
      11th Sep 2004
Dale,

Quick Example:
If I remove all code from the report and preview the report, the report of
course opens fine.
Then if I switch to VB Editor still with the report open and add this code:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Stop
End Sub

when I switch back to the report and click the Microsoft Word button on the
OfficeLinks toolbar I get the Now Outputting window but it does not list any
page numbers yet. After about 2.5 minutes it begins to say Now Outputting
page 1,2,etc.

The reason I say it appears "checked" is because I put the Stop command in
there but the code never breaks when outputting to Word. If I delete out the
above 3 lines of code it exports to Word right away.

Granted, this is running on a 450 MHz machine so you may not see what I am
talking about.

To recap: If the detail_format event exists, there is a large delay
outputting to word, even if there is not code in the event.

Ryan

"Dale Dixon" wrote:

> Hi Ryan,
>
> Thanks for the update, the possible solution provided was one based on
> previous related issues which have been reported , related to code and
> calculations in the reports format event.
>
> You state that the print event works sufficiently, however would like to
> know why the fomat event appears "checked". I'm not exactly sure I know
> what you mean by appearing checked. Could you let me know what is the exact
> display which indicates that the format event is checked and I will respond
> to your question.
>
> Thanks.
>
> Dale
>
>

 
Reply With Quote
 
Dale Dixon
Guest
Posts: n/a
 
      14th Sep 2004
Hi Ryan

I could not duplicate customer your concern with the "stop" comand placed
in code
1. I was able to place the stop command in code
2. I was able to successfully execute .rtf in both scenerios without issue.

Ryan it is very possible that theissue with the stop command may be because
of your environment, you might want to test in different environments you
may need to increase any number of items in his environment but I could not
be duplicated on a computer in an environment as listed below:

Windows XP SP2
Access 2003
P4 2.6 Ghz
1.0 gb RAM

Dale


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WinXP very slow to start, and very very slow starting up programs jbclem Windows XP Help 13 4th Oct 2008 07:31 PM
my pc very very very slow help me =?Utf-8?B?amFrZXRoZWd1bm5lcg==?= Windows XP General 3 18th Mar 2005 01:43 AM
RIS - very very very very very slow =?Utf-8?B?TWF0dGhldyBFbGxpcw==?= Windows XP Setup 3 6th Dec 2004 11:58 PM
Incompatability between RTF colortables of Lebans RTF2 and Access RTF export function Bas van der Doorn Microsoft Access Reports 1 29th Jul 2004 12:10 AM
IE very very very slow chef1975 Windows XP Internet Explorer 0 5th Jun 2004 12:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 AM.