Print Page | Close Window

[SOLVED]An exception occurs when printing a report

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19333
Printed Date: 27 November 2024 at 1:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED]An exception occurs when printing a report
Posted By: kaliand
Subject: [SOLVED]An exception occurs when printing a report
Date 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.



Replies:
Posted By: ABuenger
Date 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


Posted By: kaliand
Date 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


Posted By: Willowmaster
Date 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





Posted By: SuperMario
Date 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?


Posted By: Willowmaster
Date 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





Posted By: kaliand
Date 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!





Posted By: SuperMario
Date 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.


Posted By: SuperMario
Date 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


Posted By: SuperMario
Date 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"


Posted By: kaliand
Date 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.


Posted By: SuperMario
Date Posted: 12 January 2012 at 2:27am
Is this solved?


Posted By: kaliand
Date 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.


Posted By: ABuenger
Date 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


Posted By: Willowmaster
Date 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






Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net