Formatting a table whose columns cover more than 1 page

Stimulsoft Reports.NET discussion
Post Reply
User avatar
John
Posts: 132
Joined: Tue Feb 01, 2011 3:56 am
Location: England

Formatting a table whose columns cover more than 1 page

Post by John »

Hallo Support,

if I have a table with a large number of columns, more than fit on 1 page, how can I set this up so that the following happens:
  • - the columns that don't fit on the first page are automatically moved and rendered when all rows for the first page are finished
    - a "fixed" column can appear at the left on each page
    - for each row, the row height is the same - i.e. row 1 for the columns on the first page would be the same height as row 1 for the remaining columns
There used to be a "collate" function for a page but this seems to have disappeared. I tried SegmentsPerWidth / Height but got very strange results.
I also tried with both a databand and a table, as in the attached MRT.

Thanks in advance.

John Kitching
Attachments
FormattingIssue.zip
MRT, Sample data, resulting pdf
(160.4 KiB) Downloaded 221 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Formatting a table whose columns cover more than 1 page

Post by HighAley »

Hello, John.
John wrote:the columns that don't fit on the first page are automatically moved and rendered when all rows for the first page are finished
You should move text components on the second page in designer.
Img1.png
Img1.png (23.01 KiB) Viewed 2725 times
John wrote:a "fixed" column can appear at the left on each page
What do you mean under fixed column? If the first column should repeat on second page, you should
John wrote:for each row, the row height is the same - i.e. row 1 for the columns on the first page would be the same height as row 1 for the remaining columns
The height of one row on different pages is the same.
John wrote:There used to be a "collate" function for a page but this seems to have disappeared. I tried SegmentsPerWidth / Height but got very strange results.
I also tried with both a databand and a table, as in the attached MRT.
You could find Collation property in the properties of the report.

Thank you.
User avatar
John
Posts: 132
Joined: Tue Feb 01, 2011 3:56 am
Location: England

Re: Formatting a table whose columns cover more than 1 page

Post by John »

Hello,

thanks very much. It's working now. One last question - is it possible to get all rows to print first before moving to the next set of columns? At the moment my report displays the first 3 rows for all columns before moving on to the next few rows (see attachment).

Thanks and regards,

John Kitching
Attachments
Report.pdf
Example
(258.4 KiB) Downloaded 239 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Formatting a table whose columns cover more than 1 page

Post by HighAley »

Hello.

This is not typical task, so it needs additional code.
Here is a sample of such code that you could use in End Render event of the report:

Code: Select all

this.RenderedPages = Stimulsoft.Report.Export.StiSegmentPagesDivider.Divide(this.RenderedPages, null);
int CollateCount = 2;
System.Collections.ArrayList list = new System.Collections.ArrayList();
int count = this.RenderedPages.Count;


for (int index = 0; index < CollateCount; index++)
{
	for (int pageIndex = index; pageIndex < count; pageIndex += CollateCount)
    {
    	list.Add(this.RenderedPages[pageIndex]);
	}
}

this.RenderedPages.Clear();
foreach (StiPage page in list)
{
    this.RenderedPages.Add(page);
};
You could add a report variable CollateCount to set Collate property.

Thank you.
User avatar
John
Posts: 132
Joined: Tue Feb 01, 2011 3:56 am
Location: England

Re: Formatting a table whose columns cover more than 1 page

Post by John »

Hello,

that worked great. My template has 3 page segments so I set the collation to 3 and it came out just as I wanted.
Thanks for much for your help.

Regards

John Kitching
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Formatting a table whose columns cover more than 1 page

Post by HighAley »

Hello, John.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
StixStax
Posts: 46
Joined: Wed Aug 12, 2015 9:41 am

Re: Formatting a table whose columns cover more than 1 page

Post by StixStax »

What do you mean under fixed column? If the first column should repeat on second page, you should [...]
I have the same issue. I would like to repeat the first column (fixed column) on every page that is added horizontally, but i cant figure out what the solution to John problem was. You didnt finish the sentence. Would you be so kind and give some more information?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Formatting a table whose columns cover more than 1 page

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your task. You can place it on each page/segment of your report.

Thank you.
Attachments
Capture.PNG
Capture.PNG (28.89 KiB) Viewed 2700 times
Post Reply