Can <condPageBreak height='?cm'> change dynamically? - odoo

I have a <blockTable> that change size depending an user input.
I want to continue drawing on next page if there is no sufficient space to draw the blocktable on the same page.
<condPageBreak height='1in'/>
<blocklTable ...>
...
How can I change blockTable height to jump to the next page if there is not enough space on the current page?

I'm not sure about dynamically change or break page. But I use below method. May be it will useful to you.
Try with this RML reports.
The <condPageBreak/> tag is a "CONDitional Page Break". To use it, you give it a height in any units that RML can handle.
It then compares this height with the remaining available space on a page. If the space is sufficient, then the next elements are placed on the current page, but if there is less space than the height you have given it anything following the <condPageBreak/> is continued on the next page
<condPageBreak/> has only one attribute - the mandatory one of
height
For Example:
<condPageBreak height="1in"/>
<condPageBreak height="72"/>
For more details: RML User Guide
NOTE:
Use above examples before the start of <blockTable> tag
For Example:
<condPageBreak height="1in"/>
<blockTable style="Table4">
.
.
.
</blockTable>

Related

How can I remove the search bar at footer added to top?

I want to move the search bar which is at bottom of the data table in admin template to top ..
as this is defined in javascript .. any suggestion pls..
Taking this piece of code from the link you provided.
/*
* Set DOM structure for table controls
* #url http://www.datatables.net/examples/basic_init/dom.html
*/
sDom: '<"block-controls"<"controls-buttons"p>>rti<"block-footer clearfix"lf>',
Here you can see this sDom right. Thats the option in datatable used to set the Table structure and to place the sections accordingly. I would suggest you to take a look at Datatables Dom Settings
The letters you see in the settings are p , r,t, i, l, f. They actually mean
p - pagination control
r - processing display element
t - The table!
i - Table information summary
l - length changing input control
f - filtering input
So by replacing this Dom settings you should be able to place the items as you wish.
So what you would need is .
sDom: 'lftir'
Add the div's and styling accordingly as explained in the Markup and Styling in the above provided link.

XSL / XSL-FO: Different formatting of a block depending on its page position on PDF page

I'm new in this mailing list, so please apologize any of my wrongdoings.
FOP 1.1
Question: Is there any condition to find the position of a text-block in on PDF page.
This is the problem:
I need to change the formatting of a title-block depending on its position on the page.
If the title-block appears somewhere in the (vertical) middle of the page, I want to add a line on top of it.
if the title-block appears at the beginning/top of a page the line must not appear
Does XSL-FO have a way to do that?
From http://lists.w3.org/Archives/Public/www-xsl-fo/2015Sep/0002.html:
I used a white background on the
fo:region-before and a negative margin on the title to 'push' the
'border-before' of the title under the fo:region-before.
This requires that the FO processor supports negative values of
'margin-top', which is allowed but not required (http://www.w3.org/TR/xsl11/#margin-top). It also requires
that the FO processor will 'paint' the fo:region-before after painting
the fo:region-body.

How to specify page size in dynamically in yii view?

How to specify page size in dynamically in yii view?(not a grid view)
In my custom view page there is a search option to find list of users between 2 date
i need 2 know how to specify the page size dynamically? If number of rows less than 10 how to hide pagination ?
please check screen-shoot
I dont want the page navigation after search it confusing users..
my controller code
$criteria=new CDbCriteria();
$count=CustomerPayments::model()->count($criteria);
$pages=new CPagination($count);
// results per page
$pages->pageSize=10;
$pages->applyLimit($criteria);
$paymnt_details=CustomerPayments::model()->findAll($criteria);
$this->render('renewal',array('paymnt_details'=>$paymnt_details,'report'=>$report,'branch'=>$branch,'model'=>$model,'pages' => $pages,));
}
my view
Link
I'm assuming you want the entire list of search result be shown on a single page, no-matter how long it is?
If so, this is quite easy to achive.
As I can see in your code, you are now defining your pageSize to have a size of 10. You can update it to be dynamically be doing this:
$pages->pageSize = $count;
To remove the pagesizes you can change the css of your view file, but for that we would need your view file to see how you defined it.

Change isRequired star position in Struts 1

I am using Struts 1 on a form and need to mark some inputs as required. The thing is that the red star ('*') showing the required fields when marking them with isRequired="true" is by default shown right after the textbox:
alt text http://img402.imageshack.us/img402/2345/input.png
Is there a way to change the star position to the left, right before "Input"?
If needed, the code of this is now:
<layout:text property="input" key="form.input" styleClass="FormInput" mode="E,E,I" isRequired="true" />
You will likely have to write your own custom tag that basically extends the layout:text tag but overrides the output (i.e. where the star is generated if the field has an error).
Start here: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html You could probably skip ahead to the "Examples" page, but the other stuff is good to know too

Hiding Subreports in SQL Report (RDL)

I have a bunch of reports that are printed out and mailed to clients. At the top of the report is the return address, left aligned. I was asked to add an optional logo to the report. This logo should be left of the return address. (The logo and all other info is stored in the database). So if the logo exists, you SHOULD see:
<someimage> <Return Address>
And if no logo exists, you SHOULD see:
<Return Address>
There are many different logos possible placed in many different reports, so to make life easier, the logo was implemented as a subreport. The subreport just grabs the correct logo image, and then it automatically displays in the report.
The problem I'm having is this. If the log DOES NOT exist, then we want the return address left aligned, as shown above. But what is happening is that while the subreport shows nothing, it still takes up space where the logo would be, and the return address is floating a few inches to the right of the left side of the page.
<Return Address>
SO... is there a setting I can use/set to get the subreport to either not show, or not take up any space, if there is no logo to be displayed?
Sorry, hope I made this clear enough. I'm totally new to RDL's.
You should be able to set an expression on the subreport's visibility so that it does not show if there isn't a logo.
Here is the XML from an RDL I had handy:
<Subreport Name="SubReport">
<ReportName>SubReport</ReportName>
<Visibility>
<Hidden>=Not Parameters!ShowLogo.Value</Hidden>
</Visibility>
</Subreport>
This tests against a boolean parameter called ShowLogo, but you could just as easily test the value of another parameter (perhaps the length of a URL?).
To be clear, when specifying the expression for the "Hidden" property, you want it to evaluate to False when you want the element to display. If your expression evaluates to True, that means that the element will be hidden.