The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
nidhi
2 years agoNew Contributor II
How to adjust report margins using Cube view extender rule.
Hello,
We are having this below requirement, where we trying to achieve this using Cube View extender rules.
| Rule should vary margin depending if it's landscape or portrait. If Landscape, then Right and Left should be 0.25, Top should be 0.75, and Bottom 0.5 Else If Portrait, then Left should be 0.75, Right should be 0.25 with Top and Bottom 0.5 |
Any help or suggestion will be of great help!
Thanks in advance.
2 Replies
- JackLacava
OneStream Employee
You might need to experiment a bit, to find the right threshold for you, but this approach might work:
Case Is = CVExtenderFunctionType.GetReportOptions Dim reportOptions As New CVExtenderReportOptions() If args.Report.PageWidthMinusMargins > 1600 Then 'Landscape ' set whichever option reportOptions.ReportMarginTop = -1.0 Else ' portrait ' set whichever option reportOptions.ReportMarginTop = 1 End If Return reportOptions - nidhiNew Contributor II
We tried your code it's working fine for Top and Bottom, for right and left we are getting this below error:
Error compiling Business Rule 'Test_R'.
1) Error at line 240: 'ReportMarginLeft' is not a member of 'CVExtenderReportOptions'.
2) Error at line 242: 'ReportMarginRight' is not a member of 'CVExtenderReportOptions'.
Related Content
- 2 years ago