ActiveReports 2.0 (Visual Basic 6.0) Support

Started by dougs at 10-01-2007 5:56 PM. Topic has 19 replies.

Print Search Rate
Sort Posts:    
   10-01-2007, 5:56 PM
dougs is not online. Last active: 10/31/2007 3:25:27 AM dougs

Not Ranked
Joined on 09-02-2004
Posts 12
Print Preview is blank most of the time.
We have a customer with a HP Laserjet 1020 USB printer. The latest drivers have been installed from HP's web site. When they try to run a report sometimes it shows up in the print preview screen but most of the time it doesn't. And even when it doesn't show up in the preview screen, it might show that there are 21
pages on the top of the preview screen and when clicking on the print button, the 21 pages print out even though the preview screen is blank. On this same computer
another printer connected to LPT1 has the same problem.

This code works fine on hundreds of other computers.

the code is simple

Dim rpt As DDActiveReports2.ActiveReport
'arv is an ARViewer2 control

'Run the new report
rpt.Run False

'Add the report to the veiwer
arv.ReportSource = rpt
arv.refresh

I've also uninstalled the LPT1 printer so only the USB printer is attached.

Thanks for any help.

Doug
   Report 
   10-02-2007, 11:09 AM
ZachB is not online. Last active: 12/16/2008 12:29:57 AM ZachB

Top 10 Posts
Joined on 06-05-2007
Ohio
Posts 1,593

