How do i find(or calculate) the Height of the Header in the Word document (OPEN XML)? - openxml

Is there a way i can find the height of header for each page in a word document . Currently there seems to be no way which lets us find the header height ?
Is there any other way i can go about this ? I tried with the pageMargin but nothing in that leads to finding the height of the header content ?

Height of the header or a footer can be found in the Section Properties.
Within the section properties you'll find an XML element .
The header attribute of that element specifies the header height.

Related

Crystal report scroll like header

I am trying to create crystal report that has dynamical scroll like header section.
i want a header section that depending on its size may go on second page just like detail section does. the twist is that header consists from multiple small header sections that are not static :/ sometimes one of those might be suppressed and other times not.
for example:
we have H1 H2 H3 H4 H5 D1 F1
i do not want header 1 to be repeated on every page which i can easily suppress
but what can i do for header section 2 ?
I do not know will it be printed on second page or on first ? it may be also printed on third, depending on the length of first header section.
so what i want to know is:
1) how can i dynamically grow header section on next page
2) restrict section from repeating after first print
if anyone knows how to do this please help
thank you in advance

How to reduce space in crystal report detail section?

I have a crystal report. In that I need to reduce much more space in detail section. how to do that?
I tried suppress method.but again it showing same problem. how to solve this ?
Here is my crstal report design and output samples
Here is output sample
while taking print it is showing more space . after first report entry , it is showing more space. indicated using next report in red line.
Here are a few ways:
align the top edge of each item to the top edge of each section
make the height of each item in each section equal to the height of the shortest item in that section; if you need any field to grow, toggle its 'can grow' property to checked
set each section's height to match the height of its tallest field
delete or suppress PageHeaderSection4 and ReportFooterSection2
does the Supplier ID and associated field need to be in its own section?

How to stretch text field on multiple pages in Jasper Reports?

Scenario:
I have a jasper report with multiple text fields inside a detail band. Each text field has the properties:
Position: Float
Stretch Type: Relative to tallest object
Print When Detail Overflows: False
Stretch With Overflow: True
The details band has the property:
SplitType: Stretch
Current Result:
When one of the text fields is taller than the page and extends to a next page, all other text fields stretch to the end of the page.
Problem:
I want all text fields to be able to stretch on the next page as well. If I use the property 'Print When Detail Overflows: True' then this causes the text fields to be 'reprinted' with data duplicated. That is not my intention. I want to be able to stretch the text field to more than one page.
Thank you!
I also have same problem and after playing whole day did not figure out anything :-(.
My workaround was to set whole band to "Prevent" split type. It is not solution. Only trying to not have text fields 'reprinted' with data duplicated.
You can try setting to the field's Stretch Type to Relative to Band Height. If that didn't work, just play with those properties. I believe you can accomplish it by playing with the properties you mentioned.

iReport: how to hard fix a detail band's height, independent of it's content

I use iReport and I try to fix a detail band's height independently of its content. My problem is that if one of my text fields has more than one line, the band "grows" and because of this I get a second page.
So is there any possibility to hard fix the height of a detail band?
Try setting the stretch type for the text field to "No Stretch" and the split type (see the properties menu) for the detail band to "Prevent".
Since we could not find any direct options, We are doing this in an indirect method, having PLSQL Procedure for data fetching, different sub-datasets are used for filling fixed height detail areas, so each fixed datasets are filled with max.rows which it can accomodate (within sub procedures). Hope it helps someone.

How to stretch a text field relative to data width in Jasper Reports

I have a text field followed by a static text field and I am trying to do 2 things with it:
Get the text field to stretch horizontally (not wrap) when text is longer then the field width and
Push the static text field right when the text field to the left of it stretches
Both of the fields are contained within a frame.
I have both fields set to positionType=float and the text field set to stretchWithOverflow=true, which enable text to wrap vertically but not stretch horizontally.
Is it possible to achieve 1 and 2 above? If so How?
Instead of having 2 text fields (dynamic and static), you can have 1 text field with value as $F{Field} + "statix text". This will probably fix your issue. Also, you can set the "width" and "stretch with overflow" properties, as per your requirements.
Well it's bad news!! According to Jaspersoft's documentation on stretching fields it is not possible to stretch the width of a field:
"Usually, the stretching process refers to the height adjustment only.
When stretching report elements, adjusting the width could affect also
the page width and raise unexpected errors at runtime (for instance,
truncated information could be printed out on pages). This is why
stretching an element let its width unchanged, while its height gets
definitely enlarged in order to make room for all information that
have to be displayed." (Jaspersoft documentation [v4.5.0], 2011)
However a solution to the original issue can be found here thanks to #mdahlman
Just select text field and from its textfield properties choose "stretch with overflow" and it will change its height dynamically according to text .enter image description here