How to remove empty rows in pentaho report designer? - pentaho-report-designer

We are using Pentaho Report Designer, after publish the report, We are getting some empty rows with data rows in report. We don't want that empty rows.
Please give the solution for remove empty rows in report.

Use the expression formula (green plus sign) for "visible" property on the elements you need, to define the condition under it the components will be visible, so elements that satisfy the condition on expression formula will be visible or not.
You can use it at band level, so, if you wanna hide an entire band (it can be de details band for a specific row) e.g.:
Click on the band you wanna hide under certain condition
Once the element is selected, click on the green plus sign, and set the expression formula desired to make the band visible e.g: =IF(NA([possible_empty_column]);TRUE();FALSE())
voila!

Related

Is it possible to filter the list of fields when outputting a Full Dataset?

I have a DataTable that I'm passing to a FlexCel report. It contains a variable number of columns, so I'm using the Full Dataset feature (e.g. <#table_name.*>).
However, only a subset of the fields are dynamically generated (I have a variable number of attachments). The column name for each attachment field starts with a common word (e.g. "Attachment0", "Attachment1", etc).
What I would like to do is output the known finite set of fields and then the variable number of attachments. It would be nice if I could write something like <#table_name.Attachment*> (and <#table_name.Attachment**>). Is there any way in FlexCel Reports I can achieve the same result?
A side benefit to such a solution means that I could keep the formatting for the known/finite set of fields.
Update
I added place holder columns to the document, each with a <#delete column> tag, so that the un-wanted columns/data are removed.
Although this works, it's not ideal. For example, if I want to see how the columns fit in the page width (in print preview), then I need to hide the columns. Then I have to remember to un-hide them again, so other developers can see/understand my handy work.
It would be much more straight forward if I could filter the fields before they're output to the document.
I realised there's an alternate way around this problem. I broke up the data into two sets of data - <#table_name.*> and <#table_name_attachments.*>.
The fixed set of fields are in the first table and the variable set of fields is in the second table (all the "Attachment*" fields). When the report is run, I place them next to each other (in the same order) in the same worksheet. This means I have two table ranges - "_table_name_" and "_table_name_attachments_" on the one sheet.
Now I'm able to run my print preview without hiding/re-showing the columns-to-be-deleted. I've also eliminated human error - it was all to easy to accidentally set the wrong number of padded/delete columns.

Need to compare dates in SSRS

Pretty new to SSRS and I have a datetime field in my SSRS report "Fields!Call_Attempt.Value" that I want to affect another text box in my report. If this field is between two specific times I want this box to return a unicode checkmark.
So my code looks something like this
=iif(Fields!Call_Attempt.Value < 12:00:00
and Fields!Call_Attempt.Value >= 8:00:00, "✓", "")
Obviously this code doesn't work. I just haven't been able to find the logic in SSRS to compare datetimes...
Thanks for looking
You could try adding a calculated field to the data set with the following expression:
=IIf(Hour(Fields!Call_Attempt.Value)<12 and Hour(Fields!Call_Attempt.Value)>=8, "x", "")
I'm assuming that you have a table in the report, and the one of the cells in that table is the date/time field.
You could add a calculated field to the data set with the check/unchecked value you want, then include that field in the table.
You could change the properties of the table cell and include the above expression as the value for the cell. (Right click the cell, choose Properties. The cell value is under the General tab and you can put the expression there.)
More than likely, you'll want to include multiple columns in the table, one with a formatted date/time and another with the checkbox. In that case, you can add a column to the table, then merge the header cells and change borders so that it looks like one column with some of the values checked.
In summary, you could use the above expression to return whatever you need for anything in the table cell: the value, the tooltip, the font, the text color, the fill color, the action, the alignment...

Dynamics AX MorphX WMSPickingList Report

I am trying to modify the WMSPickingList_OrderPick Report in Dynamics AX 2009.
I am attempting to move the InventDim group onto the same line as the actual Item Line, as it currently prints underneath.
I have tried manually moving the fields, in this case no data appears.
I have tried switching the parameters so that the item dimensions appear after or a part of the item number, in this case it still appears below.
I have also attemped to simply pick up the values in the Fetch statement and pass them to variables, I can see the values being picked up but on returning them in a display method no data appears?
Many thanks for your help in advance.
Go to Accounts receivables > Setups > Forms > Forms Setup
In the "General" tab > "Print item dimensions" group, Select the "Print item dimensions" as "After item number"
I am assuming it is currently set to "Under item line"
The problem with WMSPickingList_OrderPick report is the width of the design, the design doesnt have enough width to print the Inventory Dimensions, they dont appear when u put them in the same line because the columns overlap.
However, one very clean solution can be to use a Display method as datasource for the Item ID (i.e item number) and in that display method just append the dimension.

RDLC report footer with value from "Current Record"

I don't know if its possible or not, but thought I'd ask. Many times reports need data grouping to have anchored to the bottom of the report some summary information, such as invoices. You don't want the totals shifting UPwards based on only 2 detail lines vs another with 20. I've tried working with using the Tablix bound to the data source for the output but couldn't get it quite right... It would either shift up, or force break and appear at top of following page.
So, if anyone has some ideas to help resolve that, that too would be great.
My second approach was to just use a simple report page footer. However, the overall "Report" page is not technically "BOUND" to any datasource. So, if I put a textbox in the footer and want it to show something, I can't pick "the most recent row from the datasource associated with the Tablix", it always requires an aggregate, such as
=First(Fields!SomeField.Value, "SomeDataSource" )
=Sum( ...
=Last( ...
etc...
I just want it to have whatever was the most recent... so I tried to use report variables to create one and was thinking to have it get updated per row being processed, so it always had whatever the "latest" value was and I could just dump that value at the bottom of the report.
Any suggestions to either would be great. Thanks.
I know this is an old question, but I had a very similar problem and came up with a unique solution. I had a statement that needed to have the payment slip print at the bottom of the page even if the statement line items wrapped over to another page. I solved it by:
Making all rows in the report a uniform height.
Calculating how many rows were required to fill the page (minus the height of my payment slip.
Getting the number of line items in the statement.
Calculating the remaining number of rows needed to push my payment slip to the bottom of the page.
Adding a sub-report with the calculated number of blank rows to pad out the necessary space between the line items and the payment slip.
The advantage of that approach was that I could generate bills for multiple customers, and since the padding is part of the group it would be customized for each customer's bill and bottom-justify the pay slip for each of them.
You can use a similar approach to push your "footer" info to the bottom of your page. Since it is still inside of your data group you'll have access to the data values you need as well.
In the footer you can refer to report item from report body, like this:
=ReportItems!myFooterValueTextBox.Value
The catch is that you can refer to only one report item in your footer, so you may need to add invisible footer row in your table and concatenate all your totals into one cell (myFooterValueTextBox) in that row:
=First(Fields!SomeField.Value, "SomeDataSource") + "|" +
Sum(...) + "|" + .... +
Last(...)
I used pipe as deliminator in my example, so then in the footer, I would split the string and place values in appropriate containers, like this:
=Split(ReportItems!myFooterValueTextBox.Value,"|")(0)

InfoPath Repeating Tables: Force all rows to have same value for one column

Does anyone know a way to have all the rows of one column of a repeating table to always have the same value?
Say the user changes the value in the first row for that column, then all the other cells in that column change to have the new value. (Preferably this will happen if a user changes any cell in the column, not just the one in the first row, but just the first row would be fine if that's all that's possible).
I have access to both InfoPath 2007 and InfoPath 2010 so can use either. The form submits data to and receives data from an SQL Server database. Code is fine if this requires it.
You basically want to change the field from a repeating field to just multiple copies of the same field (since you want it to always be the same there is no point in storing multiple versions).
On the data source tab, all the fields that you put in the repeating section are in a group folder with the little repeating icon on it. Right click on the field you want to be non repeating and choose move. Put it anywhere outside the repeating group folder (the encompassing folder is usually a good choice but it can be anywhere). The field on the design surface will now show a little info box that says "this item can't be repeated" (or similar).
Now you just have multiple copies of the same field - so if you change any one of them they will all update to reflect the value.

Resources