How to generate numbers for showing sequence in SSRS also it should get rearrenge when any field inbetween is missing - reporting-services

I am facing problem in SSRS report for showing sequense numbers as given in image.
when I searched for this issue I got solution as -- RowNumber("DataSetName")
but problem with this is, it generate numbers like 1,2,3..., but I want these numbers in following forms- 1.1, 1.2 or 1.1.1, 1.2.1.
And another problem for me is above function will work if I am having multiple rows in dataset and that dataset is bind with table to show its data, but In my case I am getting all data in single row and out of that I am showing values in textbox using expressions and if that value is empty I am hiding that textbox.
so I am not getting any solution to show sequence number in textbox along with text and how I can rearrenge that numbers if my inbetween textbox is hidden because of no data.
Please provide me solution for above probem.
Image for reference -
Example of data is :
From above table values from "Subheading1" And "Subheading2" will show inside "Heading first" and "Subheading3" And "Subheading4" will show inside "Heading second".

You can concatenate row numbers as strings as follows:
=RowNumber("HEADING") & "." & RowNumber("SUBHEADING")
To ensure numbers are consecutive remove the relevant rows in the source dataset instead of hiding them in the tablix.

Related

How to display parts of value from database with different font size in SSRS report?

One of my columns has a value that looks like this -> "$5.95 (Park costs)"
and I need to display the value in column in SSRS report like this:
$5.95
(Park costs)
but font size of "(Park costs)" must be smaller than the price.
Is something like that even possible? To somehow make text that does not contain a number, dot or dollar sign smaller?
You can do this. You'll need to split up each component of the text column and then place each half in a placeholder. You can then format each placeholder individually.
This solution assumes that your column always contains a "(". If not you should be able to modify it to suit.
I Generated some test data and and placed it in a normal table (tablix) control.
I then added some new columns for testing that each part was working as expected.
The expression for "Cost" column is
=TRIM(LEFT(Fields!MyColumn.Value,InStr(Fields!MyColumn.Value, "(") -1))
The expression for the "Caption" column is
=TRIM(RIGHT(Fields!MyColumn.Value, LEN(Fields!MyColumn.Value) - InStr(Fields!MyColumn.Value, "(") + 1))
Once this was working OK I added the "Final Column".
To add a placeholder, click inside the textbox so the cursor appears then right-click and choose "Create Placeholder"
I added two placeholders with a space between then and set the values to the expressions above respectively. I then right clicked the placeholders chose "Placeholder Properties" and formatted each individually.
The final output looks like this. (I left the test columns in for clarity)

SSRS Report Builder 2012 - How to hide list based on field value?

I'm using Report Builder 2012 to create a report. I have inserted multiple text boxes and other controls inside a list box so that I can hide all the controls at once just by hiding the list box. I'm using a SQL Server stored procedure to fetch rows of data. I'm using below expression to hide/show the list box.
=iif(Fields!certificateType.Value = "CT", False, True)
It works fine but it only checks the first row of data. If certificateType field is "CT" in the first row of data, it shows the list box but it doesn't hide the list box back for the next row of data in which certificateType is not "CT". It seems like list box visibility only checks the first row of data and applies it for all the other rows as well. How can i check the visibility of list for all the data rows?
Okay, based on our chat I have updated this solution.
I mocked up some data that looks like this:
certificateType
---------------
AT
BT
CT
DT
ZT
I created a quick and dirty report with a list. In that, I added a rectangle with a textbox in it. I set the dataset for the list to the main dataset (DataSet1 in my case). I set the expression for the textbox to this:
=Fields!certificateType.Value
Image in design mode:
I clicked on the list, and in the Row Groups pane, I right-clicked the Details rows, and chose Group Properties. On the General section, I clicked Add to add a new group expression. Then I chose certificateType from the dropdown.
I moved to the Page Break section of the Group Properties dialog and ticked the Between each instance of a group check box. Click OK.
Now, the report will break for each instance of a certificate type that comes in the dataset. So, if you have ten different cert types in the data, you will get one page for each.
You can't see it in my image below, but there are 5 pages now.
Hope this helps!!

SSRS number format expression showing unexpected results

I have a table that contains metric data for various business units in our organization. There is one column that contains the KPI measurments. I've created a report to display each business units KPI's. Some of the metrics need to be displayed as whole numbers, others need to be displayed as percentages.
I created an expression to handle the multiple formats. The problem I'm having is with the percentages. For example one of the numbers (which should be displayed as 93.74%) appears as 939474%. If I remove the expression and set the format to percentage using the text box properties, the number displays as 93.74%.
Here is the expression I'm using:
= IIF(Fields!KPI_desc.Value like "*Rate",
Format(Fields!Value.Value,"0.00%"),"0")
Any suggestions would be appreciated.
Thank you
I guess you put this into the Format Expression so that it will return the result like integer. Actually you just need to put this expression into textbox directly.
= IIF(Fields!KPI_desc.Value like "*Rate", FormatPercent(Fields!Value.Value,2),"0")

MS Access VBA Cross tab report legend sort order

The problem is hard to explain ,
I have an access report with a stacked bar chart to show the percentage fills over time like the one in this example : Click here
The legend for the chart i have is a number followed by the name, for e.g
1-Mango
2-Apple
3-Banana
etc
I want to sort this according to the above format but when i have more than 10 items the 10-Pineapple comes before 1-mango when it should appear after 9-somefruit .
The underlying query for the access report uses a Cross Tab query in which the items are created as
Column heading:[PrefixPriorityNumber]&"-"&[FruitName]
I even used the Sort:Ascending but it still doesnt affect my custom ordering that i wanted to show.
I also tried to google "sorting alpha numeric strings" but this is clearly more than that.Any assistance is appreciated
The problem is you are getting a text sort. You need to format the prefix number.
Column heading: Format([PrefixPriorityNumber], "00") & "-" & [FruitName]
Either use another digit, as Remou suggests (01 instead of 1) or start using letters. A > 9, B > A, etc.

How do I insert a dataset value to a BIRT report outside of a table / cube?

okay, this has got to be simple - but I can't seem to find an answer...
I am creating a summary report (using BIRT 2.6.1), and laying out a few specific summary values in a grid (not a table or a cube).
Say it's a simple query:
SELECT decision FROM dataTable
I created a data binding / aggregation (named "sumDecision") on my grid, of a type count, where my expression is:
dataSetRow["decision"]
Now, I've tried to insert this into a grid, either as "data" or "dynamic text" with the column binding:
row["sumDecision"]
But when I run the report, it comes up blank. How would I do this? Using dataSet["decision"] doesn't seem to do anything either.
I would create a Text Item (not Dynamic Text, just Text) and use the "Value Of" tags on the text item. This will give you an expression editor and as long as your grid is bound to the data set in question, you will be able to choose your data element there.
Since you just want to see the text in the grid, make sure and choose "HTML" for the format of the text item.
One solution is to create a table of 1 column, 1 detail - then delete the detail & header rows, and create my grid inside the footer of the table.
From here, I can add a dataset to the table, and create aggregations that work to my hearts content.
Is this the right way to do this, or am I missing something?