Visibility Help

In a report, I need a field hid if ordered.shiptonum is equal to OrderRel.ShioToNum. I hit a wall, my head hurts :pensive:, decided to ask for help.

Can you walk us through what you have tried? perhaps with a few screenshots? Hidden logic should be a right click away

1 Like

I am trying to do:

Fields!ShipToNum.Value <> Fields!OrderRel_ShipToNum.Value

So, when they are not the same, it shows. However, after looking into this, the OrderRel_ShipToNum isn’t pulling into the report. I have the Data Definition set up on it, and it is in the query.

Can you put both of those fields on the details section to see the values? You say the OrderRel_ShipToNum isn’t pulling into the report, so it sounds like the comparison should fail every time.

1 Like

You add the field to the RDD to export it to the SSRS database. You also have to edit the Dataset in your SSRS report to pull it into the report. Then your formula idea should work.

Note, if you use visibility on a field it can shift other fields around so we use the trick above. Otherwise it’s pretty much the same just change the IIF around.

1 Like

I figured out what I did wrong on getting the info to pull in. I had to put T3.ShipToNum AS OrderRel_ShipToNum. That did the trick for my end.

Now, IIF statements for visibility, I am thinking something like IIF ShipToNum’s are equal, then show, otherwise, hide. How would I put that in? This area I am a bit fuzzy on.

Use this

1 Like

I was just thinking, is there a place in SSRS that tells me how many ShipTo’s are in an order? Meaning, I f there was a variable, or parameter, or something I could call and tell it, if there 1 or less ShipTo’s in the order, then hide, otherwise…

Just a thought and didn’t know if there was or not.

I would recommend creating a subquery that would get a count of all the shiptos. You could do this in the SSRS SQL Dataset

Something like the below if you have never a done subquery before

SELECT T1.FieldName, (SELECT Count(S1.OrderRel_ShipToNum) FROM OrderRel_" + Parameters!TableGuid.Value + " S1 WHERE T1.Company = S1.Company AND T1.OrderNum = S1.OrderNum) as ShipToCount
FROM OrderRel_" + Parameters!TableGuid.Value + " T1
1 Like

That, I have never done. Please share how it is done.

Update: OOPS!! LOL! You arleady answered that!

Yeah, I’ve never done a subquery like this before. Will be something I will be playing with though!

I recommend learning. REALLY powerful stuff once you get the hang of it