I'm a newbye in Birt and I'd like to make a report for printing label on a "Printing labels paper" based on an A4 with 20 labels (5 row x 4 col).
I developed the report using 4 tables in a row and each table has a filter like that:
row[0]%4 eq 0 (filter of table 1)
row[0]%4 eq 1 (filter of table 2)
row[0]%4 eq 2 (filter of table 3)
row[0]%4 eq 3 (filter of table 4)
All seems to be ok but I need to insert an input parameter that will contains the starting row for the first page. Ex: user insert 5 as starting row and automatically the report will be start from 5th row of first page. If labels are much more than 4, report will generate the 2th page starting from 1st row and so on.
I tried to set margin on first page but I found the same margin in the next pages too.
Thanks
GG
You could add an empty label just above your table, and add a script in the "onCreate" event of this label, to compute a margin dynamically:
var rowHeight=15;
this.getStyle().marginTop=(params["rowSkipNumber"].value*rowHeight)+"px";
Additionnally you may want to hide this label when the parameter is 0, in its "visibility" property with an expression such:
params["rowSkipNumber"].value==0
Related
I have a Google sheet (sheet A) that gets fed from another sheet (sheet B). I am trying to auto-rank the rows when new data gets added to sheet B.
In the provided example screenshot (Example below), I use a formula for the "Points" column (M). All it does is if Column L has a value of 1 then assign 7 points, if the value is 2, then assign 5 points, and if the value is 3 then assign 3 points. All others get 1 point. So every new row is added - the points are automatically assigned.
={"Points";arrayformula(IF(L2:L="",,IF(L2:L=1,7,IF(L2:L=2,5,IF(L2:L=3,3,1)))))}
The Rank column (L) uses the formula =RANK(K2, K:K).
I want a similar formula similar to points formula that ranks each of the new rows based on the Points.
I tried this formula but it does not work -
={"Rankings";arrayformula(IF(K2:K="",,IF(K2:K>1,RANK(K2, K:K))))}
Any help is appreciated.
Example Screenshot
you can try this in Column L
={"Rank";BYROW(K2:K,LAMBDA(ax,IF(ax="",,RANK(ax,K2:K))))}
I have made a guest list sheet in Google Sheets with two columns, one of name and one of attendance. The attendance column can have two values, either X (when people don't come) or a number (mostly 1 or 2, but safe to say always bigger than 0).
I've already created a custom formula marking the whole line (including the name) red if there is an X in the second column.
This formula works like a charm!
I now want to do the same thing, but making the whole line (including the name) green if there is a number placed in the column. I've tried replacing the X in the custom formula with 1, 2, 3 etc (also with colons and semi-colons) but that doesn't work.
Does any of you know what I need to do?
Please select ColumnsA:C and: Format > Conditional formatting..., Format cells if... Custom formula is and:
=and(isnumber($C1),$C1<>0)
with green fill for Formatting style and Done.
(Assumes 2 etc are Number format.)
I'm using Google Spreadsheets. I'll be using this image from a very similar question.
http://i.imgur.com/jqcNW.png [a link]Google Spreadsheet Formula to get last value in a row
Instead of giving the value, I want the Column top to show. So the H column would look something like: 2 1 3 1 4
(The product numbers from Row 1)
If it helps =index(B2:G2;1;counta(B2:G2)) was the answer given to the original question. My values would be words instead of numbers. It'd need to track the last 'Yes' in the row with the column top being dates.
I think this should be easy:
=index($B$1:$G$1;1;counta(B2:G2)) - if you write this to the H2 cell, it should search the "N"th element in the FIRST row ($B$1:$G$1) - where N represents the value of non-empty cells in that row (B2:G2).
You can then populate this H2 formula downwards.
Let me know if this helps.
Hi I am new to Excel/Google Spreadsheet.
I have a problem that I want to search the entire sheet for a given string.
For example the table looks like
A B C D
1 foo 1 bar 2
2 bar 9 abc 3
3 foo 2 bar 4
LOOKUP/MATCH/VLOOKUP can only search one row or column, I need a formula to search for the whole sheet for 'bar', and return the array of all found cells, e.g. {$C$1, $A$2, $C$3}.
What's more (the ultimate goal) is to calculated the sum of the numbers next to the found cells, in this example, 2+9+4=15.
I hope this can be achieved without VBA so that I can use the formula in Google Spreadsheet as well.
For your example, in Excel:
=SUM(IF(A1:C3="foo",B1:D3,0)) entered as an array formula, with ctrl-shift-enter
In Google:
=ARRAYFORMULA(SUM(IF(A1:C3="foo",B1:D3,0)))
The ranges can be as large as you like. The important points are that the first range covers all of the values you want to look for text in, and that the second range is the same size but shifted one cell to the right.
I've searched and read through answers related to conditional formatting, but I can't seem to get mine to work, so maybe I'm doing something wrong.
I have a worksheet for work. It contains a list of animals in our shelter. What I'm attempting to do is color the entire row green if they've been adopted (noted by an "X" in column "G"). I've had =$G$2="X" and =$G2="X", but neither work. It'll only color the one row that was active when I set the rule, and when I enter "X" in another row, it does nothing. What am I missing?
Use the "indirect" function on conditional formatting.
Select Conditional Formatting
Select New Rule
Select "Use a Formula to determine which cells to format"
Enter the Formula, =INDIRECT("g"&ROW())="X"
Enter the Format you want (text color, fill color, etc).
Select OK to save the new format
Open "Manage Rules" in Conditional Formatting
Select "This Worksheet" if you can't see your new rule.
In the "Applies to" box of your new rule, enter =$A$1:$Z$1500 (or however wide/long you want the conditional formatting to extend depending on your worksheet)
For every row in the G column that has an X, it will now turn to the format you specified. If there isn't an X in the column, the row won't be formatted.
You can repeat this to do multiple row formatting depending on a column value. Just change either the g column or x specific text in the formula and set different formats.
For example, if you add a new rule with the formula, =INDIRECT("h"&ROW())="CAR", then it will format every row that has CAR in the H Column as the format you specified.
=$G1="X"
would be the correct (and easiest) method. Just select the entire sheet first, as conditional formatting only works on selected cells. I just tried it and it works perfectly. You must start at G1 rather than G2 otherwise it will offset the conditional formatting by a row.
To set Conditional Formatting for an ENTIRE ROW based on a single cell you must ANCHOR that single cell's column address with a "$", otherwise Excel will only get the first column correct. Why?
Because Excel is setting your Conditional Format for the SECOND column of your row based on an OFFSET of columns. For the SECOND column, Excel has now moved one column to the RIGHT of your intended rule cell, examined THAT cell, and has correctly formatted column two based on a cell you never intended.
Simply anchor the COLUMN portion of your rule cell's address with "$", and you will be happy
For example:
You want any row of your table to highlight red if the last cell of that row does not equal 1.
Select the entire table (but not the headings)
"Home" > "Conditional Formatting" > "Manage Rules..." > "New Rule" >
"Use a formula to determine which cells to format"
Enter: "=$T3<>1" (no quotes... "T" is the rule cell's column, "3" is its row)
Set your formatting
Click Apply.
Make sure Excel has not inserted quotes into any part of your formula... if it did, Backspace/Delete them out (no arrow keys please).
Conditional Formatting should be set for the entire table.
You want to apply a custom formatting rule. The "Applies to" field should be your entire row (If you want to format row 5, put in =$5:$5. The custom formula should be =IF($B$5="X", TRUE, FALSE), shown in the example below.
Use RC addressing. So, if I want the background color of Col B to depend upon the value in Col C and apply that from Rows 2 though 20:
Steps:
Select R2C2 to R20C2
Click on Conditional Formatting
Select "Use a formula to determine what cells to format"
Type in the formula: =RC[1] > 25
Create the formatting you want (i.e. background color "yellow")
Applies to: Make sure it says: =R2C2:R20C2
** Note that the "magic" takes place in step 4 ... using RC addressing to look at the value one column to the right of the cell being formatted.
In this example, I am checking to see if the value of the cell one column to the right of the cell being formatting contains a value greater than 25 (note that you can put pretty much any formula here that returns a T/F value)
In my case I wanted to compare values in cells of column E with Cells in Column G
Highlight the selection of cells to be checked in column E.
Select Conditional Format: Highlight cell rules
Select one of the choices in my case it was greater than.
In the left hand field of pop up use =indirect("g"&row())
where g was the row I was comparing against.
Now the row you are formatting will highlight based on if it is greater than the selection in row G
This works for every cell in Column E compared to cell in Column G of the selection you made for column E.
If
G2 is greater than E2 it formats
G3 is greater than E3 it formats etc