PDA

View Full Version : عدم نمایش اطلاعات



ahmad156
دوشنبه 15 اسفند 1390, 08:09 صبح
سلام دوستان
من توی Stimul یه DataSource از نوع Sql Connection به نام ds دارم.کد زیر رو هم مینویسم ولی نمیدونم چرا چیزی نشون نمیده؟

Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
report.Load(Server.MapPath("Report.mrt"));
report.Dictionary.Databases.Clear();
string conn = @"Server=localhost\sqlexpress;initial catalog=Mobile1;integrated security=true";
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("con", conn));
Stimulsoft.Report.Dictionary.StiSqlSource source = report.Dictionary.DataSources["ds"] as Stimulsoft.Report.Dictionary.StiSqlSource;
source.SqlCommand = "select * from city";
report.Compile();
StiWebViewer1.Report = report;