Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. CrystalViewer Formula Field in VB.net

CrystalViewer Formula Field in VB.net

Scheduled Pinned Locked Moved Visual Basic
csharptutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tasnim
    wrote on last edited by
    #1

    hi,,, I want to pass a value in a formula field in my report(Crystal Report 9) through Front-End. I am using CrystalReportViewer. Like in Vb 6.0 we used to write CrystalReport1.formulafields.item("formulaname").text = FormulaValue How to do this using vb.net and Crystalreportviewer??? thx Tasnim:zzz:

    J 1 Reply Last reply
    0
    • T Tasnim

      hi,,, I want to pass a value in a formula field in my report(Crystal Report 9) through Front-End. I am using CrystalReportViewer. Like in Vb 6.0 we used to write CrystalReport1.formulafields.item("formulaname").text = FormulaValue How to do this using vb.net and Crystalreportviewer??? thx Tasnim:zzz:

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      Something quite similar:

      Dim rd As New ReportDocument
      rd.Load("c:\MyReport.rpt")
      rd.DataDefinition.FormulaFields.Item("FieldName").Text = "..."
      crv.ReportSource = rd

      What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

      T 1 Reply Last reply
      0
      • J John Kuhn

        Something quite similar:

        Dim rd As New ReportDocument
        rd.Load("c:\MyReport.rpt")
        rd.DataDefinition.FormulaFields.Item("FieldName").Text = "..."
        crv.ReportSource = rd

        What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

        T Offline
        T Offline
        Tasnim
        wrote on last edited by
        #3

        Thanks for your reply, But I am not using any Report Document. I have Crystal Report Viwer object on a form, and i am passing the reportsource through another form. My code is as below. Dim frm As New frm_reportviewer() ''' form which contains crviewer frm.CrViewer.ReportSource = Application.StartupPath & "\reports\rep_EFileStatusReport.rpt" frm.Show() What is the property of CrViewer to pass FormulaFields??? I am not getting it? thanks Tasnim

        D J 2 Replies Last reply
        0
        • T Tasnim

          Thanks for your reply, But I am not using any Report Document. I have Crystal Report Viwer object on a form, and i am passing the reportsource through another form. My code is as below. Dim frm As New frm_reportviewer() ''' form which contains crviewer frm.CrViewer.ReportSource = Application.StartupPath & "\reports\rep_EFileStatusReport.rpt" frm.Show() What is the property of CrViewer to pass FormulaFields??? I am not getting it? thanks Tasnim

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          With a little research, it looks like your going to have to use a ReportDocument in order to do what you want. You create a ReportDocument using the code in the previous post, then pass the document to the CrystalReportViewer.ReportSource property so it can be viewed. Read the example given a little closer and you'll find your solution. RageInTheMachine9532

          1 Reply Last reply
          0
          • T Tasnim

            Thanks for your reply, But I am not using any Report Document. I have Crystal Report Viwer object on a form, and i am passing the reportsource through another form. My code is as below. Dim frm As New frm_reportviewer() ''' form which contains crviewer frm.CrViewer.ReportSource = Application.StartupPath & "\reports\rep_EFileStatusReport.rpt" frm.Show() What is the property of CrViewer to pass FormulaFields??? I am not getting it? thanks Tasnim

            J Offline
            J Offline
            John Kuhn
            wrote on last edited by
            #5

            Yeah, what Dave said. You're not using the ReportDocument object, but you need to in order to access the FormulaFields collection. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups