Results 1 to 5 of 5

Thread: [RESOLVED]Problem in write values in Report

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Resolved [RESOLVED]Problem in write values in Report

    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:

    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
    
    ==========================================================
    Any error in the code or something missing?

    Thanks
    Last edited by sacramento; Feb 28th, 2008 at 01:46 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width