I have 2 Text objects in my Report. One is in the page header containing "Month" text. One is in the detail section where it displays data from my database which I formatted to be displayed horizontally. But I can't seem to find a way to make my two text objects align horizontally. Refer to this image.
Because if I put the page header text object into the detail section, this is what happens.
Related code on how I get values from my 2nd text object and display them in detail section.
MySqlConnection conn = new MySqlConnection(connectionString);
String query = " Select username from users";
MySqlDataAdapter adapt = new MySqlDataAdapter(query, connectionString);
DataSet ds = new DataSet();
adapt.Fill(ds, "JODT");
if (ds.Tables[0].Rows.Count == 0)
{
MessageBox.Show("No Data Found", "JobOrder");
return;
}
joRpt.SetDataSource(ds);
CrystalDecisions.CrystalReports.Engine.TextObject root;
root = (CrystalDecisions.CrystalReports.Engine.TextObject)
joRpt.ReportDefinition.ReportObjects[0];
crystalReportViewer1.ReportSource = joRpt;
转到“页眉”的“节专家”,然后选中“在Underlay following sections
中加Underlay following sections
复选框并检查输出
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.