Hi to all:
I have this code for a report in VB6:
When I call the report everything work well...When I make a second call a got this error in this line:Code:Set Report = New CRAXDDRT.Application Set Rpt = Report.OpenReport(App.Path & "\Ficha_Individual.rpt") If (Rpt.HasSavedData) Then Rpt.DiscardSavedData 'set the section object to the Page Header section of the report. Set oSection = Rpt.Sections("PH") For i = 1 To oSection.ReportObjects.Count If oSection.ReportObjects(i).Kind = CRAXDDRT.crOleObject Then ' if it is a CrOleObject then Set pic1 = oSection.ReportObjects(i) End If Next i Rpt.ParameterFields.GetItemByName("anilha").AddCurrentValue (FrmFicha_Aves_Mortas.Text1(1)) setviewersize CRViewer1.ReportSource = Rpt CRViewer1.ViewReport
Error:"Object doens't support this action"
I need to refresh the report or do something?Code:'set the section object to the Page Header section of the report. Set oSection = Rpt.Sections("PH")
Thanks




Reply With Quote