This question is locked. New answers and comments are not allowed.
Hi. I am generating a PDF from the contenst of a radgridview using RadDocument. This is a feature which has been part of my application for a couple years and does not get tested much on my end because I don't usually make changes to it.
Recently I noticed that the header of my report has extra space in it, basically it looks like there is an extra blank line in between each line of text (there are 3 lines).
This is the code which generates the header:
What I am expecting to see, and I think used to see is basically 3 lines of text one on top of the other. But what I am getting is what looks like 6 lines of text with a blank in between each of my lines. Though I think it's actually a line spacing issue, I don't think a carriage return is being entered erroniously.
What am I doing wrong?
Recently I noticed that the header of my report has extra space in it, basically it looks like there is an extra blank line in between each line of text (there are 3 lines).
This is the code which generates the header:
var headtable =
new
Table(1, 2);
var table =
new
Table(1, 5);
var document =
new
RadDocument();
document.Sections.Add(
new
Telerik.Windows.Documents.Model.Section());
document.LineSpacing = 1;
headtable.CellPadding =
new
Telerik.Windows.Documents.Layout.Padding(0); ;
headtable.CellSpacing = 0;
//report header
document.Sections.First.Blocks.Add(headtable);
//col 1
var headCell = headtable.Rows.First.Cells.First;
headCell.Borders.All =
new
Telerik.Windows.Documents.Model.Border(BorderStyle.None, Colors.Black);
AddCellDataSpan(headCell, App.RunForName, Colors.Transparent, Colors.Black, Telerik.Windows.Documents.Layout.RadTextAlignment.Left);
AddCellDataSpan(headCell,
"Run: "
+ DateTime.Now.ToString(
"M/dd/yyyy h:mm tt"
));
AddCellDataSpan(headCell,
"Range: "
+ App.startDate +
" to "
+ App.endDate);
AddCellDataSpan(headCell,
" "
);
//col2
headCell = (TableCell)headCell.NextSibling;
headCell.Borders.All =
new
Telerik.Windows.Documents.Model.Border(BorderStyle.None, Colors.Black);
AddCellDataSpan(headCell, App.companyName, Colors.White, Colors.Black, Telerik.Windows.Documents.Layout.RadTextAlignment.Right);
AddCellDataSpan(headCell, reportname +
" Report"
, Colors.White, Colors.Black, Telerik.Windows.Documents.Layout.RadTextAlignment.Right);
//AddCellDataSpan(headCell, " ");
//AddCellDataSpan(headCell, " ");
What I am expecting to see, and I think used to see is basically 3 lines of text one on top of the other. But what I am getting is what looks like 6 lines of text with a blank in between each of my lines. Though I think it's actually a line spacing issue, I don't think a carriage return is being entered erroniously.
What am I doing wrong?