I am using VisualStudio 2019 and .Net Framework 4.7.2 version. I downloaded the crystal report SP26 by using this link: https://www.tektutorialshub.com/crystal-reports/crystal-reports-download-for-visual-studio/#crystal-reports-for-visual-studio. In the report viewer Loading function, I have bellow code:
private void crystalReportViewer1_Load(object sender, EventArgs e)
{
MySqlConnection mySqlConnection = new MySqlConnection(ConnectionString);
mySqlConnection.Open();
rd.Load(@"C:\Users\papsa\TTM-Management\TTM-Management\CrylecturerReport.rpt");
string st = "SELECT time_slot,Session FROM last_time_table WHERE default_year = '"+year+"' AND Session LIKE '%"+lecname+"%' ORDER BY time_slot ASC";
MySqlDataAdapter mySqlDataAdapter = new MySqlDataAdapter();
mySqlDataAdapter.SelectCommand = new MySqlCommand(st, mySqlConnection);
DataSet ds = new DataSet();
mySqlDataAdapter.Fill(ds, "lecturers");
rd.SetDataSource(ds);
crystalReportViewer1.ReportSource = rd;
}
When I run the project it displays me only the report viewer. at least it is not showing the margins of the crystal report. does anyone knows the reason?