Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4266508
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:46:12+00:00 2026-05-21T06:46:12+00:00

I need to generate a report in Crystal Reports in an application in which

  • 0

I need to generate a report in Crystal Reports in an application in which there is only a stand-alone DataSet (not connected to any type of database). Also, I need to generate a report based on the values in DataTable.

Could you please show me through, I am a newbie. I have a template, but I do not know how to generate a report from a DataTable, nor how to insert in into the templates.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:46:12+00:00Added an answer on May 21, 2026 at 6:46 am

    This article is just for you;

    Crystal Report with DataSet and DataTable using C#

    • Binding Our Report to our DataSource

      using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Data;
      using System.Drawing;
      using System.Text;
      using System.Windows.Forms;
      using System.Data.OracleClient;
      using System.IO;
      
      namespace CrystalReportWithOracle
      {
          public partial class frmMain : Form
          {
              public frmMain()
              {
                  InitializeComponent();
              }
      
              private void frmMain_Load(object sender, EventArgs e)
              {
                  my_rpt objRpt;
                  // Creating object of our report.
                  objRpt = new my_rpt();
      
                  String ConnStr = "SERVER=mydb;USER ID=user1;PWD=user1";
      
                  OracleConnection myConnection = new OracleConnection(ConnStr);
      
                  String Query1 = "select a.PROJECT_ID,a.PROJECT_NAME,b.GROUP_NAME from 
                  tbl_project a,tbl_project_group b where a.group_code= b.group_code";
      
                  OracleDataAdapter adapter = new OracleDataAdapter(Query1, ConnStr);
      
                  DataSet Ds = new DataSet();
      
                  // here my_dt is the name of the DataTable which we 
                  // created in the designer view.
                  adapter.Fill(Ds, "my_dt");
      
                  if (Ds.Tables[0].Rows.Count == 0)
                  {
                      MessageBox.Show("No data Found", "CrystalReportWithOracle");
                      return;
                  }
      
                  // Setting data source of our report object
                  objRpt.SetDataSource(Ds);
      
                  CrystalDecisions.CrystalReports.Engine.TextObject root;
                  root = (CrystalDecisions.CrystalReports.Engine.TextObject)
                       objRpt.ReportDefinition.ReportObjects["txt_header"];
                  root.Text = "Sample Report By Using Data Table!!";
      
                  // Binding the crystalReportViewer with our report object. 
                  crystalReportViewer1.ReportSource = objRpt;
              }
          }
      }
      

    EDIT: Also you should look this;

    ADO.NET Datatable as Crystal Report datasource

    How do I populate Crystal Reports, using a DataTable?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which needs to generate a report. However, I do not
I need to print PDF's generated in an asp.net application using crystal reports. Upon
I'm developing a report in Crystal Reports and need to render some math formulas
I need to generate a report which should contain a set of different mathematical
I need my App to generate a report which can be emailed. It must
For a customer we need to generate detailed test reports for integration tests which
Hello I need to generate a report which would include both data and a
I would like to achieve the following, I need to generate report for multiple
I need to generate a report where the user can choose All Issues, Open
i will need to generate a report based on user input for every food

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.