Topic
10 replies Latest Post - ‏2009-09-18T20:47:03Z by SystemAdmin
SystemAdmin
SystemAdmin
15496 Posts
ACCEPTED ANSWER

Pinned topic Inserting SQL Select statement in HTML script.

‏2009-09-09T22:42:39Z |
My problem statement: When i hover over a product data item, i should get product description from database dynamically.
Updated on 2009-09-18T20:47:03Z at 2009-09-18T20:47:03Z by SystemAdmin
  • RMeyers
    RMeyers
    194 Posts
    ACCEPTED ANSWER

    Re: Inserting SQL Select statement in HTML script.

    ‏2009-09-10T00:19:36Z  in response to SystemAdmin
    I saw a session at the forum where using Jscript they pulled the detail for a crosstab intersection dynamically on click if the data hadn't been pulled yet. Basically created a parametized URL to open a detail report. A dynamic jscript initiated drill through if you will.

    If you want it dynamic then you could probably use the same technique and modify it slightly. This person happened to use an iframe to keep the data in the same viewer. I imagine on hover you could probably excecute the parametized URL to open in a new window.

    For the fun of it I might be able to try and get a sample working on a sample package unless someone already as a report they can share where they have implemented this technique.
    • SystemAdmin
      SystemAdmin
      15496 Posts
      ACCEPTED ANSWER

      Re: Inserting SQL Select statement in HTML script.

      ‏2009-09-10T00:41:11Z  in response to RMeyers
      Wanna HOVERING effect, Try HOVER on me

      This is small working HTML script to have the hovering effect with static text "ISNT IT COOOOOOL". Instead i want something similar script with "Select col_desc from table where col_name=name" in HTML script which fetches data from the database by executing the select statement in the HTML script.

      Anyway, Thanks for your answer.If you can think on this lines, it would be very much appreciated.
      • RMeyers
        RMeyers
        194 Posts
        ACCEPTED ANSWER

        Re: Inserting SQL Select statement in HTML script.

        ‏2009-09-10T00:47:50Z  in response to SystemAdmin
        Basically thats what I just explained. Only thing is it wont display on hover. You can use a parametized URL to pop up a detail report filtered to the item clicked on.

        If you want it on hover then there are other ways to make it happen.

        You could use a dummy select prompt that contained the descriptions of all of your items. Use Jscript to dynamically pick up the description from the prompt and use it as your hover text on your row item. Then use HTML to hide the prompt.
      • SystemAdmin
        SystemAdmin
        15496 Posts
        ACCEPTED ANSWER

        Re: Inserting SQL Select statement in HTML script.

        ‏2009-09-10T12:38:27Z  in response to SystemAdmin
        Create a Query Item in your query with following expression

        'Business Description">'
        Once you do this, unlock the report object and drag in the HTML item one before the test and second behind it.
        Find the attached document for further details.
        • SystemAdmin
          SystemAdmin
          15496 Posts
          ACCEPTED ANSWER

          Re: Inserting SQL Select statement in HTML script.

          ‏2009-09-10T14:53:54Z  in response to SystemAdmin
          The expresion in previous got trucated. Check the attachment in previous post to get the expression.
        • SystemAdmin
          SystemAdmin
          15496 Posts
          ACCEPTED ANSWER

          Re: Inserting SQL Select statement in HTML script.

          ‏2009-09-10T22:43:55Z  in response to SystemAdmin
          Hi

          You got the idea but the actual logic i am looking is "IF I HOVER OVER PRODUCTS THEN IT SHOULD SHOW ME PRODUCT DESCRIPTION". Please find the attached excel file for your reference and also below example.

          If i hover over product "Aloe Relief" then i should see "Perfect for minor burns and sunburn, the aloe vera provides quick relief."

          same way, if i hover over 100 products then i should see 100 descs. Hope i explained well.
          Aloe Relief --> Perfect for minor burns and sunburn, the aloe vera provides quick relief.
          Astro Pilot --> This GPS has a high-contrast 86mm color screen that is viewable in sunlight.
  • rajeshv
    rajeshv
    27 Posts
    ACCEPTED ANSWER

    Re: Inserting SQL Select statement in HTML script.

    ‏2009-09-10T10:43:37Z  in response to SystemAdmin
    You can insert dataitems into javascript and make them appear as tooltip.

    Attached 8.3 report will explain you in detail.

    Regards,
    Rajesh
    • SystemAdmin
      SystemAdmin
      15496 Posts
      ACCEPTED ANSWER

      Re: Inserting SQL Select statement in HTML script.

      ‏2009-09-10T22:49:17Z  in response to rajeshv
      Your attached script does not seems to be linked to my issue. Kindly revisit the script and let me know the logic but i think u understood the logic. I want to how to insert dataitem into javascript to make it as a tooltip.

      example: if i hover over product --> Aloe Relief, i should see Product Desc --> Perfect for minor burns and sunburn, the aloe vera provides quick relief.

      Excel attached for your reference for other products, just to have a idea. Again, Thanks for your help
      • SystemAdmin
        SystemAdmin
        15496 Posts
        ACCEPTED ANSWER

        Re: Inserting SQL Select statement in HTML script.

        ‏2009-09-18T17:07:48Z  in response to SystemAdmin
        I don't know if you still need this solution - I was on vacation and am just now catching up.

        You can easily display a data item in an HTML tooltip.

        1. Unlock the report.
        2. Drop an HTML item in front of the data that gets the tooltip. Drop another HTML after it.
        3. Switch the FIRST HTML item's Source Type property to EXPRESSION. Put this kind of statement inside it:
        '<span title = ''' + [Store Name] + '''>'
        (If that gets munged up by this forum it's a single quote , open carat, the text span title =, THREE single quotes, a plus sign, the DATA ITEM you want in the tooltip, a plus sign, THREE single quotes, a close carat, and a single quote.
        4. Leave the SECOND HTML item as HTML and put this inside it:

        (that's open carat, forward slash, the text span, and a close carat)

        Works like a charm with no javascript needed.
        • SystemAdmin
          SystemAdmin
          15496 Posts
          ACCEPTED ANSWER

          Re: Inserting SQL Select statement in HTML script.

          ‏2009-09-18T20:47:03Z  in response to SystemAdmin
          One extra thought. You may need to force that descriptive data item to be fetched. Select the whole list, go to the Properties property and check the data item that's not actually displayed on the list.