PDA

View Full Version : حرفه ای: مشکل در نمایش کریستال ریپورت



araz_pashazadeh
یک شنبه 19 بهمن 1393, 09:08 صبح
با سلام خدمت دوستان
مشکل تکه کد زیر چی میتونه باشه؟
string test = "SELECT [Id] ,[Url] [Title] ,[ParentId] ,[Active] FROM [Tbl_Menu]"; DataSet testds = new DataSet();
SqlConnection cnn = new SqlConnection(@"Data Source=PC1\APGMSSQLSERVER;Initial Catalog=SHOPCMS;User ID=fa;Password=1364560");
SqlCommand testcmd = new SqlCommand(test, cnn);
testcmd.CommandType = CommandType.Text;
cnn.Open();
SqlDataAdapter testda = new SqlDataAdapter(testcmd);
testda.Fill(testds, "testttable");

ReportDocument myReportDocument;
myReportDocument = new ReportDocument();
myReportDocument.Load(Server.MapPath("~/MenuReport.rpt"));
myReportDocument.SetDataSource(testds);
myReportDocument.SetDatabaseLogon("fa", "1364560");
CrystalReportViewer1.ReportSource = myReportDocument;
CrystalReportViewer1.DisplayToolbar = true;
بدون خطا اجرا میشه ولی گطارش را نمایش نمیده
لطفا راهنمایی کنین
با تشکر