B2019-024: First page of Approval Consistency Report prints title & is blank
This commit is contained in:
parent
4e2a9c0210
commit
02c5cd167f
@ -135,16 +135,31 @@ namespace Volian.Print.Library
|
|||||||
int borders = 0;
|
int borders = 0;
|
||||||
int paddingBottom = 6;
|
int paddingBottom = 6;
|
||||||
// float[] widths;
|
// float[] widths;
|
||||||
|
Csla.SortedBindingList<ItemInfo> sortedProcs = new Csla.SortedBindingList<ItemInfo>(MyItemInfoList);
|
||||||
|
sortedProcs.ApplySort("DisplayNumber", System.ComponentModel.ListSortDirection.Ascending);
|
||||||
|
bool didSome = false;
|
||||||
|
// B2019-024: First page of Report prints the title at the top and the remainder of the page is blank.
|
||||||
|
// Check if procedure(s) are printed on that page and if not, change message to "No..." and don't do
|
||||||
|
// pagebreak.
|
||||||
|
foreach (ProcedureInfo pi in sortedProcs)
|
||||||
|
{
|
||||||
|
if (pi.IsSelected)
|
||||||
|
{
|
||||||
|
didSome = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
PdfPTable t = CreatePdfPTable(cols);
|
PdfPTable t = CreatePdfPTable(cols);
|
||||||
CreatePageHeader(t, f1, f4, cols, paddingBottom, "Approval Consistency Report", "Procedures currently selected to be approved");
|
string selProc = "Procedures currently selected to be approved";
|
||||||
|
if (!didSome) selProc = "No procedures currently selected to be approved";
|
||||||
|
CreatePageHeader(t, f1, f4, cols, paddingBottom, "Approval Consistency Report", selProc);
|
||||||
//more stuff
|
//more stuff
|
||||||
/*
|
/*
|
||||||
Csla.SortedBindingList<ItemInfo> sortedResults = new Csla.SortedBindingList<ItemInfo>(_SearchResults);
|
Csla.SortedBindingList<ItemInfo> sortedResults = new Csla.SortedBindingList<ItemInfo>(_SearchResults);
|
||||||
sortedResults.ApplySort(_DisplayMember, ListSortDirection.Ascending);
|
sortedResults.ApplySort(_DisplayMember, ListSortDirection.Ascending);
|
||||||
lbSrchResults.DataSource = sortedResults;
|
lbSrchResults.DataSource = sortedResults;
|
||||||
*/
|
*/
|
||||||
Csla.SortedBindingList<ItemInfo> sortedProcs = new Csla.SortedBindingList<ItemInfo>(MyItemInfoList);
|
|
||||||
sortedProcs.ApplySort("DisplayNumber", System.ComponentModel.ListSortDirection.Ascending);
|
|
||||||
foreach (ProcedureInfo pi in sortedProcs)
|
foreach (ProcedureInfo pi in sortedProcs)
|
||||||
{
|
{
|
||||||
if (pi.IsSelected)
|
if (pi.IsSelected)
|
||||||
@ -161,7 +176,7 @@ namespace Volian.Print.Library
|
|||||||
t.AddCell(BlankCell(cols));
|
t.AddCell(BlankCell(cols));
|
||||||
doc.Add(t);
|
doc.Add(t);
|
||||||
//new page with new table
|
//new page with new table
|
||||||
doc.NewPage();
|
if (didSome) doc.NewPage();
|
||||||
t = CreatePdfPTable(cols);
|
t = CreatePdfPTable(cols);
|
||||||
CreatePageHeader(t, f1, f4, cols, paddingBottom, "Approval Consistency Report", "Procedures that should be selected to be approved in order to maintain consistency");
|
CreatePageHeader(t, f1, f4, cols, paddingBottom, "Approval Consistency Report", "Procedures that should be selected to be approved in order to maintain consistency");
|
||||||
foreach (ProcedureInfo pi in MyItemInfoList)
|
foreach (ProcedureInfo pi in MyItemInfoList)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user