Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED]An exception occurs when printing a report
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED]An exception occurs when printing a report

 Post Reply Post Reply
Author
Message
kaliand View Drop Down
Groupie
Groupie


Joined: 15 December 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote kaliand Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED]An exception occurs when printing a report
    Posted: 20 December 2011 at 10:35am
Hi,
I bought 2 license of suite, version 15.0.2, and i'm having problems on a client machine (win xp SP3) when i try to print a report.

The report controls works fine, no problems at all with the control, but when i try to print the report :
     
      With AxReportControl1.PrintOptions
            .Header.TextLeft = m_clsReport.ReportTitle
            .Header.Font.Size = 14
            .Header.Font.Name = "Calibri"
            .Header.Font.Bold = True

            .RepeatFooterRows = True
            AxReportControl1.PrintPreview(True)
        End With

the application crashes...

any idea??
thank you very much

kind regards.
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2011 at 11:16am
Hi,

printing has been hugely improved for 15.1.3, so please update to the current version.

Andre

Codejock support
Back to Top
kaliand View Drop Down
Groupie
Groupie


Joined: 15 December 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote kaliand Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2011 at 12:36pm
Hi Andre,
have i to pay again for the update? it should work in the version i paid...

regards
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2011 at 3:10am
I have this too with the 15.2.1 controls. When I cancel the printer selection dialog my application crashes whenever I try to access the printview. Error message: Method 'PrintView' of object '_DPrintPreview' failed. This occures also in the Ribbonsample.
The printers installed are:
   Generic Text only (Default)
   Microsoft XPS Document Writer
Operation system:
   Windows XP SP3
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2012 at 12:55pm
I tried your code as far back as 15.0.1 in vb6 and .NET and don't see the crash.  Can you upload a test project modifying one of our samples?
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 2:39am
Well. It happens when you use the ribbonsample. Just klik on print->print button. Second time you try to open the print backstage it crashes. At least with me. Wat do you want me to do? Strip the ribbonsample until only the print option is there? I can do that if you want me to.
Worst case scenario: I'll zip my virtual machine and send it over. :)
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
kaliand View Drop Down
Groupie
Groupie


Joined: 15 December 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote kaliand Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 4:03am
Hi SuperMario,

The error occurs in all client's pc, not only in one, and works fine in the too machines which have installed the suite.

error:
"System.IO.FileNotFoundException: Could not load file or assembly 'stdole, Version = 7.0.3300.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a' or one of its dependencies. The system can not find the file specified.
File name: 'stdole, Version = 7.0.3300.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'
"

i paste you a screenshoots of the error

This srceen shoot shows a form with the report control running without any problem on the client machine:



the next one shows the error that occurs when the client try to print in preview mode.



the code used is in the first post of this thread.
it seems there is a problem with stdole file.

any sugestion?

regards!



Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 10:24am
Thanks Willow, we agree on the ribbon sample and that is getting addressed now.  However we are still trying to reproduce the report print preview bug so we can fix it.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 12:38pm
This is the ONLY code executed when that button is clicked?  Does it happen on Win7?

     With AxReportControl1.PrintOptions
            .Header.TextLeft = m_clsReport.ReportTitle
            .Header.Font.Size = 14
            .Header.Font.Name = "Calibri"
            .Header.Font.Bold = True

            .RepeatFooterRows = True
            AxReportControl1.PrintPreview(True)
        End With
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 12:47pm
Try this:

1.  Right click on the stdole.dll in the reference section of project and select local copy true. By default it will be false.  This will tell the application not to get it from the GAC.
2.  Add the file to your application.  In your setup application, go to View->Editor->File System.  In the pane that opens up, right click and select Add->Assembly.  Go to the following location:C:\Program Files\Microsoft.NET\Primary Interop Assemblies and select stdole.dll.

Or you can try to manually install stdole.dll in the GAC. For example, running the following single line command from an elevated command prompt:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" -i "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\PublicAssemblies\stdole.dll"
Back to Top
kaliand View Drop Down
Groupie
Groupie


Joined: 15 December 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote kaliand Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 1:20pm
Hi SuperMario,
i will prove its last recommendation.

Answering to your first and second question :
1- Yes
2- the OS on the clients machine is win XP service pack 3

Thanks!!
regards.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 12 January 2012 at 2:27am
Is this solved?
Back to Top
kaliand View Drop Down
Groupie
Groupie


Joined: 15 December 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote kaliand Quote  Post ReplyReply Direct Link To This Post Posted: 12 January 2012 at 3:30am
Hi SuperMario,

Yes, this is solved. i used the first solution, adding the stdole assembly to the project.
Now the print preview runs without problems.

thanks for your attention.
regards.
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2012 at 8:29am
Originally posted by Willowmaster Willowmaster wrote:

Well. It happens when you use the ribbonsample. Just klik on print->print button. Second time you try to open the print backstage it crashes. At least with me. Wat do you want me to do? Strip the ribbonsample until only the print option is there? I can do that if you want me to.
Worst case scenario: I'll zip my virtual machine and send it over. :)


Hi,

the print preview issues have been fixed for the next release.

Andre

Codejock support
Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2012 at 9:49am
That's great! Thanks!
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.