Using JQuery to toggle between two report variables
<p>I am trying to toggle between two report variables. The variables are basically two data rows; one will be a substr containing the first 15 to 20 characters, and the word "...more" will be appended, the other will be the data row with no character limit restrictions and the word "...less" will be appended. </p>
<p> </p>
<p>The idea is to have a table of Commentary where the user decides when they want to see more or less commentary. Initially when the report opens, it will be single row height rows of data. In many cases, but not all cases, the row will contain things like date, department, call type, etc... with one column containing "comments" it is here where the substr of the commentary row will be limited. Clicking on the Commentary with the word ...more appended will toggle the cell open, making the row high enough to show all the text.</p>
<p> </p>
<p>Any Ideas out there, as to how I might achieve this? I was able to do it in earlier versions of BIRT, using vars and hyperlink buttons... but somehow that no longer is working.</p>
<p> </p>
<p>Thanks for your thoughts.</p>
<p> </p>
<p>The idea is to have a table of Commentary where the user decides when they want to see more or less commentary. Initially when the report opens, it will be single row height rows of data. In many cases, but not all cases, the row will contain things like date, department, call type, etc... with one column containing "comments" it is here where the substr of the commentary row will be limited. Clicking on the Commentary with the word ...more appended will toggle the cell open, making the row high enough to show all the text.</p>
<p> </p>
<p>Any Ideas out there, as to how I might achieve this? I was able to do it in earlier versions of BIRT, using vars and hyperlink buttons... but somehow that no longer is working.</p>
<p> </p>
<p>Thanks for your thoughts.</p>
0
Comments
-
<p><em>"I was able to do it in earlier versions of BIRT, using vars and hyperlink buttons... but somehow that no longer is working."</em></p>
<p> </p>
<p>Do you have an example that you can attach?</p>
<p> </p>
<p>What version of BIRT are using now? Commercial, or open source BIRT?</p>
Warning No formatter is installed for the format ipb0 -
<p>Hi Clement,</p>
<p> </p>
<p>Thanks for your response on this! </p>
<p> </p>
<p>Actually the version I did this on was the Commercial version a few years ago and can be found on Devshare at:</p>
<p><a data-ipb='nomediaparse' href='http://developer.actuate.com/community/forum/index.php?/files/file/921-toggle-cell-contents/'>http://developer.actuate.com/community/forum/index.php?/files/file/921-toggle-cell-contents/</a></p>
<p> </p>
<p>I am currently running the latest versions of BOTH open source and Commercial. </p>
<p> </p>
<p>I recognize and would prefer to use JQuery in place of the Hyperlink - style version I used in my earlier Devshare posting. it is much more efficient to use the JQuery solution.</p>
<p> </p>
<p> </p>
<p>Let me know what you find.</p>
<p> </p>
<p>Thanks,</p>
<p> </p>
<p>Ralph</p>
0 -
<p>I also have a set of images as to the effect I am trying to achieve, in an earlier post:</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='http://developer.actuate.com/community/forum/index.php?/topic/39653-load-text-data-into-cell-truncated-just-a-few-words-thenmore/'>http://developer.actuate.com/community/forum/index.php?/topic/39653-load-text-data-into-cell-truncated-just-a-few-words-thenmore/</a></p>0 -
<p>With the example in your DevShare, the access of variables of an HTML button appears to be a regression defect where the data object of the HTML button was not being populated. Therefore, when this.getVariable was used, it was null.</p>
<p> </p>
<p>The issue was fixed in iHub 16. Also, <strong>this.element </strong>doesn't exist in iHub 16, so you'll need to change that to <strong>this.delegate</strong>.</p>
<p> </p>
<p>As for jQuery, I'll answer you in the other post (<a data-ipb='nomediaparse' href='http://developer.actuate.com/community/forum/index.php?/topic/39653-load-text-data-into-cell-truncated-just-a-few-words-thenmore/'>http://developer.actuate.com/community/forum/index.php?/topic/39653-load-text-data-into-cell-truncated-just-a-few-words-thenmore/</a>). </p>
<p> </p>
<p>And for future reference fo other jQuery goodies:</p>
<p><a data-ipb='nomediaparse' href='http://blogs.opentext.com/extend-birt-interactive-viewer-with-row-highlighting-code/'>http://blogs.opentext.com/extend-birt-interactive-viewer-with-row-highlighting-code/</a></p>
<p><a data-ipb='nomediaparse' href='http://blogs.opentext.com/extend-birt-interactive-viewer-with-a-pop-up-dialog-box-code/'>http://blogs.opentext.com/extend-birt-interactive-viewer-with-a-pop-up-dialog-box-code/</a></p>Warning No formatter is installed for the format ipb0 -
<p>Clement, </p>
<p> </p>
<p>Thanks for your feedback, it is a great help. </p>
<p> </p>
<p>I am attaching the latest version of my attempt to utilize a BIRT Variable element in my "more... / less..." html script. As I said before this version was working in my previous BIRT installations... </p>
<p> </p>
<p>Could you have a look and double check your "this.element" versus "this.delegate" response? I am trying to use this.delegate, but I do not believe this will work here either. If you'll verify, I would appreciate it... as well, I will be continuing to refresh this report design to work with the latest version. </p>
<p> </p>
<p>Thanks, </p>
<p> </p>
<p>Ralph</p>
0 -
<p>In iHub 16 Analytics Designer, using your example in the DevShare, it works with this.delegate. See attached.</p>
<p> </p>
<p>I ran the attached report, but it wasn't working so I added a test variable for debugging, and then removed it. It's working too.</p>
Warning No formatter is installed for the format ipb0 -
<p>In OS BIRT, there is no HTML Button Report Item in the Palette. So, no, the .rptdesign without modification will not work.</p>
<p> </p>
<p>You'll need to use a Text Report Item and add HTML/JavaScript code to do the same.</p>
<p> </p>
<p>Hint: You might want to upgrade from Eclipse Mars to Eclipse Neon, along with OS BIRT to 4.6.0. The entire Eclipse platform is much faster. You'll see the difference, especially when launching to preview a report.</p>
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 104 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management