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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment