How to set the printing direction of the column area of a cross tab on pages when using an interval
Hello everybody,
we are relatively new to BIRT and work with version 4.7.0.
How is it possible to determine the printing direction of the column area (cross tab) on the respective pages? First, the pages containing the different values for the column headers should be created. Only then should the other data from the rows appear. I have already tested the options "horizontal" and "vertical" in the property "Orientation" of the cross tab itself, but unfortunately without success.
To have only 4 header columns on one page, we use the interval under "Cross Tab" -> "Column Area" -> "Page Break" -> "Interval".
Thank you very much.
Many greetings
Alex
Best Answer
-
Hi Alex,
Open source does run and render together. The pro version does them separately. You said, "We use separate run and render task." That's why I asked if you were running pro.
If you can't find a solution with your Java class, take a look at this thread:
https://communities.opentext.com/forums/discussion/57705/dynamic-creation-of-tables-in-birt
My thought is that you can use the technique described in this thread to run the query in code and get the length of the text that will be displayed in the crosstab before the crosstab's onPrepare event triggers. You can use that information to set the row page break interval in onPrepare.
I have not tested this so I am not certain it will work.
Warning No formatter is installed for the format ipb0
Answers
-
Can you help answer this question?
We have noticed this question is over 30 days old and hasn't received a response. We're turning to you, the community, to help answer it.
This generic response is intended to prompt discussion in this post. The question remains open to your answers, suggestions, and best practices.
If you posted this question and were able to resolve the issue, please share your solution here with others. If you still need additional help, though, please let us know. Your question and its resolution are important to us, and we want to help.
- Please note that questions to the developer network are typically peer-to-peer, best effort responses.
- Additionally, note that posting questions to General may not be answered by a product expert. The General forum is for non-product questions. Please be sure to your product-specific questions to the proper product forum.
David Sciuto
0 -
Hello, Jeff,
thank you for your answer. In the example I've shown, your solution works perfectly. Unfortunately I didn't mention that the number of lines is variable and that the first column is a text item with variable high. Therefore I don't know how many rows are fitting on the first, second, third ... page.
Do you see a way that the interval of the Row Area Page Break can be set dynamically per page (depending on the row previously printed)?
Many greetings
Alex0 -
Hi Alex,
There is a way to set the Row Page Break Interval dynamically, but I don't think it is going to help for the case that you described. To dynamically configure the page break, add the following code to the onPrepare event handler of the crosstab:
function onPrepareCrosstab( crosstab, reportContext )
{
crosstab.setRowPageBreakInterval();
}Here is the issue:
This only works in the onPrepare event of the crosstab. The data set has not yet run when this event fires, so dynamically getting the length of the data is not possible. I tried putting the above code in the onCreate event of the crosstab thinking that I could create a computed column to get the length of the data and use that value to set the value of the Row Page Break Interval. The setRowPageBreakInterval() method wouldn't run in the onCreate event of the crosstab. It makes sense that the page breaks would need to be known prior to creating the elements.There might be a way to query the database ahead of the crosstab's onPrepare event. It would require a significant amount of custom coding if it's possible. Another option is to adjust the data element, crosstab, and/or master page formatting to display the data in a way where the page break isn't an issue. If that can't be done, perhaps you could fix the size of the data element so the page break will be constant and add a hyperlink to the data element. The hyperlink could be clicked to pop up a window showing the full text when it is too large to display in the crosstab.
If you come up with a better solution, please post it.
Warning No formatter is installed for the format ipb0 -
In my previous post, crosstab.setRowPageBreakInterval() should have an integer value inside the parenthesis indicating the number of rows. For example:
crosstab.setRowPageBreakInterval(10)
or
var n = code that gets no. of rows
crosstab.setRowPageBreakInterval(n)Warning No formatter is installed for the format ipb0 -
Hello, Jeff,
thank you for your tips. Unfortunately the required layout is given by a legal sample, so that I have little or no scope for changes to the font sizes etc. there.
I'm going to try a little more. Maybe I can find another way. If things get tough and I can't find a solution, I'll probably have to deal with automatically separating the PDF pages and then putting them back together in the required order. But that wouldn't be a nice solution.
Now that I'm thinking about it again... We use separate run and render task. Is there a way to manipulate the document after the run task or during the render task and change the order of the pages there?
Many greetings
Alex0 -
Hi Alex,
Open source does run and render together. The pro version does them separately. You said, "We use separate run and render task." That's why I asked if you were running pro.
If you can't find a solution with your Java class, take a look at this thread:
https://communities.opentext.com/forums/discussion/57705/dynamic-creation-of-tables-in-birt
My thought is that you can use the technique described in this thread to run the query in code and get the length of the text that will be displayed in the crosstab before the crosstab's onPrepare event triggers. You can use that information to set the row page break interval in onPrepare.
I have not tested this so I am not certain it will work.
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management