SSRS - Column Group - Table Horizontally Expanded - reporting-services

There was a requirement, to have data horizontally expanded in the Rows. So I have created Child Row group in Column group of Matrix as shown in this link.
Reference Link
It is working fine. And it displays result as below.
Requirement was : Show Thumbnails of images uploaded for a building as above.
But now the problem is, when there will be number of images, this is going to be expanded horizontally.
I want to repeat this Row after 8 or 10 images.
Any Idea how can I achieve this in SSRS ?
Thank you,
Mittal.

Not quite sure about your requirement, do you want those images wrap in your report, each row has maximum 8 images? If so, we need to make each 8 images into one group. In this scenario, we can create a list. If you have a index field (like a specific id for each image) in your dataset, we can put in the group expression with this:
=ceiling(Fields!Index.Value/8)
If you don't have this kind of index column, we can make it manually. Embed the custom code below:
Dim CountNumber As Integer = 0
Public Shared Previous as Object
Public Function GroupNumber(ByVal category As Object) As Integer
If Category <> Previous then
CountNumber = CountNumber + 1
Return CountNumber
Else
Return CountNumber
End If
End Function
Then replace the group expression with this:
=ceiling(Code.GroupNumber(Fields!Image.Value)/8)
I have tested in my local environment and it works. But I can't share the screenshot due to low reputation.

Related

SSRS report tables mutiple lines not showing

I am doing Microsoft Dynmics D365 report layout. I have a table in my report that need to show the lines from the table in MS Dynamic D365. Which have only 2 lines.
D365 frontend system:
In the report layout, it is only showing the first line and the second line is not showing.
Report layout first line only showing:
I want the 2 lines to be showed in the report. I am not sure if my coding is not right or the row group that I am grouping in the report design. Please help me please. Apperciated.
here is my code in the dp class to get the table lines:
PurchPurchaseOrderTmp.MGAItemLabelName = PurchExtendedMaster.ExtName;
PurchPurchaseOrderTmp.MGAColValue1 = PurchExtended.ColValue1;
PurchPurchaseOrderTmp.MGAColValue2 = PurchExtended.ColValue2;
PurchPurchaseOrderTmp.MGAColValue3 = PurchExtended.ColValue3;
PurchPurchaseOrderTmp.MGAColValue4 = PurchExtended.ColValue4;
PurchPurchaseOrderTmp.MGALabelId = PurchExtended.LabelId;
//PurchPurchaseOrderTmp.MGALabelIdString += int2Str(PurchExtended.LabelVersion);
if (PurchPurchaseOrderTmp.MGAItemLabelName != "") {
PurchPurchaseOrderTmp.MGALabelIdString = strFmt("%1-%2",
PurchExtended.LabelId, int2Str(PurchExtended.LabelVersion));
}
else {
PurchPurchaseOrderTmp.MGALabelIdString = "";
}
Here is my report design row grouping:
Thanks
This is not really an answer at the moment as I can't see enough to be certain but...
Looking at the report design, it 'appears' that you don't have anything in the details row(s). The details group rows have been reduced in height so I'm guessing there is nothing in there.
That means that the text boxes below this must be in a group header or footer which is why they will only appear once.
The best way to get your head round this is to dump all the data from your dataset into a simple flat table, then see what you want repeating.
For exmaple, it looks like Label ID (MGAItemLabelName ?) should only be shown once, so there needs to be a group for that - which it looks like you have.
Then within that label name group, you have two rows of data that you want to show, so these must be at a lower level than their parent group. That might be the details row group, or another row group between the header and details depending on your needs.
The details row group typically contains fields that you want to show every instance of and that does not have any subordinate/child data.

SSRS hiding a row group if there are no detail rows

