Problem with conditionally hiding rows of a grid in generated PDF reports - eclipse

I am generating PDF/HTML report from a BIRT template.
I am using "visibility" property to hide a grid row conditionally. It is working fine and that row is hidden in generated report.
But, I am getting a bottom border missing from the upper grid row in my PDF report and although HTML report is generated perfectly fine.
To understand it see below, for example my report looks like following when visibility is 'true' for row containing location element.
Name
Description
Location
verdict
and after visibility is 'false' for 'Location' row, it is showing as following in generated report.
Name
Description
verdict
The grid line between Description and verdict is missing.
I am using BIRT 2.1.2. Is this a known problem in this version?
Please help.

How are you implementing the separator line? Are you just creating a border around the grid cell? That entire cell/row is getting suppressed along with the border.
To get the effect you want, try applying your visibility rule to the data (text) item itself rather than the Grid element. You could also add a horzzontal rule to the end of each of the text elements to insert a divider that would not be affected by the grid's visibiltiy.

Related

Hide empty rows in group-header in ag-grid

How can i hide this group-header-row(red-box in picture). In this example i have one more hiden column, which has more sub-levels(childs). If they are are'nt shown, they stay as empty line, for this reason header has huge height in some tables. Idk how can i solve this problem. I didnt find in ag-grid api functions or somthing can help.
Image with example

Is it possible to add Sencha grid filter to some TextBox?

I'm using gxt 3.0.1 and I have Basic Grid added on my form.
Now I've added filter for each column which can be used over TextBox in menu of grid columns (basically it's Filter Grid now).
I have to make my own TextBox above grid and apply filter to it. And do that for each column of grid.
Filtering is done locally.
My idea was to look for code they made for their TextBox and apply it on mine TextBox.
But I failed.
It should be just String filter, which should work exactly as filter provided in Filter Grid.
Also I'm using UiBinder.
From the GridFilters javadoc
* Filtering is adjusted by the user using the grid's column header menu (this
* menu can be disabled through configuration). Through this menu users can
* configure, enable, and disable filters for each column.
This is meant to be used to configure column header menus to have filters built in, not set up text boxes outside of the grid - see http://www.sencha.com/examples/#ExamplePlace:filtergrid for how this is intended to work.
To build the way you are describing, start instead with making a StoreFilter object based on the contents of the TextBox, adding it to the store, and re-applying the filter each time the contents of the text box change.
Check out StoreFilterField for a working example, or follow the above instructions to build your own.
If this doesn't work, please provide a code sample in your question...

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.

Border in Detail band

I have a question about how border should display in detail band, and I would like to get some help.
Say, a column in detail band that might have LOTS data, by lots, I meant sometimes a single record might actually took 2~3 page to display.
Now customer ask that we should make report always display bottom line of the border as long as it meets end of page (even this record its not end yet)
What I tried:
Make a column footer with 1px height line.
Set "Floating column footer" to TRUE.
Result : It works great, but this line will make extra empty space at end of the table if there is a Summary band after the column footer. I think I am close, but I just can't get rid of the strange empty space
Make a Frame with border, set "Print when detail overflow" to TRUE then put everything in detail band into this frame.
Result : Not work as I expected :(
Since this report contains not just a table in detail band, and the height of the table are random. Tricks like a border in Background or Page Footer are not suitable here
What else can I do ?
There is a PrintWhenExpression trick that can help with the page footer:
How to hide Page X / Y when report is 1 page ? - JasperForge Forum
The trick is to put a flag in the Report Parameter Map, then use the flag to decide whether text (or fields, lines, etc.) should be printed.
To use a line in Page Footer there will always be some pages with extra line. In this case, the report is always starting from page 1, and the table in the report always end before printing the Summary band. That means, the line is no longer necessary as long as Summary band has been reached. Thus:
Add a line in Page Footer with PrintWhenExpression :
new Boolean(!(Boolean.TRUE).equals($P{REPORT_PARAMETERS_MAP}.get("stopFlag")))
Then make a dummy textField in Summary band with PrintWhenExpression like this :
$P{REPORT_PARAMETERS_MAP}.put("stopFlag",Boolean.TRUE)
This trick works, but might need some tweaking for different layouts.
The option given by Dave is right.
If you care about the space still being used, then set the band and textfield heights to zero.
In my case using Dave's option worked (and I needed no extra space to be used).
I put this as PrintWhenExpression in the fields I just wanted to show in the last page:
$P{REPORT_PARAMETERS_MAP}.get("lastPage")!=null
And this as PrintWhenExpression in a 0-height textfield in the 0-heigth summary band:
$P{REPORT_PARAMETERS_MAP}.put("lastPage",":)")
When it comes to page termination the options are limited. Its made even hard because if you have items that do not display when null it still assumes that space is used.
I would stick with messing around with the column footer or page footer as your best options.