Hi! I'm using Crystal Report 9. i have a problem in printing record.. when i save new record and print, it's fine! If i delete record and add a new one, still the report will print the older record..
Example: i add "ATZ" as a new record in my database then print 'OK!
then i want to clear my database and add again... so the record is deleted..
then i add "TAZ" as a new record in my database the print. the problem here is instead of "TAZ" will print still "ATZ" will comeout to the printer.
can anybody help me what is the code for this prob so that i can refresh my report. so that it will print my new record. thanks for the help...CR.Referesh=True
CrRpt.DiscardSavedData=True|||Thank you so much for your help! now i got it
How bout in this code. what i want is when i click the Print button. it will already print without prompting me. in my code when i click print, it will prompt me a message "Printer" then choose Print all or Slection...
and about printer destination without using crviewer91 control. just MyReport only. thank in advance :)
'***********************
here's my Code
Option Explicit
Dim MyReport as New CrystalReport1
Private Sub Print_CLick()
MyReport.DiscardSavedData ' = True
Set Printer = Printers(Combo1.ListIndex)
MyReport.SelectPrinter Printer.DriverName, Printer.DeviceName, Printer.Port
MyReport.PaperOrientation = crDefaultPaperOrientation
MyReport.PaperSize = crDefaultPaperSize
MyReport.PrintOut
End Sub|||Do you want to suppress the prompting?|||Yes! that's what i mean! to supress when my destination is direct to printer.
and how bout the code of creating printing destination? Thanks Madhi for the help :)|||Yes! that's what i mean! to supress. direct to printer.
and how bout the code of creating printing destination? Thanks Madhi for the help :)|||Myreport.EnablePopupMenu = False|||Hi again! :) I did! but there's and error message will apear. the message is like this "Compile Error : Method or Member Data not found" that's the error.
My Code**************
MyReport.DiscardSavedData ' = True
Set Printer = Printers(Combo1.ListIndex)
MyReport.SelectPrinter Printer.DriverName, Printer.DeviceName, Printer.Port
MyReport.PaperOrientation = crDefaultPaperOrientation
MyReport.PaperSize = crDefaultPaperSize
MyReport.EnablePopupMenu=False 'Error when i type MyReport.Enable--> No Enable PopupMenu will appear in Popup.
MyReport.EnableSelectDistinctRecords = False 'I try this also nothing happens
MyReport.EnableParameterPrompting = False 'I try this also nothing happens
MyReport.PrintOut
ATz|||CR..EnablePopupMenu = False
where CR is the Crystal Report Viewer.
Showing posts with label print. Show all posts
Showing posts with label print. Show all posts
Monday, February 20, 2012
New Crystal Report Question
Hi guyz! i have a problem with my crystal report 9. im using vb6 in win xp. my prob is when i print my report in second attempt it will just eject the paper without print. but in first, its fine..
here's my code:
MyReportPrintCheck.DiscardSavedData
Set printer = Printers(cmbprinter.ListIndex)
MyReportPrintCheck.SelectPrinter printer.DriverName, printer.DeviceName, printer.Port
MyReportPrintCheck.PaperOrientation = crDefaultPaperOrientation
MyReportPrintCheck.PaperSize = crPaperLetter
MyReportPrintCheck.PrintOut False <-- i think the "False" here is the problem because when i remove the false it will print though it will take time coz it will prompt me a message if i will print all or selection..thats why i put "False" here so that when i click the Print button.. it will automatically print. can anyone help me?
Set MyReportPrintCheck = Nothing
i really appreciate ur reply...
atzMake sure the second page is not empty|||yes, my second report is already empty... but still it will never print... it still eject the paper... when i install my vb6 and cr9 in win 98 and try, it works fine! but when i transfer, i mean install it in win xp. there goes the problem... i think mybe there something with my code... can you give me an example? thanks for your reply... :)
here's my code:
MyReportPrintCheck.DiscardSavedData
Set printer = Printers(cmbprinter.ListIndex)
MyReportPrintCheck.SelectPrinter printer.DriverName, printer.DeviceName, printer.Port
MyReportPrintCheck.PaperOrientation = crDefaultPaperOrientation
MyReportPrintCheck.PaperSize = crPaperLetter
MyReportPrintCheck.PrintOut False <-- i think the "False" here is the problem because when i remove the false it will print though it will take time coz it will prompt me a message if i will print all or selection..thats why i put "False" here so that when i click the Print button.. it will automatically print. can anyone help me?
Set MyReportPrintCheck = Nothing
i really appreciate ur reply...
atzMake sure the second page is not empty|||yes, my second report is already empty... but still it will never print... it still eject the paper... when i install my vb6 and cr9 in win 98 and try, it works fine! but when i transfer, i mean install it in win xp. there goes the problem... i think mybe there something with my code... can you give me an example? thanks for your reply... :)
Subscribe to:
Posts (Atom)