.net-corestimulsoft

How to fit image data column each image on one page


I'm using Stimul Report to create a report page. The report page shows correctly. I am reading an image for the stimulsoft web report from database.

Result shows many record image show two images on one page. But I want to show each image on a separate page.

enter image description here

This my code

 foreach (StiPage page in report.Pages)
 {
     page.Orientation = StiPageOrientation.Portrait;
     page.Margins.Top = 0;
     page.Margins.Bottom = 0;
     page.Margins.Left = 0;
     page.Margins.Right = 0;

     page.PaperSize = System.Drawing.Printing.PaperKind.A3;;  

     page.UnlimitedHeight = false;
     page.CanBreak = false;
}

var image = report.GetComponentByName("Image1") as StiImage;
image.CanBreak = true;

Solution

  • 1 -

    If you want to create one page for each record you can insert Panel in each page.


    2 -

    Instead of creating one page for each record you can create one page template and use this and pass your list to report.

    For break page after each record(Person) you can use GroupHeaderBand and GroupFooterBand.

    1. Place GroupHeaderBand before of record template;
    2. Set headerband Condition property to your Page Number field like PageNumber;

    1. Place GroupFooterBand at end of the record template;
    2. Set footerband New Page After property to True.

    These two bands will show for each record and page breaks after each GroupFooterBand.