Hide empty rows in group-header in ag-grid - 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

Related

How to avoid the ugly empty space of the placeholder for the vertical scrollbar in QTableView?

In a QTableView instance, rows are variable, the row count are not fixed most of the time. In a moment, if the row count is lower than the display count of the viewport, a ugly empty-space placeholder for the vertical scroll bar will show up as in the below picture.
I tried viewportSizeHint(), maximumViewPortSize(), ... finally, a very simple solution.
Solution: If there is a n-column table originally, super().__init(m,n+1) should be called. The extra empty column is to fix the visual effect.
The last thing to remind, just ignore this extra column. Ignore it! No need any other specific codes for it. No any bad side effects have been found until now.
Feel free to post your reviews.
class KBWWTableModel(QtGui.QStandardItemModel):
def __init__(self, parent: QtCore.QObject=None):
# add a extra empty column to fix the visual effect
# super().__init__(1, 3, parent=parent)
super().__init__(1, 4, parent=parent)

How to edit rowSpan of cell of report in BIRT?

I created a report (.rptdesign) in eclipse/BIRT and added a Grid and some rows in it. I want to change the rowSpan of 1st cell in 1st row to 3. But in properties window, the property is 1:inherited and won't allow me to edit the value. I tried different combinations of width and height (in, %..) and other properties but can't figure out this behavior.
I spent hours and there is barely any resource available online or on official site. Any help is appreciated. Thanks.
when you create a grid with rows- all cells are equal in width. Now what you can do is merge the cells together that will create the rowspan/colspan like this -
Please click on image to see steps
After merging it will look like this -
You can get more information here : eclipse help
You just mark several cells in the layout editor, then "merge cells" in the context menu. To split a block of merged cells again, use "split cells" in the context menu.

ListGrid with auto size - missing columns

I'm using smartgwt ListGrid. The problem appears when it's empty, and if i manually set columns width, i can get some columns clipped in the view port and there is no horizontal scrolling so I can't access them.
But if I add an empty record, the scrollbar appears. I've fixed it by adding
setAutoFitData(Autofit.HORIZONTAL);
setAutoFitMaxColumns(3000);
setOverflow(Overflow.AUTO);
But I need to add some freezed columns to my listGrid. I'd like to use setFrozen(true) method, but its not compatible with setAutoFitData(Autofit.HORIZONTAL);
What I need is
to show a scrollbar if columns are out of the view port, even when list grid is empty.
some first columns must be frozen.
Everything works with the base List Grid with no additional options. But when i set
setShowEmptyMessage(false);
my scrollbar disappears.
Kind of workaround i've found:
setShowEmptyMessage(true);
setEmptyMessage(" ");

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.

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

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.