7 Replies Latest reply: Jan 15, 2013 1:07 PM by KeithMalay RSS

    customizing report template

    Reza.Gh.
      hi,

      I want to add this code <tr #HIGHLIGHT_ROW# style=" my styles " >
      before each row except the header row . how can I do it ?

      The Before Each Row part of template add this code to all row including header ( th row) .

      you can see the problem in below link (center table)

      [http://www.asanfile.ir/apex/f?p=200:27]


      Thanks
        • 1. Re: customizing report template
          TexasApexDeveloper
          Version of APEX? Standard or Interactive Reports? Why I am asking is, there is a BUILT-IN mechanism to highlight rows....

          Thank you,

          Tony Miller
          Ruckersville, Va
          • 2. Re: customizing report template
            Reza.Gh.
            version is 4.1.1.00.23 and standard Report , my purpose is to add some attribute like style , onclick to <tr> tag for each row.
            <tr #HIGHLIGHT_ROW#> is the default value for Before Each Row part and I want to add other attributes.

            Thanks
            • 3. Re: customizing report template
              TexasApexDeveloper
              And what do you want to do when they click? Maybe you should add a link or a button to your report definition?

              Thank you,

              Tony Miller
              Ruckersville, VA
              • 4. Re: customizing report template
                Reza.Gh.
                I want when users click on any part on each row a new popup page open and show the detail of the related row.
                if you see my link , when you click on any row a popup page in open, but the problem is that attributes code also
                add to <tr> tag of header . so when your mouse go over the header the attr style and onclick is effect on header .

                Thanks

                Edited by: Reza.Gh. on Jan 15, 2013 10:39 AM
                • 5. Re: customizing report template
                  TexasApexDeveloper
                  Google is your friend: Old Blog showing this:

                  http://nuijten.blogspot.com/2011/11/apex-make-report-row-clickable-in.html

                  Thank you,

                  Tony Miller
                  Ruckersville, VA
                  • 6. Re: customizing report template
                    Reza.Gh.
                    hi Tony,

                    I had seen this weblog before , but this solution has two problem for may case.

                    1- in this solution you can not use sort on column header beacuse after you sort any column the code not effect any more.
                    2- you should show link column but in my case I don't want.

                    Thanks
                    • 7. Re: customizing report template
                      KeithMalay
                      Hi Reza.Gh.,

                      The blog that TexasApexDeveloper posted is good working example of the functionality you need.

                      Also, here's one that I've posted as an example of similar functionality.

                      http://apex.bhawke.com/apex/f?p=104:2
                      user = demo
                      pass = demo

                      On the IR CSV Test tab, there's an Interactive Report and two buttons. Click them to toggle the border on the odd/even rows in the report. If you wanted to change the style of a given row on the click event, then the javascript used be easily be modified to do so.

                      Here's the two functions that the buttons are using for a working example.

                      function toggleEvenRows(){
                      if ( $("tr.even").attr("style") == "border: medium solid black;" ) {
                      $("tr.even").css("border", "none");
                      } else {
                      $("tr.even").css("border", "medium solid black");
                      }
                      }

                      function toggleOddRows(){
                      if ( $("tr.odd").attr("style") == "border: medium solid black;" ) {
                      $("tr.odd").css("border", "none");
                      } else {
                      $("tr.odd").css("border", "medium solid black");
                      }
                      }


                      Hope this helps.

                      Keith Malay
                      Blackhawk Enterprise Inc.