Can someone please help me write a custom code that will check if the details of the row group = nothing? I'd like to use this as a show/hide expression such that table 0 will not display if there are no records within the group.
I can't seem to use aggregations for the row group details at the row group level.
Edit:
example 1 with a detail row
example 2 with without a detail row but the group header still displays. I'd like to hide this group completely:
OK, so it looks like you want to hide a table, not just a group within a table.
If this is not correct , please post your full report design.
You should be able to just count the rows in the dataset that the table is bound to.
So if your table is bound to `DataSet`` the 'Hidden' property would just be
=COUNTROWS("DataSet1") = 0
"DataSet1" is the name of the dataset, it is case sensitive and must be enclosed in double quotes.
The table will be hidden but the space it consumes will not be used, in other words, you will have a blank space where the table should be.
Alternatively, you can set the NoRowsMessage property to simple text message or an expression which will be displayed instead of just hiding the table.
I ended up using an IIF(IsNothing(Fields!MyField.Value), Parameters!ShowMissingGroup.Value,False) for the row group expression visibility then using a parameter to hide/show it.

ComboBox Access Match on ID but Display Category

I am working on a project but have run into a wall with Access's combo-boxes. I've attached an image so things (hopefully) make more sense when I describe my situation.
I have two combo-boxes on a form, the left one is called cmb_body_system, and the right one is called cmb_icd9code.
What I am trying to do is have the left box display three options, the three from the body_system_type table: infectious, circulatory, respiratory. From there, the second box will display the matching description in the ICDLight table column titled icd9Description.
I have gotten as far as getting the left box to display the bodyID's associated with each matching Icd9Description, but I can't get further than that. The VBA that I have on these is:
Private Sub cmb_body_system_AfterUpdate()
cmb_icd9code.RowSource = "SELECT ICD9Description FROM ICDLight WHERE ICDLight.bodyID = " & Me.cmb_body_system & ";"
End Sub
And as you can see, it's working, but I want to go that one step further and don't know what/how to search for this exactly. I mean, I don't even know how inaccurate/accurate the title is for that matter.
I think you need to rephrase your question. From your question title, I think this is what you need.
Select your cmb_body_system
Go to property sheet
Under Format tab:
Column Count = 2
Column Widths = 0cm; <- there is a semicolon
Under the Data Tab
Bound Column = 1
Row Source Type = Table/Query
Row Source = "SELECT * FROM BODY_SYSTEM_TYPES"
Now your combobox will show "bodysystem" as display text and Bodyid as value

SSRS Matrix header repeat on each page (but outside of group to show every header from ds?)

I have a Matrix which I am trying to get a specific header to repeat on each page. To keep it simple it looks something like this:
| | Months |
|Division| |
| Name | Sales |
--- new page for each division ---
If I include the [Month] columns inside the Division group, it only shows the [Months] that have activity for that [Division]. For each page (per [Division]) I want to show all active [Months] within the dataset, not just that particular [Division].
So I tried creating a new row above, OUTSIDE of the [Division] group. This worked great for the first page, but I cannot get it to repeat on each page.
Is there a way to somehow set a Matrix row as a header for each instance/page of that tablix in the report?
Or
Show every [Month] from the dataset, inside of the [Division] group, and not just the active [Months] inside the [Division]?
Hopefully that makes sense, if not I will try my hardest to explain better.
Thanks in advance!!
I found the answer here:
https://msdn.microsoft.com/en-us/library/dd207045.aspx
Under "To Display a static row or column on multiple pages"
Thanks

ssrs 2008 R2 show/hide not working on expression

I have this problem, which I have already googled,searched on stack overflow and tried every possible solution that I could found on the internet.
I have a table like this:
When the table is initally loaded the value are not visible and have to be toggled by Filter
After I click on the value, the dataset is filtered, and the Filter group will contain only 1 Value (the one that was selected) after the report reloads.
With an expression I made the left side look orange like the following, if only 1 value in a group exists :
Now I would like to also show the value on the right, but it does not work with all expressions i tried on text box level and/or group level :
=IIF(Fields!filter.BackgroundColor = "Orange" ,false,true)
=IIF(Fields!filter.BackgroundColor <> "Orange" ,true,false)
Can someone help Please ?
After days of trying in different ways, the only working solution was to add an extra column to my dataset called "hidden". If a filter value is the only value counted (grouped by filter) then put a 0 in the hidden field ,else 1 which results in something like :
Filter Value Hidden
A B 1
A C 1
B A 0
After that, on the text field Hidden Value i used expression
=CBool(Fields!hidden.value)
This Worked Great!