I have a report with 24 charts, one for each hour of the day. The user can choose to show one, a couple, or all the charts, based on a drop down. The drop down is tied to a parameter that allows multiple values. See below:
The problem is that if the user chooses one or a few hours from the drop down, all the charts show, and the one(s) chosen give data while the others say "no data available".
Currently for each chart I've added the following to show data if the value was chosen in the drop down:
=Switch(Parameters!HOURINPUT.Value(0) = "0", false)
Is there a way to hide the charts that the user did not choose from the drop down?
It would look nicer to hide the chart and see only the ones chose than have a blank box that says "no data available" in them.
UPDATE:
More than one parameter.
Assuming that the only differences between the charts are the hour of the day specified, then I suggest:
Add a new dataset to the report with values 0 to 23 as selected in the entered HOURINPUT parameter - something like: with cte as (select 0 n union all select n+1 n from cte where n < 23) select n report_hour from cte where n in (#HOURINPUT)
Add a new tablix to the report, with a single detail cell only, bound to your new dataset.
Move one of the existing graphs into the new table's detail cell so that it becomes a subreport, replacing all hard-coded time references in the graph with references to the report_hour value from the new dataset.
You can then remove the other 23 graphs.
In addition to ensuring that graphs are only displayed for the times selected, this should also simplify future maintenance of the report, since any changes required to a graph will only have to be entered onto the one graph (instead of all 24).
Related
I have a table, which is listing the name of benefits and it is only 1 column (just name of the benefit).
I'm wondering if there is any native function of BIRT Report Designer to produce rows not only vertically but also populate horizontally to 3-4 columns.
Something like below:
Benefits List
Benefit-1 Benefit-3 Benefit-5
Benefit-2 Benefit-4 Benefit-6
Thanks in advance for any advice.
Ok, I found a solution!
Under the following link there is a Eclipse Community Page Link recommendation about an additional computed column. Even though I don't have any computed column, the recommendation gave me an inspiration. Instead of creating an additional column, I used the rownum that is used generally to bind dataset parameter. For the table row, I created "visibility" condition that checks if the rownum + 1 is divided by 3. Depending on what is the result, it will be hidden or viewed:
Main Grid
It includes a grid with 2 rows and 3 columns. 1 row is merged to view the header. In each column of second row, the same table is placed with the same dataset.
Image Showing Main Structure
Select Table Row
Image Indicating Row Selection
Set the Visibility
Image Showing Details of Visibility Condition
The syntax basically means: "Do not show the row if the division result is not 1".
For the second column, you will need to compare with 2: (row.__rownum + 1) % 3 != 2 and the third column with 0: (row.__rownum + 1) % 3 != 0
Hope it'll be helpful for someone.
An more straightforward approach ist to use a List item instead of a Table item.
In the detail area of the List, create a Grid item of fixed width and height.
Put the content (e.g.) text into the grid's cells.
Important: Set the "display" property of the grid to "inline" instead of the default "block".
This way BIRT will put the grids from left to right until the line is full.
Then it will fill the next line (think of "display: inline" like adding words to a paragraph).
I was asked to create a report (in SSRS visual studio 2019).
The report has the following table number, numeric. How many people per table (generally 4-12), names, etc and the order in which the people will sit. From this I'm being asked to create is a graphic visualization of a circle (broken out evenly by number of guests per table) in the order of which they are seated.
For example here is my data set:
I need to create a seprate page with the lists below so it would like like this
Page 1 would have this:
Table 1 - 8 Guests
Page 2 would have this:
Table 2 - 4 Guests
we can also use embedded images -- the team has an image for each table size but we still have to obtain the locations of each spot (which means we'd have to know how to divide a circle)
You can do this easily.
Add a list or single column table and the set Dataset property to your dataset name.
Change the row group (probably called "details") by adding a group that groups by table.
Now insert a pie chart into the table cell. We should now get 1 pie chart per table.
Click the pie chart and add a value entry, set the value expression to =1/countrows(), this bit will just split the chart up evenly based on the number of guests.
Set the category group to the guest field.
Right-click the chart and "Show data labels", then right-click the label and set the value to this expression =Fields!id.Value & " - " & Fields!guest.Value. Set the data label position property to "outside".
Finally click the chart and expand the "custom attributes" section, set the PieStartAngle property to 270, this will make sure the first person is immediately after the 12 o'clock position.
Oh,. and set the chart title to something like `="Table " & Fields!table.Value"
The final output looks like this...
I'm trying to add some indicators into a matrix to show an increase or decrease from the previous year
This is my design view
And this is how it's viewed in the report
I would obviously like my up and down arrows to appear in the currently empty columns. Also I'm wondering if there is a way of deleting the first empty column after 2014/15 as there is no year to compare it to.
SSRS supports a function called Previous, which will be useful in your scenario. Assuming that the name of your column group is "Fiscal", the difference of two years can be calculated as
=Count(Fields!IDNUMBER.Value) - Previous(Count(Fields!IDNUMBER.Value), "Fiscal")
Because you can't know the range of the numbers in advance, I suggest to use a "numeric" expression like
=Sign(Count(Fields!IDNUMBER.Value) - Previous(Count(Fields!IDNUMBER.Value), "Fiscal"))
for the indicator, so the ranges can be defined by single values -1, 0 and 1:
To hide the first indicator column, right-click the column header in design view and click Column Visibility..., then in the cnfiguration dialog specify to hide based on an expression like
=IsNothing(Previous(Fields!Fiscal.Value, "Fiscal"))
Here's a screenshot of my design view:
I am having some issues with specifying a dynamic cell range for a "data validation".
I'm aware you can do some tricky stuff with = "Projections!M4:M"&O2. You can update the content of cell O2 for example to 3 and the output would be Projections!M4:M3.
This makes the value "dynamic". These tricks don't seem to work in the "Cell Range:" input field in the Data Validation selection/configuration screen.
My problem is, I hate seeing drop down arrows (call me o.c.d) for rows that have no content, my number of rows will grow in the future so I don't have any other option than selecting M4:Mfills the whole 1002 rows with drop down arrows.
Has anyone worked out a trick to make dropdown arrows only show up for rows that are filled?
I'm using = COUNTA(B4:B)to get the number of rows that are filled and = "Projections!M4:M"&O2 to make the desired Projections!M4:MX string but the "Cell Range" input field in the Data validation screen doesn't accept this as valid either.
Well I didn't find a direct solution, but something that I can work with to resolve my issue which was I hate seeing drop down arrows for empty rows.
I turned a filter on for a column that will always be filled in and filtered by conditions Cell is not empty but i'd prefer a better solution.
Just a quick question, everytime I hit "edit" "add row" it adds the row but not at the bottom of the table, it usually places it like 5-10 rows from the bottom and while it's not a huge deal it's just time consuming to move it and confusing at times because they're random rows all over now. Is their a setting or a certain way to add rows so they just get added to the bottom of the fusion table instead of randomly throughout?
The rows will not be displayed randomly.
They will be displayed based on the order-settings.
When you didn't define a sort-column they will be ordered by their internal rowID, and that's the issue: the rowID's are not consecutive.
So the answer is: No, you can't.
The only workaround would be to add another column with a incrementing Number(and sort by this column), but I wouldn't suggest it.