TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hardik Patel
NA
378
467.2k
error in code for crystal report in vs 2010
Oct 18 2013 7:43 AM
i am using below code
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 System.Configuration;
using System.Configuration;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
conn ObjConn = new conn();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
string str = "select * from Register";
dt = ObjConn.GetDataTable(str);
DataSet ds = new DataSet("table");
ds.Tables.Add(dt);
ReportViewer1.Visible = true;
ReportDocument rDoc = new ReportDocument();
dt.TableName = "Crystal Report "; // Crystal Report Name
rDoc.Load(Server.MapPath("userrpt.rpt")); // Your .rpt file path
rDoc.SetDataSource(ds); //set dataset to the report viewer.
ReportViewer1.ReportSource = rDoc; // which name space i have to use for this
}
}
Reply
Answers (
1
)
which namespace & .dll use for reportviewer1.reportsource?
Redirect to another page using tabcontrolller in mvc4