Segment number

Stimulsoft Reports.NET discussion
Summit
Posts: 19
Joined: Wed Oct 02, 2013 10:06 am

Segment number

Post by Summit »

Hi everyone,
I have a long report that consists of several width segments and I need to get the segment number for each of them. But I didn't find any variables or properties that could help me with that. How to do this?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Segment number

Post by Alex K. »

Hello,

Can you please describe your issue in more details.

Thank you.
Summit
Posts: 19
Joined: Wed Oct 02, 2013 10:06 am

Re: Segment number

Post by Summit »

Well, I have a single-segment page that stretches to several segments during report compilation (the table on the page stretches). And I need each segment to be numbered. But the Text put on the first segment in the template leaves the number on the first segment only and I haven't found a way to reach for other segments of the page. It looks very strange because in the viewer each segment is numbered (semi-transparent letters in the middle of the page).
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Segment number

Post by HighAley »

Hello.

You have one page that is split to two pages. If you need to show page number on each segment, you should use next expression on the first segment {PageNumber} and next expression on the second segment {PageNumber+1}

Thank you.
Summit
Posts: 19
Joined: Wed Oct 02, 2013 10:06 am

Re: Segment number

Post by Summit »

The point is that there's only one segment in the template. The other segments (there may be more than 2) appear at runtime by the table stretching, so it's not possible to access them from template. I thought there would be something like segments property in the report class, but I didn't find any.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Segment number

Post by HighAley »

Hello.

We are sending you a sample report which shows how to add page number for such report.
UnlimitedWidthWithPageHeadersAndFooters.mrt
(27.65 KiB) Downloaded 136 times
You should look at the Before Print and After Print events of the Page and Before Print event of the Page Header. Also the Number Of Pass property of the report should be set to Double Pass.

Thank you.
Summit
Posts: 19
Joined: Wed Oct 02, 2013 10:06 am

Re: Segment number

Post by Summit »

I did everything in the way you told but it won't help: the bottom text (see the template attached) is printed on the first segment only.
Attachments
repSpiCompany.mrt
(24.88 KiB) Downloaded 110 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Segment number

Post by HighAley »

Hello.

Sorry, but there is only one page in the report that you sent us.

Thank you.
Summit
Posts: 19
Joined: Wed Oct 02, 2013 10:06 am

Re: Segment number

Post by Summit »

Yes, and there has always been. I told you before that there is one-segment page that stretches to multiple segments at runtime, it's written in the preceding posts.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Segment number

Post by HighAley »

Hello.

We need to see sample where the stretched report will be with no Page Footer to help you solve this issue.

Thank you.
Post Reply