
CRYSTAL REPORT HELP NEEDED FOR NEWBIE
Quote:
>I am trying to print a report whereby a user just clicks a command button and a
> specified Crystal report will
>print. The report is called pers.rpt.
>I have tried reading the docs and the help files but I am having trouble
> understanding the guidance. I have
>tried adding the report control but do not know the code to insert into the
> command button procedure to get it
>to work. Please be patient...this is the first time I have tried this. I have
> added the "GLOBAL.BAS" to my
>project already.
>Regards
>JW
Here is an example to help you along:
If (Ask("OK to print quotation?", 2) And WorkSaved) Then
Screen.MousePointer = 11
Report1.ReportFileName = "c:\vb\quote\quote.rpt"
Report1.SelectionFormula = "{Job.JobNum} = " & JobNumber
Report1.CopiesToPrinter = 2
Report1.Destination = 1
Report1.Action = 1
Screen.MousePointer = 0
Else
MsgBox "Work must be saved before printing can proceed!"
End If
(above code comes from one of my applications)
Harry Strybos :-{>
___________________________________________________________
"I prefer to die peacefully in my sleep like my grandfather
not screaming in terror like his passengers"
___________________________________________________________