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 .NET

Crystal Reports .NET

Scheduled Pinned Locked Moved C#
csharpdatabasehelpquestion
2 Posts 2 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
    SignMan359
    wrote on last edited by
    #1

    I have a situation where I have a Crystal Report pulling data from a database and I want to be able to check a couple of things in the report to determine that it should be printed. Is there a way to pull data out of some fields in the report for verification before printing, or do I have to do a seperate database query in C# to validate such info? If anybody could help me, it'd be appreciated. I've checked MSDN, BusinessObjects, and all the programming sites I can think of to no avail. --In a world without fences, who needs Gates?

    H 1 Reply Last reply
    0
    • S SignMan359

      I have a situation where I have a Crystal Report pulling data from a database and I want to be able to check a couple of things in the report to determine that it should be printed. Is there a way to pull data out of some fields in the report for verification before printing, or do I have to do a seperate database query in C# to validate such info? If anybody could help me, it'd be appreciated. I've checked MSDN, BusinessObjects, and all the programming sites I can think of to no avail. --In a world without fences, who needs Gates?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      SignMan359, An alternative would be to get a DataSet yourself using a DataAdapter derivative (like a SqlDataAdapter) and use that to populate the report by calling ReportDocument.SetDataSource. When designing your report, you can bind against an strongly typed ADO.NET DataSet. Read Reporting off ADO.NET Datasets[^] for details. This would allow you, then, to get the DataSet, check any rows in tables you want, then decide whether or not to instantiate your ReportDocument-derivative that you've designed, set the data source, and display it. This way you can also control whether the report and report viewer are even instantiated in the first place. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

      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