In the code below i have i am cycling all objects of the report. All textbox work ok i can change the text at runtine no problem my problem is when i try access a field object it never enter the code section to hide it...
VB Code:
Dim crreportobject As CrystalDecisions.CrystalReports.Engine.ReportObject For Each crreportobject In crReportDocument.ReportDefinition.ReportObjects If TypeOf (crreportobject) Is CrystalDecisions.CrystalReports.Engine.TextObject Then Dim crtextobject As CrystalDecisions.CrystalReports.Engine.TextObject If Trim(crreportobject.Name) = "Text8" Then crtextobject = DirectCast(crreportobject, CrystalDecisions.CrystalReports.Engine.TextObject) crtextobject.Text = "Lista Condensada de Componentes para Electrificação da Encomenda" End If If TypeOf (crreportobject) Is CrystalDecisions.CrystalReports.Engine.FieldObject Then '' << never true?? Dim field As CrystalDecisions.CrystalReports.Engine.FieldObject If Trim(field.Name) = "Field16" Then field = DirectCast(field, CrystalDecisions.CrystalReports.Engine.FieldObject) field.ObjectFormat.EnableSuppress = False End If End If End If Next
Regards
Jorge




Reply With Quote