Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

help please

$
0
0

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared ;


public partial class _Default : System.Web.UI.Page
{
private ReportDocument rD = new ReportDocument();
private static string _connString = @"Data Source=.\zohaibsqlserver; Initial Catalog=SampleDB; Uid=sa; password=Programmer;";
public static DataSet LoadReport()
{
SqlConnection myConn = new SqlConnection(_connString);
SqlDataAdapter da = new SqlDataAdapter("Select * from Customer_Orders", myConn);
myConn.Open();
DataSet ds = new DataSet();
da.Fill(ds);
myConn.Close();
return ds;
}
protected void Page_Load(object sender, EventArgs e)
{

DataSet ds = LoadReport();
if (ds != null && ds.Tables.Count > 0)
{
rD.Load(Server.MapPath("CrystalReport.rpt"));
rD.SetDataSource(ds);
CRView.ReportSource = rD;

CRView.RefreshReport();
}
}
}

help with this code when I run the website there is no sign of repoting :(


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>