Make the page a bit more fancy - PascalDeclercq1964/Icebear GitHub Wiki

Of course, the report made in the previous is very basic and we want to make it a bit more pretty:

  • add our logo and a title
  • add some lines and boxes
  • add a footer with the page number in it

To do this we first need to understand the structure of our report. For now, our report has a detail section and, because we added a field with a headerlabel, also a pageheader section. Each section has a collection called 'ReportObjects'. You can add 4 types of objects to that collection:

  • ReportObjectLabel: a textlabel
  • ReportObjectField: the content of a field in the current row of the datasource
  • ReportObjectLine: a line
  • ReportObjectRectangle: a rectangle
  • ReportObjectImage: an image. Can be a uri or the image can be contained in the current row of the datasource

Logo

The logo needs to be added to the pageheader section.

report.PageHeader.ReportObjects.Add(new ReportObjectImage(){ImageFileName=imageFileName, XLeft=0, YTop=0, YBottom=25});  

The report title

Lines and boxes

The footer