{"id":526,"date":"2013-10-26T03:50:34","date_gmt":"2013-10-26T03:50:34","guid":{"rendered":"http:\/\/elbsolutions.com\/projects\/?p=526"},"modified":"2022-02-03T11:25:03","modified_gmt":"2022-02-03T17:25:03","slug":"adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application","status":"publish","type":"post","link":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/","title":{"rendered":"Adding jQuery to Report Services &#8211; (Make parameter field bigger is the reason for doing this in this article)"},"content":{"rendered":"<p>There are really 2 concepts here which is the reason for the long title. First, adding jQuery to Report Services means <a href=\"http:\/\/ampbytes.wordpress.com\/2012\/04\/18\/how-to-use-jquery-to-manipulate-ms-reporting-services-behaviour\/\" target=\"_blank\" rel=\"noopener noreferrer\">hacking 2 install files<\/a> (.aspx files) of Report Services. If you don&#8217;t have someone who has access to the server that is hosting the web pages, it might be hard to get this done. Your IT department might say &#8216;no way&#8217; but this problem is well known for RS 2008 up to the current &#8211; so it is really not a risk &#8211; if it breaks, simply fix it &#8211; most likely it will never need fixing especially if you are using an older version of RS which is by this point mature. Next to address the width &#8211; <a href=\"http:\/\/blogs.law.harvard.edu\/brandonhaynes\/2008\/09\/24\/changing-the-size-of-reportviewer-parameter-dropdown-list\/\" target=\"_blank\" rel=\"noopener noreferrer\">this article helped<\/a>. Here is how I did it and who helped me (urls in the code and the links above)&#8230;<!--more--><\/p>\n<ol>\n<li>Using this article above, I found out which two files and added these lines at the bottom. For example mine was at\u00a0c:\\Program Files\\Microsoft SQL Server\\MSRS10.MSSQLSERVER\\Reporting Services\\ReportManager\\Pages\\Report.aspx\n<ol>\n<li>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">&lt;\/pre&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/civil.fsrvdevap1.focusdev.local\/civil\/Scripts\/jquery-1.8.2.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/civil.fsrvdevap1.focusdev.local\/civil\/Pages\/RS\/jQuery_ExtrasCommon.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;http:\/\/civil.fsrvdevap1.focusdev.local\/civil\/Pages\/RS\/jQuery_ExtrasReports.js&quot;&gt;&lt;\/script&gt;\r\n&lt;pre&gt;<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li>Now to write the jQuery, there were a few items that had to come together.\n<ol>\n<li>Report Services puts their style info right in the elements &#8211; so you have to use &#8221; !important&#8221; in the css parameter. jQuery does NOT work well with this and a fix to do this is not yet available &#8211; so add a new style to the header (a class style worked well) and then use jQuery to add this style to all the elements<\/li>\n<li>The elements that need to be adjusted end with &#8220;divDropDown&#8221; so the real meat that makes the adjustment is the following jQuery\n<ol>\n<li>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$('head').append('&lt;style&gt;.widerDropDown{width:500px !important}&lt;\/style&gt;');&lt;\/pre&gt;\r\n&lt;\/li&gt;\r\n\t&lt;li&gt;\r\n&lt;pre&gt;$(&quot;&#x5B;id$='_divDropDown']&quot;).addClass('widerDropDown');\r\n\r\n<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li>Then in the\u00a0jQuery_ExtrasReports.js file I wrote simple jQuery that looked for a case insensitive version of the folder and name of the report (the .rdl) file. Here is the final code. The code does not need to be in two .js files, but to simplify the reports file &#8211; at least the way it looks syntactically, two files were chosen. When the phrase &#8220;\/\/end of jQuery_ExtrasReports.js&#8221; is listed in the code below, I switched to putting that code in to the jQuery_ExtrasCommon.js\n<ol>\n<li>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar lref = window.location;\r\nlref = urldecode(lref);\r\nvar lrefcomp = lref.toLowerCase();\r\n\r\n\/\/alert(lrefcomp);\r\nif (lrefcomp.indexOf(&quot;\/myRSFolder\/&quot;, 0) &gt;= 0) {\r\n $(document.body).ready(function () {\r\n try {\r\n\/\/alert (&quot;made it to \/myRSFolder\/myReportName&quot;);\r\nmakeDivDropDownWider();\r\n }\r\n catch (e) { }\r\n });\r\n} else {\r\n \/*\r\n $(document.body).ready(function () {\r\n \/\/ do any items here that are not the main report.\r\n });\r\n *\/\r\n\r\n&lt;\/pre&gt;\r\n&lt;\/li&gt;\r\n\t&lt;li&gt;\r\n&lt;pre&gt;<\/pre>\n<\/li>\n<li>And the jQuery_ExtrasCommon.js file had this code (there is an extra peice of code that makes the \u00a0box turn red when thre is a certain text string in the list of pickable choices &#8211; neat)\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">&lt;\/pre&gt;\r\n&lt;\/li&gt;\r\n\t&lt;li&gt;\r\n&lt;pre&gt;function makeDivDropDownWider() {\r\n $('head').append('&lt;style&gt; .widerDropDown{width:350px !important; height:500px !important;} &lt;\/style&gt;');\r\n $('head').append('&lt;style&gt; .warningRed{background-color:#FFCCCC;} &lt;\/style&gt;');\r\n\r\n$(&quot;&#x5B;id$='_divDropDown']&quot;).addClass('widerDropDown');\r\n\r\n\/\/not i.e.9\r\n $(&quot;&#x5B;id$='_divDropDown']&quot;).bind(&quot;DOMSubtreeModified&quot;,function(){\r\n checkForRedWarning(this);\r\n });\r\n\r\n\/\/i.e. 9\r\n $(&quot;&#x5B;id$='_divDropDown']&quot;).bind(&quot;propertychange&quot;,function(){\r\n checkForRedWarning(this);\r\n });\r\n\r\n}\r\nfunction checkForRedWarning(item) {\r\n\r\nvar ih = item.innerHTML;\r\n var pos1 = ih.indexOf(&quot;truncated...Show&quot;);\r\n var thisNodeName = item.id.replace(&quot;_divDropDown&quot;,&quot;_txtValue&quot;);\r\n if (pos1 &gt;= 0) {\r\n $(&quot;#&quot; + thisNodeName).addClass('warningRed');\r\n } else {\r\n $(&quot;#&quot; + thisNodeName).removeClass('warningRed');\r\n }\r\n \/\/alert('changed');\r\n}\r\n\r\nfunction urldecode(str) {\r\n return decodeURIComponent((str + '').replace(\/\\+\/g, '%20'));\r\n}&lt;\/pre&gt;\r\n&lt;\/li&gt;\r\n\t&lt;li&gt;\r\n&lt;pre&gt;<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<style><!--\n.widerDropDown{width:500px !important}\n--><\/style>\n","protected":false},"excerpt":{"rendered":"<p>There are really 2 concepts here which is the reason for the long title. First, adding jQuery to Report Services means hacking 2 install files (.aspx files) of Report Services. If you don&#8217;t have someone who has access to the server that is hosting the web pages, it might be hard to get this done. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,16,13,7],"tags":[],"class_list":["post-526","post","type-post","status-publish","format-standard","hentry","category-general","category-sqlserver_ssrs","category-web-integration","category-windows"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Adding jQuery to Report Services - (Make parameter field bigger is the reason for doing this in this article) - ELB Solutions.com Inc.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Adding jQuery to Report Services - (Make parameter field bigger is the reason for doing this in this article) - ELB Solutions.com Inc.\" \/>\n<meta property=\"og:description\" content=\"There are really 2 concepts here which is the reason for the long title. First, adding jQuery to Report Services means hacking 2 install files (.aspx files) of Report Services. If you don&#8217;t have someone who has access to the server that is hosting the web pages, it might be hard to get this done. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/\" \/>\n<meta property=\"og:site_name\" content=\"ELB Solutions.com Inc.\" \/>\n<meta property=\"article:published_time\" content=\"2013-10-26T03:50:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-03T17:25:03+00:00\" \/>\n<meta name=\"author\" content=\"Etienne Bley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etienne Bley\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/\"},\"author\":{\"name\":\"Etienne Bley\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"headline\":\"Adding jQuery to Report Services &#8211; (Make parameter field bigger is the reason for doing this in this article)\",\"datePublished\":\"2013-10-26T03:50:34+00:00\",\"dateModified\":\"2022-02-03T17:25:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/\"},\"wordCount\":737,\"articleSection\":[\"General\",\"SQLServer_SSRS\",\"Web Integration\",\"Windows\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/\",\"name\":\"Adding jQuery to Report Services - (Make parameter field bigger is the reason for doing this in this article) - ELB Solutions.com Inc.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\"},\"datePublished\":\"2013-10-26T03:50:34+00:00\",\"dateModified\":\"2022-02-03T17:25:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adding jQuery to Report Services &#8211; (Make parameter field bigger is the reason for doing this in this article)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\",\"name\":\"ELB Solutions.com Inc.\",\"description\":\"Bringing all your IT Pieces together\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\",\"name\":\"Etienne Bley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"caption\":\"Etienne Bley\"},\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/author\\\/etienne-bley\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Adding jQuery to Report Services - (Make parameter field bigger is the reason for doing this in this article) - ELB Solutions.com Inc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/","og_locale":"en_US","og_type":"article","og_title":"Adding jQuery to Report Services - (Make parameter field bigger is the reason for doing this in this article) - ELB Solutions.com Inc.","og_description":"There are really 2 concepts here which is the reason for the long title. First, adding jQuery to Report Services means hacking 2 install files (.aspx files) of Report Services. If you don&#8217;t have someone who has access to the server that is hosting the web pages, it might be hard to get this done. [&hellip;]","og_url":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/","og_site_name":"ELB Solutions.com Inc.","article_published_time":"2013-10-26T03:50:34+00:00","article_modified_time":"2022-02-03T17:25:03+00:00","author":"Etienne Bley","twitter_misc":{"Written by":"Etienne Bley","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/#article","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/"},"author":{"name":"Etienne Bley","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"headline":"Adding jQuery to Report Services &#8211; (Make parameter field bigger is the reason for doing this in this article)","datePublished":"2013-10-26T03:50:34+00:00","dateModified":"2022-02-03T17:25:03+00:00","mainEntityOfPage":{"@id":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/"},"wordCount":737,"articleSection":["General","SQLServer_SSRS","Web Integration","Windows"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/","url":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/","name":"Adding jQuery to Report Services - (Make parameter field bigger is the reason for doing this in this article) - ELB Solutions.com Inc.","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/#website"},"datePublished":"2013-10-26T03:50:34+00:00","dateModified":"2022-02-03T17:25:03+00:00","author":{"@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"breadcrumb":{"@id":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/elbsolutions.com\/projects\/adding-jquery-to-report-services-make-parameter-field-bigger-is-the-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elbsolutions.com\/projects\/"},{"@type":"ListItem","position":2,"name":"Adding jQuery to Report Services &#8211; (Make parameter field bigger is the reason for doing this in this article)"}]},{"@type":"WebSite","@id":"https:\/\/elbsolutions.com\/projects\/#website","url":"https:\/\/elbsolutions.com\/projects\/","name":"ELB Solutions.com Inc.","description":"Bringing all your IT Pieces together","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elbsolutions.com\/projects\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39","name":"Etienne Bley","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","caption":"Etienne Bley"},"url":"https:\/\/elbsolutions.com\/projects\/author\/etienne-bley\/"}]}},"_links":{"self":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/comments?post=526"}],"version-history":[{"count":17,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/526\/revisions"}],"predecessor-version":[{"id":2836,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/526\/revisions\/2836"}],"wp:attachment":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/media?parent=526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/categories?post=526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/tags?post=526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}