removed a console.writeline

Control to create RO Usage, RO Summary, RO Complete, and Transition Usage reports
Logic to print RO Usage reports
Ifdef’d logic for UseOnFirstPage
logic for Width Override and Ifdef’d logic for UseOnFirstPage
Beginings of code to generate a Complete RO Report
This commit is contained in:
2012-09-13 19:58:05 +00:00
parent 80e72fbbb0
commit 04fac124c1
9 changed files with 3399 additions and 9 deletions

View File

@@ -438,6 +438,10 @@ namespace Volian.Print.Library
}
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
{
#if AllButFirstPage
// 792: 72 * 11 inches - TopRow - Top is high value
float _PointsPerPage = 792;
#endif
if (IsWordDocPara)
{
PdfReader tmp = null;
@@ -454,6 +458,9 @@ namespace Volian.Print.Library
DebugText.WriteLine("ToPdf1:{0},'{1}',{2},{3},{4},{5}", MyItemInfo.ItemID, MyItemInfo.ShortSearchPath, XOffset, yLocation, yPageStart, YTopMost);
int paginate = Paginate(yLocation, yTopMargin, yBottomMargin);
bool firstHighLevelStep = MyItemInfo.IsHigh && (MyItemInfo.MyPrevious == null);
#if AllButFirstPage
SectionInfo currentSectionInfo = MyItemInfo.ActiveSection as SectionInfo;//MyItemInfo as SectionInfo;
#endif
switch (paginate)
{
case 0: // No page break
@@ -466,7 +473,19 @@ namespace Volian.Print.Library
break;
case 1: // Break on High Level Step
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
#if AllButFirstPage
// need logic for AllButFirstPage
// recac yTopMargin, YBottomMargin, YTopMost???
currentSectionInfo.DidFirstPageDocStyle = true;
//MyItemInfo.DidFirstPageDocStyle = true;
yTopMargin = _PointsPerPage - (float)currentSectionInfo.MyDocStyle.Layout.TopMargin; //(float)MyItemInfo.MyDocStyle.Layout.TopMargin;
yBottomMargin = Math.Max(0, yTopMargin - (float)currentSectionInfo.MyDocStyle.Layout.PageLength); //(float)MyItemInfo.MyDocStyle.Layout.PageLength);
#endif
cb.PdfDocument.NewPage();
#if AllButFirstPage
MyPageHelper.MySection = currentSectionInfo;
#endif
DebugText.WriteLine("Paginate1");
if (MyItemInfo.IsSection)
{
@@ -476,7 +495,6 @@ namespace Volian.Print.Library
// Only do foldout page if not done for section break, i.e. check the there's a previous step.
if (MyItemInfo.MyPrevious != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0)
PromsPrinter.DoFoldoutPage(cb, "HLS", MyPageHelper.TextLayer, MyPageHelper);
yPageStart = yTopMargin + YTopMost;
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
MyPageHelper.YMultiplier = 1;
@@ -513,11 +531,22 @@ namespace Volian.Print.Library
}
MyPageHelper.BottomMessage = new vlnText(cb, this, myMsg, myMsg, docstyle.Layout.LeftMargin + XOffsetBox + docstyle.Continue.Bottom.Margin ?? 0, msg_yLocation, docstyle.Continue.Bottom.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font);
}
#if AllButFirstPage
// need logic for AllButFirstPage
// recac yTopMargin, YBottomMargin, YTopMost???
//currentSectionInfo.DidFirstPageDocStyle = true;
currentSectionInfo.DidFirstPageDocStyle = true;
//MyItemInfo.DidFirstPageDocStyle = true;
yTopMargin = _PointsPerPage - (float)currentSectionInfo.MyDocStyle.Layout.TopMargin; //(float)MyItemInfo.MyDocStyle.Layout.TopMargin;
yBottomMargin = Math.Max(0, yTopMargin - (float)currentSectionInfo.MyDocStyle.Layout.PageLength); //(float)MyItemInfo.MyDocStyle.Layout.PageLength);
#endif
cb.PdfDocument.NewPage();
#if AllButFirstPage
MyPageHelper.MySection = currentSectionInfo;
#endif
DebugText.WriteLine("Paginate2");
if ((MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0)
PromsPrinter.DoFoldoutPage(cb, "Break within Step", MyPageHelper.TextLayer, MyPageHelper); // temporary foldout
// If there is a box, adjust the yTopMost to include it.
float yTopMost = YTopMost;
//if (YVeryTop < yTopMost) Console.WriteLine("{0},{1},{2}", MyItemInfo.DBSequence, yTopMost, YVeryTop);
@@ -539,7 +568,19 @@ namespace Volian.Print.Library
if (!firstHighLevelStep)
{
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
#if AllButFirstPage
// need logic for AllButFirstPage
// recac yTopMargin, YBottomMargin, YTopMost???
currentSectionInfo.DidFirstPageDocStyle = true;
//MyItemInfo.DidFirstPageDocStyle = true;
yTopMargin = _PointsPerPage - (float)currentSectionInfo.MyDocStyle.Layout.TopMargin; //(float)MyItemInfo.MyDocStyle.Layout.TopMargin;
yBottomMargin = Math.Max(0, yTopMargin - (float)currentSectionInfo.MyDocStyle.Layout.PageLength); //(float)MyItemInfo.MyDocStyle.Layout.PageLength);
#endif
cb.PdfDocument.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
#if AllButFirstPage
MyPageHelper.MySection = currentSectionInfo;
#endif
DebugText.WriteLine("Paginate3");
if (MyItemInfo.IsSection)
{
@@ -1866,6 +1907,9 @@ namespace Volian.Print.Library
{
// NOT SURE IF WE NEED TO TEST FOR THE NULLBOX FORMAT FLAG, MAYBE "bx == null" IS THE SAME THING
//if (formatInfo.MyStepSectionLayoutData.NullBox)
if (widOvrd != 0)
Width = (float)widOvrd - tabWidth;
else
Width = (float)formatInfo.MyStepSectionLayoutData.WidT - tabWidth;
}
else