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. C#
  4. Crystal Reports single field

Crystal Reports single field

Scheduled Pinned Locked Moved C#
tutorialquestion
2 Posts 1 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.
  • S Offline
    S Offline
    StyrofoamSUV
    wrote on last edited by
    #1

    Hey all. I am new to Crystal Reports and was wondering of someone could give me a hand involving adding single data fields to a report. What I mean by this is, I have a DataSet that contains all the fields I want per row, however, I also want a generic field that does not pertain to the row. For example, I have a DataSet whose Table name is "Person" and contains the entities, Name, Age, Sex, etc... What I want to add to the report, aside from the rows containing Name, Age, and Sex, is a data field at the top that is user-defined. Perhaps I want to put "Goo goo ga ga" at the top of the report. Instead of having to add an entity to the DataSet, can I define a field in the report, place the field on the report somewhere, and edit it via my code? I hope you understand what I mean. Thanks! -Josh

    S 1 Reply Last reply
    0
    • S StyrofoamSUV

      Hey all. I am new to Crystal Reports and was wondering of someone could give me a hand involving adding single data fields to a report. What I mean by this is, I have a DataSet that contains all the fields I want per row, however, I also want a generic field that does not pertain to the row. For example, I have a DataSet whose Table name is "Person" and contains the entities, Name, Age, Sex, etc... What I want to add to the report, aside from the rows containing Name, Age, and Sex, is a data field at the top that is user-defined. Perhaps I want to put "Goo goo ga ga" at the top of the report. Instead of having to add an entity to the DataSet, can I define a field in the report, place the field on the report somewhere, and edit it via my code? I hope you understand what I mean. Thanks! -Josh

      S Offline
      S Offline
      StyrofoamSUV
      wrote on last edited by
      #2

      Figured out how to do this incase anyone is interested. 1) Add a Text object to your report by right-clicking on the report and selecting Insert->Text Object 2) Set the Name of the object in the Properties window 3) Note the Page Header Section the object resides in 4) CrystalDecisions.CrystalReports.Engine.TextObject myObject = (CrystalDecisions.CrystalReports.Engine.TextObject)theReportClassInstance.theSectionNumber.ReportObjects[ "theObjectName" ]; myObject.Text ="whatever i want"; cheers

      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