DDStaff
Re: Print Preview is blank most of the time.
I am unsure that this error would be influenced at all by the printer the computer is using.  One way to check would be to try previewing  a report without using a printer.  You could either remove all the printers installed on the computer (you'll receive an error dialog when the report runs, but it will execute properly), or place the following code in the Report Start event of your report:

me.Printer.DeviceName = ""

This will use the default internal printer of AR and not the LaserJet drivers.  Please try previewing the report using the default printer and let me know the results.

   Report 
   10-03-2007, 12:53 PM
dougs is not online. Last active: 10/31/2007 3:25:27 AM dougs

Not Ranked
Joined on 09-02-2004
Posts 12
Re: Print Preview is blank most of the time.
ZachB:

Thanks for the response.

I tried using the virtual print mode which was also the recommendation of Data Dynamics as follows:

rpt.Printer.DeviceName = ""
rpt.Run

It didn't make any difference.

I also tried installing a generic printer driver for a printer that isn't attached. This would let me preview the reports but then when I set the default printer back to an attached printer it wouldn't work. And once I tried using an attached printer if I went back to the generic driver for the non-existent printer that would also not work.

   Report 
   10-03-2007, 2:59 PM
ZachB is not online. Last active: 12/16/2008 12:29:57 AM ZachB

Top 10 Posts
Joined on 06-05-2007
Ohio
Posts 1,593

DDStaff
Re: Print Preview is blank most of the time.
Are you able to reproduce this behavior with a test application?  Try running the attached sample program and use the print preview option. 

When you say the print preview appears blank, what do you mean by this?  Are you able to see the report viewer?  Is the report showing up inside the viewer blank?  Would it be possible to provide a screenshot of this behavior?

   Report 
   10-03-2007, 3:55 PM
dougs is not online. Last active: 10/31/2007 3:25:27 AM dougs

Not Ranked
Joined on 09-02-2004
Posts 12
Re: Print Preview is blank most of the time.

Attachment: Empty Preview.gif
I don't see an attached sample program.

Attached is a simulation of what the customer sees on his screen. It shows the viewer and it shows 1/21 for the number of pages but you see the viewer is empty, you don't even see a blank page. If the customer clicks on the print button all 21 pages of the actual report will print out.

   Report 
   10-03-2007, 4:31 PM
ZachB is not online. Last active: 12/16/2008 12:29:57 AM ZachB

Top 10 Posts
Joined on 06-05-2007
Ohio
Posts 1,593

DDStaff
Re: Print Preview is blank most of the time.

Attachment: Diamond Reports.zip
Sorry for missing the attachment.  Here it is.

   Report 
   10-18-2007, 1:45 PM
dougs is not online. Last active: 10/31/2007 3:25:27 AM dougs

Not Ranked
Joined on 09-02-2004
Posts 12
Re: Print Preview is blank most of the time.
I couldn't run the sample program you sent on the customers computer because it uses dlls he doesn't have and I don't want to write an installation program to register unneeded dlls. One new development is that the customer discovered that even the preview screen is empty he can export the report to pdf format where he can finally see the report and he can also print it out from there. I'm stumped.
   Report 
   10-19-2007, 10:44 AM
ZachB is not online. Last active: 12/16/2008 12:29:57 AM ZachB

Top 10 Posts
Joined on 06-05-2007
Ohio
Posts 1,593

DDStaff
Re: Print Preview is blank most of the time.
Would it be possible for you to provide an RDF file from this report that won't load into the viewer.  I would like to see if it is the actual report which is created has any problems, or if for some reason the viewer control is at fault.  You can use the following code to save an RDF file:

rptRDFs.Pages.Save App.Path & "\SavedRDF.RDF"

http://www.datadynamics.com/Help/AR2Std/HX_Saving_And_Loading_RDF_Files.html


   Report 
   02-04-2008, 5:50 AM
Bjørnar is not online. Last active: 2/4/2008 5:45:33 PM Bjørnar

Not Ranked
Joined on 02-04-2008
Posts 6
Re: Print Preview is blank most of the time.
Hello

I have exactly the same problem for one of our customers.
The preview works when I connect using my computer, but from several computers at one customer the preview do not work.
Nothing appears in the grey area of the preview window.
Export and print from the preview window works.

Did you find any solution on this problem?

   Report 
   02-04-2008, 11:20 AM
ZachB is not online. Last active: 12/16/2008 12:29:57 AM ZachB

Top 10 Posts
Joined on 06-05-2007
Ohio
Posts 1,593

DDStaff
Re: Print Preview is blank most of the time.
Have you tried the suggestions which were made previously in this thread?

Can you provide a sample application which reproduces this behavior?

Could you please provide an RDF file of your report?

   Report 
   02-05-2008, 8:44 AM
Bjørnar is not online. Last active: 2/4/2008 5:45:33 PM Bjørnar

Not Ranked
Joined on 02-04-2008
Posts 6
Re: Print Preview is blank most of the time.

Attachment: word and rdf file.zip
Hello

I am able to reproduce the problem on my customer’s computer using the Diamond reports example program.
See attached word document.
From this application I did also save an RDF file (attached)

There is only one of hundred customers that have this problem. All have installed the application with the same installation program.

   Report 
   02-05-2008, 11:55 AM
ZachB is not online. Last active: 12/16/2008 12:29:57 AM ZachB

Top 10 Posts
Joined on 06-05-2007
Ohio
Posts 1,593

DDStaff
Re: Print Preview is blank most of the time.
Thank you for providing the step by step instructions.  Unfortunately, I was unable to reproduce this behavior on my machine.  Also, you mentioned that this is the only customer experiencing this behavior.  It is likely that this a configuration issue on this customers machine.  Another possibility is a version conflict on the customer's machine.  I would search the customer's computer and see if you are able to find different versions of ActiveReports dlls.  Version conflicts can cause strange behavior and could be the cause of this issue.

Also, what build of ActiveReports are you currently using in your application?  If you are not using the most current build available, I would recommend upgrading to it.  The download can be found here: http://www.datadynamics.com/forums/37/ShowForum.aspx

   Report 
   02-06-2008, 12:27 AM
via is not online. Last active: 11/16/2009 7:53:32 AM via

Top 25 Posts
Joined on 08-28-2004
Posts 652
Re: Print Preview is blank most of the time.
---
   Report 
   02-06-2008, 12:29 AM
via is not online. Last active: 11/16/2009 7:53:32 AM via

Top 25 Posts
Joined on 08-28-2004
Posts 652
Re: Print Preview is blank most of the time.
---
   Report 
   02-06-2008, 10:53 AM
Bjørnar is not online. Last active: 2/4/2008 5:45:33 PM Bjørnar

Not Ranked
Joined on 02-04-2008
Posts 6
Re: Print Preview is blank most of the time.
Hello

I have checked all the dll's at the customer machine and they are the same as mine dll's.

We use version (arpro2.dll) 2.0.0.1176

There is nothing I can do to find the reason that this is not working?

There is no .run in the example code. I tried to add devicname = "" anyway, but with the same result.

The code is like this:
Private Sub ViewPreview()
On Error GoTo ehViewPreview
Set m_rpt = Nothing
Set m_rpt = New ActiveReport
ard.SaveToObject m_rpt

m_rpt.ResetScripts
m_rpt.AddNamedItem "vbo", m_vbo
m_rpt.AddNamedItem "dbg", m_Debug

m_rpt.AddCode ScriptCode()

m_rpt.ScriptDebuggerEnabled = True
m_rpt.Printer.DeviceName = "" 'TEST 2008-02-06
Set arv.ReportSource = m_rpt

UpdateToolbars
UpdateMenus
Exit Sub

ehViewPreview:
MsgBox Str(Err.Number) & " - " & Err.Description, vbOKOnly, "Error: ViewPreview"
End Sub
   Report 
  Page 1 of 2 (20 items) 1 2 >
GrapeCity » Product Support » ActiveReports 2... » Print Preview is blank most of the time.

Privacy Policy | Copyright © 1997-2010 - GrapeCity, inc.