{"id":35,"date":"2015-07-19T09:28:00","date_gmt":"2015-07-19T16:28:00","guid":{"rendered":"\/lisa\/post\/2015\/07\/19\/Dipping-a-toe-into-the-rivers-of-Babble-On.aspx"},"modified":"2021-11-24T11:23:03","modified_gmt":"2021-11-24T19:23:03","slug":"dipping-a-toe-into-the-rivers-of-babble-on","status":"publish","type":"post","link":"https:\/\/spacefold.com\/lisa\/2015\/07\/19\/dipping-a-toe-into-the-rivers-of-babble-on\/","title":{"rendered":"Dipping a toe into the rivers of Babble-On"},"content":{"rendered":"<p>Hello folks&#8230;<\/p>\n<p>A very long time ago, I wrote something about getting the VFP concept of &#8220;<a title=\"LSN on multi-details in SSRS\" href=\"\/lisa\/2007\/08\/09\/Reporting-Convergences-Chapter-Multi-Detail-Bands-SQL-Reporting-Services-Style\/\">multiple detail bands<\/a>&#8221; in &nbsp;SSRS. &nbsp;(That&#8217;s the scenario where you have two unrelated children of a parent and want to display them in the same table.)<\/p>\n<p>It now occurs to me that the RDL function <strong>LookupSet<\/strong> was practically made to help solve this problem. (I think it came in in SSRS 2008, but it might only have appeared in R2 &#8212; I haven&#8217;t checked this.)<\/p>\n<p>Suppose, for example, I want to show multiple languages along with multiple cities for a country, using my standard borrowed-from-mySql World database. Suppose I have a denormalized dataset in my report that shows countries and their related cities. &nbsp;I can add another dataset for country languages, without denormalizing any further. &nbsp;Now, I can write an expression like this (from the context of the first dataset, which might have a name like &#8220;CountryCities&#8221;):<\/p>\n<p style=\"text-align: center;\">&nbsp;<img decoding=\"async\" src=\"\/lisa\/wp-non\/migrated\/2015\/7\/Lookup.png\" alt=\"Using the lookup function to get info from a second dataset\" \/><\/p>\n<p style=\"text-align: left;\">&#8230;and add a little code function like this:<\/p>\n<p class=\"code\">Public Function GetLanguages(ByRef Langs as Object()) As String <br \/>&nbsp; &nbsp;Dim sb as new System.Text.StringBuilder() <br \/>&nbsp; &nbsp;For Each o As Object in Langs <br \/>&nbsp; &nbsp; &nbsp; sb.append(&#8220;&lt;li&gt;&#8221; &amp; o.ToString() &amp; &#8220;&lt;\/li&gt;&#8221;) <br \/>&nbsp; &nbsp;Next <br \/>&nbsp; &nbsp;Return &#8220;&lt;ul&gt;&#8221; &amp; sb.ToString() &amp; &#8220;&lt;\/ul&gt;&#8221; <br \/>End Function<\/p>\n<p>&#8230; and that&#8217;s all I need. As you can see I&#8217;ve gussied it up somewhat here by adding some HTML placeholder formatting (HTML placeholders were not available before 2008 for sure) so that my &#8220;details&#8221; can be put into a single textbox but are neatly formatted as a list. Still, it&#8217;s precious little code.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" style=\"text-align: start;\" src=\"\/lisa\/wp-non\/migrated\/2015\/7\/LookupLanguageResult.png\" alt=\"\" \/><br \/>&nbsp;<\/p>\n<p>What do you think?<\/p>\n<h3><span style=\"font-size: 1.17em;\">Looking up even further<\/span><\/h3>\n<p>I have rarely used the trio of SSRS Lookup functions. &nbsp;Most of the time, it seems to me that I should do most of the joining myself, in SQL queries, before bringing the data into the RDL for arrangement. Seems like perf would be better that way, although I have never tested this assumption and now am somewhat more motivated to do so.<\/p>\n<p>Goodness me. It certainly is nice to be back in RDL-territory&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello folks&#8230; A very long time ago, I wrote something about getting the VFP concept of &#8220;multiple detail bands&#8221; in &nbsp;SSRS. &nbsp;(That&#8217;s the scenario where you have two unrelated children of a parent and want to display them in the same table.) It now occurs to me that the RDL function LookupSet was practically made<a class=\"more-link\" href=\"https:\/\/spacefold.com\/lisa\/2015\/07\/19\/dipping-a-toe-into-the-rivers-of-babble-on\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-reporting"],"_links":{"self":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":1,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":498,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/posts\/35\/revisions\/498"}],"wp:attachment":[{"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spacefold.com\/lisa\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}