How to keep the line row for repeating values in iReport 2.0.2? - jasper-reports

In my table I have repeating value.
I have put isPrintRepeatedValues=false to avoid the repeat values. It was success but I found that the left border is missing for the left cell in a row.
How to make to cover his line for a repeat row only?
The result would be as at the picture (highlighting area) below:

Related

Ag-Grid: lock a column's position to the last column

I am wondering if there is a way to effectively lock a column in Ag-Grid so that the column is always the very last column no matter what.
Background
What I am ultimately looking for is to avoid the blank space after the last column if the grid size is wider than all column width combined. This is to give the grid a consistent, professional look especially considering even/odd rows are rendered usually in different color. I would prefer the blank space also has that alternating background color.
Given there seems to be no grid property that forces the grid to render the blank space at the end as a pseudo column, I am therefore considering to add a pseudo column manually in such a way that:
the pseudo column has no header
the pseudo column has no data
the pseudo column is not sortable (achieved via sortable: false)
the pseudo column is not manually resizable (achieved via resizable: false)
the pseudo column is the only column which has suppressSizeToFit: false
lock the pseudo column to always be the last column so that user cannot drag a column to the right side of it
I've found a way to achieve everything apart from the last item in the above list. I know I can suppressMovable: true but that only ensures the column itself is not draggable, it does not prevent user from dragging a column to the right side of it.
Effectively, I am looking for something similar to lockPosition but instead of locking the column to the front I want to lock the column to the end.
Keep an eye on currently open AG-3326 issue in ag-grid backlog https://www.ag-grid.com/ag-grid-pipeline/
"Allow locking ( lockPosition ) a column to always be either the first or last columns (currently only the first column is supported)"
What I am ultimately looking for is to avoid the blank space after the last column if the grid size is wider than all column width combined
You could use sizeColumnsToFit() API for columns to adjust in size to fit the grid horizontally. Using this API, there won't be any blank space after the last column, but make sure you have not specified the width for at least one column. This is the column that will expand/shrink to fit the size of the grid.
Call sizeColumnsToFit() after the gridReady event has fired.
Here is an effective workaround to lock the right-most column until AG-3326 is implemented.
onColumnMoved: params => {
const columnCount = params.columnApi.getAllColumns().filter(c => c.isVisible()).length;
const maxIndex = columnCount - 2;
if(params.toIndex > maxIndex) {
params.columnApi.moveColumnByIndex(params.toIndex, maxIndex);
}
}
Any column that is moved to the right of the 'locked' column is immediately moved to the left of the 'locked' column.

Adding Two Subtotals in SSRS to Another Cell

I've got a report that I want to sum some of the columns and then do some basic subtraction on the summations on a row underneath. In my screenshot, I've got the columns summing correctly, and the row is hidden which is what I'm looking for.
But I'm not sure how or if I can then take the Sum(Prod_Coll) minus Sum(Proc_Perf) and make that value display in the bottom right cell (Drop Total Here).
Is this possible to do within SSRS?
right click on the empty cell, click create placeholder, click the Fx button next to value and enter:
=sum(prod_coll)-Sum(Proc_Perf)
That should do it unless I'm missing something.

iText split PdfPCell when cell is kept together

I am using a table to create a semblance of what is depicted below. The content I'm generating isn't known before hand. The blue sections of the columns are cells that are kept together in the table and I am using ColumnText to display the table. For clarification I have outlined a sample cell layout in the top right of the image. The problem I'm running into is that when I use setSplitLate(false) with setSplitRows(true) alongside with using keepRowsTogether(int[] rows) the splitting doesn't work correctly. Most of the top right section should be able to fit into the bottom left but as shown in the image it is all moved to the top of the next column.
Is there a way to cause the cell to split as well as keep together with it's header? When I remove the keepRowsTogether(int[] rows) call the cell splitting works as expected.
Also, in my situation I only want it to split if there are two lines at the end of the column and two at the beginning of the next. In other words the cell would only split if it contained 4 lines of text. How would I go about doing this?
I modified the top right column as depicted below, blue representing the rows that are kept together.
As depicted, I have a cell for the header as before but I've split up the paragraph into many different cells. The first and last contain cells with two lines of text and the rest contain one line of text. This way I'm guaranteed that the header will stick with at least the first two lines of the bulleted paragraph. If the last two lines, or the last cell, end up not fitting in the column then because the cell contains two lines, I'm guaranteed that at least two lines will be carried over to the next column, if not more, depending on how many of the middle lines carry over as well.

How to create vertical line in iReport?

I'm using iReport-3.7.4 ,
I want to make table in detail like this ,
but , the line in this table can't longwise until the end of the table,
I've placed this table in detail ..
In iReport, Right Click on a Field, and goto Padding and Borders and set Line width to 1. As shown below:
Put the repetitive things in sub-report and draw the vertical lines in appropriate margins. Load the sub-report in the main window with its width tallies with the parent width. Test & modify the report again an again till you get the lines in the correct places. Moreover make sure you have checked on Print Repeated Values property for the line.
I've attached some reports I've created for my project, hope they can explain you well.
The Parent Report
The Sub-Report
The Final Output
If you really want to draw a line then just drag line element from palette and drag the bottom middle point of that tile element to increase the size and then decrease the width by dragging left middle point.

Create a Crystal Report cross-tab 'header' label

I'd like to create a 'header' label that 1) is centered over the cross-tab and 2) grows with it. Unfortunately, CR 2008 (or earlier for that matter) doesn't have this feature.
In image (below), I've added a text field above the cross-tab, but I can't think of a way to get it to grow/shrink (horizontally) with it.
If you're able to calculate, say by a summary function, the number of columns you will have then you can do this:
In your crosstab, check to see the width of your columns. The columns should be set widths. Edit: The crosstab adds some padding, so you will have to figure out the column width by measuring in Crystal with another field and eyeballing until it's close enough to work
Right-click on your label, and hit "Size & Position".
Add a new formula for the "Width". The X,Y positions should stay the same.
Use the summary function (You could create a SQL Expression or formula that only shows the month/year of your date fields and then distinctCount() them) to find out how many columns you will have multiplied by the width of each column. This will take some trial and error for sure, but I don't see why it wouldn't work.