Solved

Printing a graph

Posted on 2000-05-11
6
226 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Accepted Solution

by:
csameer1 earned 100 total points
Comment Utility
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
Comment Utility
Answer accepted
0
 

Author Comment

by:Wicksy
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

10 Experts available now in Live!

Get 1:1 Help Now