|
-
Aug 16th, 2006, 12:38 PM
#1
Thread Starter
Junior Member
Print a report in vb 6.0 after a stored procedure is executed
Hello I have a question about how to print a crystal reports from vb6.0
Form1.crtRpt.Connect = "DSN=dsn;UID=sa;PWD=pwd;DSQ=Admin"
Form1.crtRpt.StoredProcParam(0) = 2
Form1.crtRpt.ReportFileName = "C:\MyDocuments\BarCode.rpt"
Form1.crtRpt.Destination = crptToPrinter
Form1.crtRpt.Action = 1
this works fine.. but I want to print the report after a stored procedure is executed..
sQuery = " {call spGeneraTicket(?) } "
Set RdPrepst = gConn(0).CreatePreparedStatement("", sQuery)
RdPrepst.rdoParameters(0) = ticketID
Set rdResultado = RdPrepst.OpenResultset
nombreForma.crtRpt.StoredProcParam(0) = ticketID
nombreForma.crtRpt.ReportFileName = "C:\My Documents\BarCode.rpt"
nombreForma.crtRpt.Destination = crptToPrinter
nombreForma.crtRpt.Action = 1
but I get an error on the StoredProcParam(0) it's says object not supported..
thanx for your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|