Hello!
Thanks for an outstanding software product!
Anyway I recently ran into sort of a problem:
DateTime df=DateTime.Now;
DateTime dt=DateTime.Now;
using (SqlConnection connection =
new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["dbConnection"].ConnectionString))
{
DateTime.TryParse(DateFrom.Text, out df);
DateTime.TryParse(DateTo.Text, out dt);
connection.Open();
string sql1 = null;
SqlDataAdapter adapter = null;
DataSet dataSet = new DataSet();
StiReport report = new StiReport();
sql1 = "select ID, cost, price, AdditionDate from Orders where AdditionDate BETWEEN '" + df.ToString("yyyy-MM-dd") + "' AND '" + dt.ToString("yyyy-MM-dd") + "'";
adapter = new SqlDataAdapter(sql1,connection);
adapter.Fill(dataSet);
string appDirectory = HttpContext.Current.Server.MapPath("~/");
report.Load(appDirectory + "\\Reports\\HotelReport2.mrt");
dataSet.Tables[0].TableName = "Orders";
report.DataSources.Clear();
report.Dictionary.Databases.Clear();
report.RegData("DataSource", dataSet.Tables["Orders"]);
report.Dictionary.Synchronize();
report.Render(false);
StiWebViewerFx1.Report = report;
StiWebViewerFx1.Visible = true;
}
In report I see nothing - in designer there is an empty data source
Thank you very much
DataSet Bind
DataSet Bind
Hello,
Can you please send us a sample project which reproduces the issue for analysis.
Thank you.
Can you please send us a sample project which reproduces the issue for analysis.
Thank you.
DataSet Bind
I got it guys! I mistook DataSources. Just forgot to rename separate fields in the report after I had renamed the general one. However the soft is great! Real masterpiece of .NET programming )
DataSet Bind
It is great that you solved the problem. Thank you for your good words.
Have a nice day!
Have a nice day!