Solved

Printing a graph

Posted on 2000-05-11
6
228 Views
Last Modified: 2008-02-26
I am using Pinnacle-BPS Graph Control. In the properties, I can either Copy, Print or Write. The Copy and Write actions work fine - but it does not print. The screen gives a quick flick as though something is happening, but does not print.

I know I can print using FormPrint, but I should be able to get better resoultion using the control (as they say) and it should work!  Any suggestions?
0
Comment
Question by:Wicksy
6 Comments
 
LVL 27

Expert Comment

by:Ark
ID: 2802559
Hi
Haven't this control, so some common advices:
Try to initialize printer before printing:
Printer.Print ""
Which parameters do you pass to Print method?
Cheers
0
 

Author Comment

by:Wicksy
ID: 2809395
Printer.Print "" has made no difference. To make the graph print, one sets the DRAWMODE=5 and that's it. To copy to the clipboard, DRAWMODE is set to 4 (and this works fine).
0
 

Expert Comment

by:leveller225
ID: 2827911
hello

i've used the Pinnacle-BPS Graph Control and never recall having had any problems.  this code seemed to work ok.

' set paper orientation
Printer.Orientation = vbPRORLandscape
printer.FontTransparent = False
Printer.Font = ""
Printer.Print
Printer.ScaleMode = Twips
' print info for control
frmFTMain.graphFractures.PrintInfo(1) = Printer.hDC
frmFTMain.graphFractures.PrintInfo(6) = Printer.ScaleLeft
frmFTMain.graphFractures.PrintInfo(7) = Printer.ScaleTop
frmFTMain.graphFractures.PrintInfo(8) = Printer.ScaleWidth
frmFTMain.graphFractures.PrintInfo(9) = Printer.ScaleHeight
frmFTMain.graphFractures.PrintInfo(2) = 1.25 * 1440             ' x coord top left of graph
frmFTMain.graphFractures.PrintInfo(3) = 1.75 * 1440             ' y coord top left of graph
frmFTMain.graphFractures.PrintInfo(4) = 8 * 1440                ' graph width
frmFTMain.graphFractures.PrintInfo(5) = 6 * 1440                ' graph height
' print mode
If gColorPrintMode = False Then
frmFTMain.graphFractures.PrintStyle = G_MONO                 ' 0
    Else
frmFTMain.graphFractures.PrintStyle = G_COLOR                ' 1
End If
' setup fonts
frmFTMain.graphFractures.FontUse = 0
frmFTMain.graphFractures.FontSize = 75
frmFTMain.graphFractures.FontUse = 1
frmFTMain.graphFractures.FontSize = 50
frmFTMain.graphFractures.FontUse = 2
frmFTMain.graphFractures.FontSize = 50
frmFTMain.graphFractures.FontUse = 3
frmFTMain.graphFractures.FontSize = 50
' send graph
frmFTMain.graphFractures.DrawMode = G_PRINT                     ' 5
Printer.EndDoc

good luck
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Accepted Solution

by:
csameer1 earned 100 total points
ID: 2843576
i have not used that control before.

For charting may i suggest teechart control from www.teemach.com,you dont need to code for print preview,print,save,recall etc

Another method i have used before (mscharts if i remember right)is copying the chart onto the clipboard and PaintPicture it onto the printer or image/pic controls to printer.
0
 

Author Comment

by:Wicksy
ID: 2857313
Answer accepted
0
 

Author Comment

by:Wicksy
ID: 2857314
Thanks for your help everyone, I think the problem was in the control. I managed to get an upgrade and this fixed the problem ....!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA Excel: fill / replace values based on a config sheet. 5 61
VBA/SQL - Connect to SQL server and pull data 4 87
Adding to a VBA? 6 59
using web browser with BING 40 110
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now