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
Niranjan Poddar
1.1k
648
95.4k
SSRS Local Report(RDLC)
Aug 18 2014 4:39 AM
Report not display .................
Reportviewer used.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = Server.MapPath ( "ReportFin.rdlc" );
DataSet_Test objds = GetData ( "select * from VIEW_ARG_STATISTCS_DTL" );
ReportDataSource datasource = new ReportDataSource ( "DataSet_Test", objds.Tables[0] );
ReportViewer1.LocalReport.DataSources.Clear ( );
ReportViewer1.LocalReport.DataSources.Add ( datasource );
}
}
public DataSet_Test GetData (string Query )
{
string ConStr = "server=VALUED-786D678H; database=DES_WEB; uid=***; pwd=*****";
SqlCommand cmd = new SqlCommand ( Query );
using ( SqlConnection con = new SqlConnection ( ConStr ) )
{
using ( SqlDataAdapter da = new SqlDataAdapter ( ) )
{
cmd.Connection = con;
da.SelectCommand = cmd;
using ( DataSet_Test dsTest = new DataSet_Test ( ) )
{
da.Fill ( dsTest, "DataTable1" );
return dsTest;
}
}
}
}
in source page---
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<asp:Button ID="btnRetrive" runat="server" Text="Retrive" Width="70px" OnClick="btnRetrive_Click" />
<rsweb:ReportViewer ID="ReportViewer1" runat="server"></rsweb:ReportViewer>
</div>
error-data source instance has not been supplied for the data source 'DataSet1'.
Please anyone help me.................
why this error ?
thanks in adv........
Reply
Answers (
1
)
how to use wizard control
Image Gallery using ASP.Net DataList Control