I have a rdlc file that get a data from my db.
I have put 3 groups, my question is if it's possible to remove 1 or more groups by expression?
I'm not sure what you mean by "group", but you can right-click, select "Properties", then Visibility and "Show or hide based on an expression".
If you want to hide it if it only has one value you would do
=Count(Fields!Name.Value, "Foo") > 0
Related
The available choice names for my input controls are not showing. I am not sure if it's the way a set the input controls. Also I would like to use a dropdown list instead of a checkbox. How can I correct these issues. Please see the current look in the image below:
Also, I tried using the "Multi-select Query" and added the visible columns but got Null for the options.
Here is a screenshot.
I also used the following query which has two options which I added as the visible columns.
SELECT DISTINCT tran_type FROM prov.ATrans ORDER BY tran_type
In JasperReports Studio, I created a parameter of Class java.util.Collection with the "Default Value Expression" of
new ArrayList(Arrays.asList("Subscription", "Redemption"))
These are the values I expect to see but appear as null.
Iam using Pentaho report designer and we want to hide a subreport if there is no data .
I have tried to use this formula :
not(isemptydata())
in the visible expression but it does not seem to work .
So how to hide a subreport if no data .
Pentaho Report Designer elements have "attributes" and "style" sections. In style section there is a field "Visible". If you don't want to make the sub-report visible, it must be set to "false".
When want a function to disable it, the expression must return a "FALSE()" value.
You don't specify how the sub-report is generated and where is it placed (Details, Report Footer, etc), but, I'm gonna assume you have defined a function that has the count of rows for a group "TOTAL_ROWS" (and this is gonna be the field you are gonna compare), so, to hide the sub-report when 0 rows are present:
=IF([TOTAL_ROWS] = 0; FALSE(); TRUE())
"if the total number of rows is zero, return false, else return true".
I'm new to SSRS 2012 and have a question about variables. I have a report that retrieves order and order line information from our database (order #, order line #, item, quantity, etc). I need to add a textbox to the footer of the report that can only be displayed for certain items (i.e. if item # equals "123" then show textbox, otherwise hide it.
I added a report variable called 'ItemExists', and unchecked the read-only flag, and set the default value to 0.
I then added an expression to the textbox on the report footer to show it if variable=1, and to hide it if variable=0.
I'm trying to add a textbox with an expression to the body of the report (same group as where the item # is displayed), but I'm unable to get the report variable to update properly. Here's what I tried:
=IIF((Variables!ItemExists.Value = 0) and (Fields!item.Value = "123"), (Variables!ItemExists.SetValue(1)), Nothing)
This works if the value of the item is 123, but if the item is not equal to that value, it still sets the ItemExists variable to 1.
The reason I'm checking to see if the variable is equal to 0 is that there may be multiple lines in the report, and if any one of the items is a match, I want the variable to be set to 1.
I'm not sure if I'm way off track here, but if you could provide any assistance on the best way to achieve this, that would be great.
Thanks in Advance.
I'm trying to show / hide fields in a Pentaho report based upon user input.
For example, I would like to offer a checkbox to the user saying "Show Product Count" -- if the box is unchecked, it will not include that column in the report.
Is there a way to do this in Pentaho Report Designer, perhaps using Parameters?
Thanks for the help -Monica
Yes, you have half the answer. Have a Yes/No Parameter "ShowProductCount"
Then on the conditional fields, go to the visible property, click the + formula icon and enter:
=IF([ShowProductCount]="Yes"; TRUE(); FALSE())
Simple! :)
There is more to this that the above answer. For example, if you don't want a field to show on the report, you pass the value mentioned above by Codek but the field will not show but the space for it will. The field has to be in a BAND and the band layout has to be set to ROW. Also, on the field you want to not display or display based on user selection, you have to set that field's style properties under size & position - invisible-consumes-space = false.
I have two tables in my rdlc report. First table contains 7 rows (all are header) which are bind to dataset1. The next table contain the Group header, Details and Footer section which are bind to dataset2. I want to repeat the first table header rows on each page in my report.
Please suggest me the correct solution as I have already tried the options like - "Repeat on New Page Option", "Keep Together" and "Fixed Header" properties, but nothing happened.
Regards,
Anki
To repeat rows with column headings for a table with row groups
*In Design view, select the table. The Grouping pane displays the row groups.
*On right side of the Grouping pane, click the down arrow, and then click Advanced. The Grouping pane displays static and dynamic tablix members for each group. You can only set properties on a static tablix member.
*In the Row Groups pane, click the static tablix member for the row that you want to repeat. When you select a static tablix member, the corresponding cell on the design surface is selected, if there is one. The Properties pane displays the properties for the selected tablix member.
*Set the KeepWithGroup property in the following way:
*For a static row that is above a group, click After.
*For a static row that is below a group, click Before.
*Set the RepeatOnNewPage property to True.
*Preview the report. If possible, the row repeats with the group on each vertical page that the row group spans.
http://msdn.microsoft.com/EN-US/library/cc627566.aspx
Open the report in XML editor and
follow the steps mentioned in
https://stackoverflow.com/a/16845266/4117628
Open up the the RDLC file in the xml editor (right click on the file in VS and select "Open With.." and then "XML Editor")
Search for the entry <Tablix Name="your table name"> (if you have only one table you can omit this step)
Search for the entry (before the closing </tablix> for the table)
<TablixRowHierarchy> <TablixMembers>
In the first <TablixMember> node (if your headers are on the first row in the table) add the following entry <RepeatOnNewPage>true</RepeatOnNewPage>, so the entry will generally look like this:
<TablixMember>
<KeepWithGroup>After</KeepWithGroup>
<RepeatOnNewPage>true</RepeatOnNewPage>
</TablixMember>
on the groupings window you need to hit the little down arrow across from "Column Groups" and hit advanced view, select the static row that contains the header columns, the first one, and make sure repeatOnNewPage = true, KeepWithGroup - After