Hi to all:
I have this little lines of code to write in the report,but the report don't show the text,given in the instruction:
Any error in the code or something missing?Code:Private Sub Form_Load() Dim Rptapp As New CRAXDRT.Application Dim Rpt As CRAXDRT.Report Dim formula As CRAXDRT.FormulaFieldDefinition Set Rptapp = New CRAXDRT.Application Set Rpt = Rptapp.OpenReport("F:\Projectos VB\NORWIN\decl.ivapoc.rpt") 'The text "Declaracao" is that I want to put in the formula For Each formula In Rpt.FormulaFields If formula.Name = "{@C_002}" Then formula.Text = "'Declaracao'" End If Next setviewersize CRViewer1.ReportSource = Rptapp.OpenReport("F:\Projectos VB\NORWIN\decl.ivapoc.rpt") CRViewer1.ViewReport end sub ========================================================= Private Sub Form_Resize() setviewersize End Sub ========================================================= Private Sub setviewersize() CRViewer1.Width = FrmDeclaracaoIVA.Width - 500 CRViewer1.Height = FrmDeclaracaoIVA.Height - 400 End Sub ==========================================================
Thanks




Reply With Quote