So I am extremely green with the SSRS reports…currently I have only modified existing reports, and even then required some help on one that was pulling form a BAQ. We have just made some changes to how we put information in the part attributes, and for the SSRS report used for our PO’s I need to include an extra field. Currently the report includes, or doesn’t include, certain fields based on the trantype (currently we only use PUR-MTL and PUR-SUB). Currently, when we are ordering material it only includes 1 of 3 fields, where as any Subcon activies it includes 3 fields. I need to add 1 more field when the trantype is PUR-MTL but I can’t seem to locate WHERE the report is being told to include the fields after it determines the trantype. I have some screen shots that will hopefully make my ramble somewhat more understandable…any help would be appreciated!
I’m not entirely sure I’m following, but it sounds like you are trying to find the logic that determines whether a field is visible or not based on the tran-type. Right click on any of the fields, or possibly row(s) and go to the properties. Look for the visibility section and locate ‘show or hided based on an expression’
Hi Jeromy
Thanks for the response, I figured my ramble was a little confusing ha ha. So I looked into the “visibility” option and it doesn’t seem to be in use. My POform, is pulling this information from a subreport - that information being pulled in is being shown on the report depending on the trantype…I can’t find the logic that is telling the report which items to show when it determines the trantype. What you suggested sounded promising but I right click on the subreport properties in the POform SSRS report visibility is set to show, and if I click on the feilds in question in the actual sub report it is also set to show. Under the sub report properties in the main report, under parameters, pm_tranType is set to <> and when I look at the expression it calls out:
=ReportItems!W_TranType.Value
I can’t find when the report then looks to find which feilds to include based on that expression…
not sure if that makes it any clearer or more confusing!
Is the “1 more field” you need to add in the POForm RDD (Report Data Definition)? If not then it needs to be added. Once in the RDD, it needs to be added to the Dataset in the SSRS report. (Hint easier to copy/paste the query into Notepad++ than try to edit it in Expression.
Yeah its already all in there as if the trantype is PUR-SUB then the report includes all 3 fields from the sub report. When its PUR-MTL it only shows one of the fields…I need to make it show one more of the 3 fields when its a PUR-MTL trantype…just can’t seem to find what tells the report to include which fields once it knows the trantype…
Sometimes I download the .rdl file and open it up with Notepad++ like @Randy mentioned. Then do a search for ReportItems!W_TranType.Value. Maybe that will throw you a clue as to where to look.
In the sub-report, right click on the field that shows for PUR-SUB, but not for PUR-MTL and check it’s visibilty. If nothing is set for the visibility, check the expresion for that filed. It might be blanking the field when the trantype is not PUR-SUB
Something like the following pseudo-code
=iif(trantype='PUR-SUB', ...expression.., "")
Edit
And if the sub-report was already selectively showing the fields, based on trantype, you shouldn’t have to edit the sub-report parameters (your 2nd post)
When I right click on the field in the sub report that I want to show (that shows for PUR-SUB) it has the following:
=iif(Fields!Specification.Value = “”,"",“Material:”)
That looks like a field being used as a lable. It will only ever display "Material:"
or be blank
Check the expression for the field below it.
I am with Jeromy on just editing the RDL directly using a good text editor. The RDL is just an XML file and you can definitely edit directly and it is much easier if you know what you are doing than “puttering” around in that horrible Report Designer.
@ckrusen the expression in the field next to that (which is actually the value I want to see on the report) is:
=Fields!Specification.Value
@tomdomurat @jeromy I have downloaded and and looking through it now…didn’t even know you could that…and yes, the report designer is horrible ha ha this looks promising…
So the sub-report consists of a tablix with three rows, with the top row containing 6 fields (assuming 3 “labels” and three “values”)
And when the trantype is PUR-SUB, all 6 fields of the first row display text. And when it is PUR-MTL, only 2 of the fields (one “label” and one "value) are displayed.
Is the above correct ?
@ckrusen Correct. And due to some changes in how we enter the vaules in the part master, I now need 4 fields to display (2 lables and 2 values) when the trantype is PUR-MTL
First thing I would do is set the background color of those two fields you want to show to something obvious like yellow. Then run it with data that is PUR-MTL. If a yellow block - but without text - show, that means the filed is visible, but the value or text is either being blanked (like the iif statement), or is never being passed to the sub-report in the first place.
This will point you to whether the issue is just with how the sub-report renders (textbox visibility), or if it is something in the data being passed from the main report to the sub (no value being passed to the sub).
Thanks Calvin, I will take a look first thing tomorrow.
Thank you guys for all the input, I am much closer to getting this corrected than I was a few hours ago!