Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Error in CR Post Reply Post New Topic
Author Message
sacramento
Newbie
Newbie


Joined: 01 Oct 2008
Location: Portugal
Online Status: Offline
Posts: 19
Quote sacramento Replybullet Topic: Error in CR
    Posted: 25 Oct 2008 at 2:55pm
Hi to all:
 
Hi have this code to print a report without see the report:
 
Private Sub Command11_Click()
 
Dim rpt As CRAXDRT.Report
Set Report = New CRAXDRT.Application
Set rpt = Report.OpenReport(App.Path & "\Ficha_Inscricao.rpt")
If (rpt.HasSavedData) Then rpt.DiscardSavedData
 
rpt.EnableParameterPrompting = False
nomeclube = frmopcoesgerais.Text5(1).Text
morada = (frmopcoesgerais.Text5(2).Text) + "  " + (frmopcoesgerais.Text5(3).Text) + "  " + (frmopcoesgerais.Text5(4).Text)
nomeexposicao = frmopcoes.Text1(8).Text
dataexposicao = frmopcoes.Text1(10).Text

Dim myTextObject As CRAXDRT.TextObject
Set myTextObject = rpt.Sections("PH").ReportObjects("Text1")
myTextObject.SetText (nomeclube)

rpt.ParameterFields.GetItemByName("secao1").AddCurrentValue (frmgestaoexposicao.Combo2(1))
rpt.ParameterFields.GetItemByName("secao2").AddCurrentValue
 
CRViewer1.ReportSource = rpt
rpt.PrintOut False
End Sub
 
I can print the report just one time,because the second time,i try to print,i got this error:
 
Run time error:
Method 'ReportSource' of object  'ICrystalreportviewer11' failed
 
 
Anyone know why this happen?
 
Thanks
 
 


Edited by sacramento - 25 Oct 2008 at 2:56pm
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.