This is a migrated thread and some comments may be shown as answers.

Do you support templating for double sided reports?

3 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Östemar
Top achievements
Rank 2
Östemar asked on 01 Feb 2010, 07:00 PM
Hi,

We are using Telerik Reporting for generating a report with multiple pages as a PDF. The intention of the PDF is to be printed double sided.

Our question is if it is possible to have style rules, headers, footers, etc. adapt to an even/odd page scenario. In its simplest form for example having the page number show left or right aligned on alternating pages.

Best regards,
Martin

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Feb 2010, 03:33 PM
Hello Martin,

Conditional Formatting will work just fine for you. Following your example for the PageNumber, you can add two textboxes to the PageFooter - one at left and one at right side. Then apply conditional formatting like this:

Expression                             Operator                        Value
====================================================
= PageNumber % 2                    =                                =0

And uncheck the Visible checkbox in the Layout pane. Thus, when you are on the second page the TextBox with this conditional formatting would not be visible. The same goes for adding/removing a style to an item/section when on odd page - you get the pattern.

All the best,
Steve
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Östemar
Top achievements
Rank 2
answered on 03 Feb 2010, 07:45 PM
Hi Steve,

Yes, that sounds like a great solution. Haven't tried conditional formatting before but that sounds sweet.

However, when I try this and have a conditional formatting with the expression =PageNumber % 2, equal (=) as the operator and 0 as the value I get a report generator error saying:

"An error has occured while processing TextBox 'pageNumberTextBox':
The expression contains object 'PageNumber' that is not defined in the current context."

Any thoughts on that? The TextBox is in the page footer. I have tried using the PageNumber for conditional formatting elsewhere and it comes up the same everywhere.

Regards,
 Martin

0
Steve
Telerik team
answered on 04 Feb 2010, 09:07 AM
Hi Martin,

As explained in the Understanding Report Sections help article, the global objects PageNumber and PageCount can only be used in page section - make sure you're not using them in report footer for example instead of page footer. Anyway I've prepared a sample report showing the described functionality.

Greetings,
Steve
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
General Discussions
Asked by
Östemar
Top achievements
Rank 2
Answers by
Steve
Telerik team
Östemar
Top achievements
Rank 2
Share this question
or