本文整理匯總了C#中fyiReporting.RDL.Pages.NextOrNew方法的典型用法代碼示例。如果您正苦於以下問題:C# Pages.NextOrNew方法的具體用法?C# Pages.NextOrNew怎麽用?C# Pages.NextOrNew使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類fyiReporting.RDL.Pages
的用法示例。
在下文中一共展示了Pages.NextOrNew方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RunPage
override internal void RunPage(Pages pgs, Row row)
{
Report rpt = pgs.Report;
if (IsHidden(pgs.Report, row))
return;
SetPagePositionBegin(pgs);
// Build the Chart bitmap, along with data regions
Page p = pgs.CurrentPage;
ICustomReportItem cri = null;
Bitmap bm = null;
try
{
cri = RdlEngineConfig.CreateCustomReportItem(_Type);
SetProperties(pgs.Report, row, cri);
int width = WidthCalc(rpt, pgs.G) -
(Style == null? 0 :
(Style.EvalPaddingLeftPx(rpt, row) + Style.EvalPaddingRightPx(rpt, row)));
int height = RSize.PixelsFromPoints(this.HeightOrOwnerHeight) -
(Style == null? 0 :
(Style.EvalPaddingTopPx(rpt, row) + Style.EvalPaddingBottomPx(rpt, row)));
bm = new Bitmap(width, height);
cri.DrawImage(bm);
MemoryStream ostrm = new MemoryStream();
bm.Save(ostrm, IMAGEFORMAT); // generate a jpeg TODO: get png to work with pdf
byte[] ba = ostrm.ToArray();
ostrm.Close();
PageImage pi = new PageImage(IMAGEFORMAT, ba, width, height); // Create an image
pi.Sizing = ImageSizingEnum.Clip;
// RunPageRegionBegin(pgs);
SetPagePositionAndStyle(rpt, pi, row);
if (pgs.CurrentPage.YOffset + pi.Y + pi.H >= pgs.BottomOfPage && !pgs.CurrentPage.IsEmpty())
{ // force page break if it doesn't fit on the page
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
if (this.YParents != null)
pi.Y = 0;
}
p = pgs.CurrentPage;
p.AddObject(pi); // Put image onto the current page
// RunPageRegionEnd(pgs);
if (!this.PageBreakAtEnd && !IsTableOrMatrixCell(rpt))
{
float newY = pi.Y + pi.H;
p.YOffset += newY; // bump the y location
}
SetPagePositionEnd(pgs, pi.Y + pi.H);
}
catch (Exception ex)
{
rpt.rl.LogError(8, string.Format("Exception in CustomReportItem handling: {0}", ex.Message));
}
finally
{
if (cri != null)
cri.Dispose();
}
return;
}
示例2: RunPageRegionEnd
internal void RunPageRegionEnd(Pages pgs)
{
if (this.TC == null && this.PageBreakAtEnd && !pgs.CurrentPage.IsEmpty())
{ // force page break at beginning of dataregion
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
}
}
示例3: RunPageNew
internal Page RunPageNew(Pages pgs, Page p)
{
if (p.IsEmpty()) // if the page is empty it won't help to create another one
return p;
// Do we need a new page or have should we fill out more body columns
Body b = OwnerReport.Body;
int ccol = b.IncrCurrentColumn(pgs.Report); // bump to next column
float top = OwnerReport.TopOfPage; // calc top of page
if (ccol < b.Columns)
{ // Stay on same page but move to new column
p.XOffset =
((OwnerReport.Width.Points + b.ColumnSpacing.Points) * ccol);
p.YOffset = top;
p.SetEmpty(); // consider this page empty
}
else
{ // Go to new page
b.SetCurrentColumn(pgs.Report, 0);
pgs.NextOrNew();
p = pgs.CurrentPage;
p.YOffset = top;
p.XOffset = 0;
}
return p;
}
示例4: RunPage
override internal void RunPage(Pages pgs, Row row)
{
Report rpt = pgs.Report;
if (IsHidden(pgs.Report, row))
return;
SetPagePositionBegin(pgs);
// Build the Chart bitmap, along with data regions
Page p = pgs.CurrentPage;
ICustomReportItem cri = null;
Bitmap bm = null;
try
{
cri = RdlEngineConfig.CreateCustomReportItem(_Type);
SetProperties(pgs.Report, row, cri);
int width = WidthCalc(rpt, pgs.G) -
(Style == null? 0 :
(Style.EvalPaddingLeftPx(rpt, row) + Style.EvalPaddingRightPx(rpt, row)));
int height = RSize.PixelsFromPoints(this.HeightOrOwnerHeight) -
(Style == null? 0 :
(Style.EvalPaddingTopPx(rpt, row) + Style.EvalPaddingBottomPx(rpt, row)));
bm = Bitmap.CreateBitmap(width, height, PixelFormat.Format16bppRgb565);// Bitmap.Config.Rgb565);
cri.DrawImage(ref bm);
MemoryStream ostrm = new MemoryStream();
// 06122007AJM Changed to use high quality JPEG encoding
//bm.Save(ostrm, IMAGEFORMAT); // generate a jpeg TODO: get png to work with pdf
//System.Drawing.Imaging.ImageCodecInfo[] info;
//info = ImageCodecInfo.GetImageEncoders();
//EncoderParameters encoderParameters;
//encoderParameters = new EncoderParameters(1);
//// 20022008 AJM GJL - Using centralised image quality
//encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, ImageQualityManager.CustomImageQuality);
//System.Drawing.Imaging.ImageCodecInfo codec = null;
//for (int i = 0; i < info.Length; i++)
//{
// if (info[i].FormatDescription == "JPEG")
// {
// codec = info[i];
// break;
// }
//}
//bm.Save(ostrm, codec, encoderParameters);
byte[] ba = ostrm.ToArray();
ostrm.Close();
PageImage pi = new PageImage(IMAGEFORMAT, ba, width, height); // Create an image
pi.Sizing = ImageSizingEnum.Clip;
// RunPageRegionBegin(pgs);
SetPagePositionAndStyle(rpt, pi, row);
if (pgs.CurrentPage.YOffset + pi.Y + pi.H >= pgs.BottomOfPage && !pgs.CurrentPage.IsEmpty())
{ // force page break if it doesn't fit on the page
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
if (this.YParents != null)
pi.Y = 0;
}
p = pgs.CurrentPage;
p.AddObject(pi); // Put image onto the current page
// RunPageRegionEnd(pgs);
if (!this.PageBreakAtEnd && !IsTableOrMatrixCell(rpt))
{
float newY = pi.Y + pi.H;
p.YOffset += newY; // bump the y location
}
SetPagePositionEnd(pgs, pi.Y + pi.H);
}
catch (Exception ex)
{
rpt.rl.LogError(8, string.Format("Exception in CustomReportItem handling: {0}", ex.Message));
}
finally
{
if (cri != null)
cri.Dispose();
}
return;
}
示例5: RunPage
override internal void RunPage(Pages pgs, Row row)
{
Report r = pgs.Report;
TextboxRuntime tbr = TextboxRuntime.GetTextboxRuntime(r, this);
tbr.RunCount++; // Increment the run count
bool bHidden = IsHidden(r, row);
SetPagePositionBegin(pgs);
string t;
if (bHidden)
t = "";
else
t = RunText(r, row); // get the text
bool bDup = RunTextIsDuplicate(tbr, t, pgs.CurrentPage);
if (bDup)
{
if (!(this.IsTableOrMatrixCell(r))) // don't put out anything if not in Table or Matrix
bHidden = true;
t = ""; // still need to put out the cell
}
PageText pt;
PageTextHtml pth=null;
if (IsHtml(r, row))
pt = pth = new PageTextHtml(t);
else
pt = new PageText(t);
SetPagePositionAndStyle(r, pt, row);
if (this.CanGrow && tbr.RunHeight == 0) // when textbox is in a DataRegion this will already be called
{
this.RunTextCalcHeight(r, pgs.G, row, pt is PageTextHtml? pt as PageTextHtml: null);
}
pt.H = Math.Max(pt.H, tbr.RunHeight); // reset height
if (pt.SI.BackgroundImage != null)
pt.SI.BackgroundImage.H = pt.H; // and in the background image
pt.CanGrow = this.CanGrow;
// check TextAlign: if General then correct based on data type
if (pt.SI.TextAlign == TextAlignEnum.General)
{
if (DataType.IsNumeric(this.Value.GetTypeCode() ))
pt.SI.TextAlign = TextAlignEnum.Right;
}
// Hidden objects don't affect the current page?
if (!bHidden)
{
// Force page break if it doesn't fit on a page
if (this.IsInBody && // Only force page when object directly in body
pgs.CurrentPage.YOffset + pt.Y + pt.H >= pgs.BottomOfPage && // running off end of page
!pgs.CurrentPage.IsEmpty()) // if page is already empty don't force new
{ // force page break if it doesn't fit on the page
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
if (this.YParents != null)
pt.Y = 0;
}
Page p = pgs.CurrentPage;
RecordPageReference(r, p, row); // save information for late page header/footer references
p.AddObject(pt);
if (!bDup)
{
tbr.PreviousText = t; // previous text displayed
tbr.PreviousPage = p; // page previous text was shown on
}
}
SetPagePositionEnd(pgs, pt.Y+pt.H);
if (pth != null)
pth.Reset();
if (this.CanGrow && !Value.IsConstant())
{
tbr.RunHeight = 0; // need to recalculate
}
}
示例6: RunPage
override internal void RunPage(Pages pgs, Row row)
{
Report rpt = pgs.Report;
if (IsHidden(pgs.Report, row))
return;
_ChartMatrix.RunReset(rpt);
Rows _Data = GetFilteredData(rpt, row);
SetMyData(rpt, _Data);
SetPagePositionBegin(pgs);
if (!AnyRowsPage(pgs, _Data)) // if no rows return
return; // nothing left to do
// Build the Chart bitmap, along with data regions
Page p = pgs.CurrentPage;
ChartBase cb=null;
try
{
cb = RunChartBuild(rpt, row); // Build the chart
if (!_isHYNEsWonderfulVector.EvaluateBoolean(rpt,row)) //AJM GJL 14082008 'Classic' Rendering
{
System.Drawing.Image im = cb.Image(rpt); // Grab the image
int height = im.Height; // save height and width
int width = im.Width;
MemoryStream ostrm = new MemoryStream();
/* The following is a new image saving logic which will allow for higher
* quality images using JPEG with 100% quality
* 06122007AJM */
System.Drawing.Imaging.ImageCodecInfo[] info;
info = ImageCodecInfo.GetImageEncoders();
EncoderParameters encoderParameters;
encoderParameters = new EncoderParameters(1);
// 20022008 AJM GJL - Centralised class with global encoder settings
encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, ImageQualityManager.ChartImageQuality);
System.Drawing.Imaging.ImageCodecInfo codec = null;
for (int i = 0; i < info.Length; i++)
{
if (info[i].FormatDescription == "JPEG")
{
codec = info[i];
break;
}
}
im.Save(ostrm, codec, encoderParameters);
// 06122007AJM The follow has been replaced with the code above
//im.Save(ostrm, info); // generate a jpeg TODO: get png to work with pdf
byte[] ba = ostrm.ToArray();
ostrm.Close();
PageImage pi = new PageImage(IMAGEFORMAT, ba, width, height); // Create an image
RunPageRegionBegin(pgs);
SetPagePositionAndStyle(rpt, pi, row);
pi.SI.BackgroundImage = null; // chart already has the background image
if (pgs.CurrentPage.YOffset + pi.Y + pi.H >= pgs.BottomOfPage && !pgs.CurrentPage.IsEmpty())
{ // force page break if it doesn't fit on the page
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
if (this.YParents != null)
pi.Y = 0;
}
p = pgs.CurrentPage;
p.AddObject(pi); // Put image onto the current page
RunPageRegionEnd(pgs);
if (!this.PageBreakAtEnd && !IsTableOrMatrixCell(rpt))
{
float newY = pi.Y + pi.H;
p.YOffset += newY; // bump the y location
}
SetPagePositionEnd(pgs, pi.Y + pi.H);
}
else //Ultimate Rendering - Vector //AJM GJL 14082008
{
System.Drawing.Imaging.Metafile im = cb.Image(rpt); // Grab the image
//im could still be saved to a bitmap at this point
//if we were to offer a choice of raster or vector, it would probably
//be easiest to draw the chart to the EMF and then save as bitmap if needed
int height = im.Height; // save height and width
int width = im.Width;
byte[] ba = cb._aStream.ToArray();
cb._aStream.Close();
PageImage pi = new PageImage(ImageFormat.Wmf, ba, width, height);
RunPageRegionBegin(pgs);
SetPagePositionAndStyle(rpt, pi, row);
pi.SI.BackgroundImage = null; // chart already has the background image
if (pgs.CurrentPage.YOffset + pi.Y + pi.H >= pgs.BottomOfPage && !pgs.CurrentPage.IsEmpty())
{ // force page break if it doesn't fit on the page
//.........這裏部分代碼省略.........
示例7: RunPage
internal override void RunPage(Pages pgs, Row row)
{
Report r = pgs.Report;
bool bHidden = IsHidden(r, row);
SetPagePositionBegin(pgs);
// Handle page breaking at start
if (this.PageBreakAtStart && !IsTableOrMatrixCell(r) && !pgs.CurrentPage.IsEmpty() && !bHidden)
{ // force page break at beginning of dataregion
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
}
PageRectangle pr = new PageRectangle();
SetPagePositionAndStyle(r, pr, row);
if (pr.SI.BackgroundImage != null)
pr.SI.BackgroundImage.H = pr.H; // and in the background image
if (!bHidden)
{
Page p = pgs.CurrentPage;
p.AddObject(pr);
if (_ReportItems != null)
{
float saveY = p.YOffset;
// p.YOffset += (Top == null ? 0 : this.Top.Points);
p.YOffset = pr.Y; // top of rectangle is base for contained report items
_ReportItems.RunPage(pgs, row, GetOffsetCalc(pgs.Report) + LeftCalc(r));
p.YOffset = saveY;
}
// Handle page breaking at end
if (this.PageBreakAtEnd && !IsTableOrMatrixCell(r) && !pgs.CurrentPage.IsEmpty())
{ // force page break at beginning of dataregion
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
}
}
// SetPagePositionEnd(pgs, pgs.CurrentPage.YOffset);
SetPagePositionEnd(pgs, pr.Y + pr.H);
}
示例8: RunPage
override internal void RunPage(Pages pgs, Row row)
{
Report rpt = pgs.Report;
if (IsHidden(pgs.Report, row))
return;
_ChartMatrix.RunReset(rpt);
Rows _Data = GetFilteredData(rpt, row);
SetMyData(rpt, _Data);
SetPagePositionBegin(pgs);
if (!AnyRowsPage(pgs, _Data)) // if no rows return
return; // nothing left to do
// Build the Chart bitmap, along with data regions
Page p = pgs.CurrentPage;
ChartBase cb=null;
try
{
cb = RunChartBuild(rpt, row); // Build the chart
System.Drawing.Image im = cb.Image(rpt); // Grab the image
int height = im.Height; // save height and width
int width = im.Width;
MemoryStream ostrm = new MemoryStream();
im.Save(ostrm, IMAGEFORMAT); // generate a jpeg TODO: get png to work with pdf
byte[] ba = ostrm.ToArray();
ostrm.Close();
PageImage pi = new PageImage(IMAGEFORMAT, ba, width, height); // Create an image
RunPageRegionBegin(pgs);
SetPagePositionAndStyle(rpt, pi, row);
pi.SI.BackgroundImage = null; // chart already has the background image
if (pgs.CurrentPage.YOffset + pi.Y + pi.H >= pgs.BottomOfPage && !pgs.CurrentPage.IsEmpty())
{ // force page break if it doesn't fit on the page
pgs.NextOrNew();
pgs.CurrentPage.YOffset = OwnerReport.TopOfPage;
if (this.YParents != null)
pi.Y = 0;
}
p = pgs.CurrentPage;
p.AddObject(pi); // Put image onto the current page
RunPageRegionEnd(pgs);
if (!this.PageBreakAtEnd && !IsTableOrMatrixCell(rpt))
{
float newY = pi.Y + pi.H;
p.YOffset += newY; // bump the y location
}
SetPagePositionEnd(pgs, pi.Y + pi.H);
}
catch (Exception ex)
{
rpt.rl.LogError(8, string.Format("Exception in Chart handling.\n{0}\n{1}", ex.Message, ex.StackTrace));
}
finally
{
if (cb != null)
cb.Dispose();
}
return;
}