question

yd2711 avatar image
yd2711 asked

Why is a textbox partially blank?

I have a report that is supposed to show cost details for each stock item. The stock items are all kits that have a Bill of Materials, so I am showing the line item detail for each "ingredient" in the Bill of Materials and then I show the summary for the kit grouped on the kit. One of the text fields in the summary should show the cost divided by the retail as a percentage. To complicate it further, I have a separate report that shows only the summary data, and the stock item number is a link to the detail report. This works via a function written into the Code of the Report Properties. The value in the problematic textbox is the following expression: =iif (max(Fields!fs.Value) = "FS", "FS - Orig Retail is "& FormatCurrency(avg(Fields!Fullretail.Value)) & ",Adj. Retail is "& FormatCurrency(avg(Fields!Retail.Value)), "Non-FS - Retail is " & FormatCurrency(avg(Fields!Fullretail.Value)) ) My issue is that when I run the detail report by itself, everything looks great - for example stock item # 120 will display: > Non-FS - Retail is $20.95 but when I access it via the link in the summary report, it shows me this: > Non-FS - Retail is and I can't figure out why. One more detail that may be relevant - I am viewing the reports in IE11 because they don't render at all in Chrome. I am still an amateur at posting issues, so apologies if my terminology or syntax is confusing, and many thanks to anyone who will try to assist.
ssrsgroup-byformattingreport-viewerrender
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Could you post the function?
0 Likes 0 ·
sdoubleday avatar image
sdoubleday answered
yd2711, I think your summary report link is not successfully passing any information to the detail report. Your iif expression is evaluating to false, and then returning "Non-FS - Retail is " plus whatever the average value of full retail is -- in the absence of any data, nothing. Am I correct that you are using the Text Box Property > Action > Go To Report feature to call the detail report? Does the Detail report require parameters that are not being mapped?
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yd2711 avatar image
yd2711 answered
Hi sdoubleday, Thank you for responding. Actually I was not using that method to call the detail report, I was using Text Box Property > Action > Expression, and the expression was ="javascript:void(window.open('" & Code.PopKitCat (cstr(Fields!Kit.Value)) & "','_blank','location=Yes,toolbar=no,resizable=yes, left=100,top=100,height=600,width=800'))" This was calling a function called PopKitcat written into the Report Properties > Code. However I tested your method and the results were the same - still showing only the text and not the values.
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I think sdoubleday is correct, you are probably not passing a parameter through to the detail report correctly. Could you post the code to PopKitCat? I'm assuming it returns a URL to the report which is supposed to pass the parameter. Try putting the Code.PopKitCat(cstr(Fields!Kit.Value)) into a text box and examine the URL it returns then if it looks OK try it in your browser. Is it forming the URL to pass the parameter correctly?
0 Likes 0 ·
yd2711 avatar image
yd2711 answered
Hi sdoubleday, Thank you for responding. Actually I was not using that method to call the detail report, I was using Text Box Property > Action > Expression, and the expression was ="javascript:void(window.open('" & Code.PopKitCat (cstr(Fields!Kit.Value)) & "','_blank','location=Yes,toolbar=no,resizable=yes, left=100,top=100,height=600,width=800'))" This was calling a function called PopKitcat written into the Report Properties > Code. However I tested your method and the results were the same - still showing only the text and not the values.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.