7 Replies Latest reply on Oct 8, 2012 8:53 PM by Sham HC

    How to open a image from CQ reports results?

    Fazil9999

      Hi,

           I have fetched image paths from the corresponding nodes using CQ reports.

           But i have a requirement that the image should show(open in a window or something) on click of the path.

           Is that possible? If so, can help me out on how to do that...

       

      Regards,

      Fazz

        • 1. Re: How to open a image from CQ reports results?
          Sham HC Level 7

          The client uses the pre-processed data to display the results.  The minor processing like creating links in cell content – is implemented at client side. I think page activity report page column have that example.

           

          http://dev.day.com/docs/en/cq/current/developing/developing-reports.html#Processing Queue

          • 2. Re: How to open a image from CQ reports results?
            Fazil9999 Level 1

            Hi,

                 I tried processing queue, it working when i try to open a page via report results, but not working on image....

                 The link goes like "/content/dam/.../image.jpg.html". This ".html" appends and image is not opening..

             

            Regards,

            Fazz

            • 3. Re: How to open a image from CQ reports results?
              Sham HC Level 7

              Could you please post the xml defnition of dialog for your component

              • 4. Re: How to open a image from CQ reports results?
                Fazil9999 Level 1

                Hi,

                     structure of the columnbase

                 

                    N:bundlecol [cq:Component]
                      P:componentGroup [String] = "OSGi Report"
                      P:jcr:title = "Bundle"
                      P:sling:resourceSuperType [String] = "cq/reporting/components/columnbase"
                      N:cq:editConfig [cq:EditConfig]
                           P:cq:actions [String[]] = "insert", "delete"
                           P:cq:dialogMode [String] = "floating"
                           P:cq:layout [String] = "auto"
                           N:cq:listeners [cq:EditListenersConfig]
                                P:aftercreate [String] "REFRESH_INSERTED"
                                P:afterdelete [String] "REFRESH_SELF"
                                P:afteredit [String] "REFRESH_SELF"
                                P:afterinsert [String] "REFRESH_INSERTED"
                                P:aftermove [String] "REFRESH_SELF"
                                P:afterremove [String] "REFRESH_SELF"
                      N:defaults [nt:unstructured]
                           P:aggregate [String] = "count-nonempty  "
                      N:definitions [nt:unstructured]
                           P:groupable [Boolean] = false
                           P:type [String] = "string"
                           N:queryBuilder [nt:unstructured]
                                P:property [String[]] = "fileReference"

                                N:data[nt:unstructured]

                                P:resolver[String]=”path”

                                      N:resolverConfig[nt:unstructured]

                                      P:propertyName[String]=”fileReference”

                • 5. Re: How to open a image from CQ reports results?
                  Fazil9999 Level 1

                  ReportBase

                  N:<reportname> [cq:Component]
                              P:sling:resourceSuperType = "cq/reporting/components/reportbase"
                                   N:charting
                                   N:dialog [cq:Dialog]
                                   N:queryBuilder

                            P:nodeTypes [String[]] =”nt:unstructured”

                            P:mandatoryProperties [String[]]=”fileReference”

                   

                   

                  Sample Results

                            

                  PageColumn

                  DamReport

                  Page1        

                  /content/dam/…/image1.jpg

                  Page2   

                  /content/dam/…/image2.jpg

                  Page3   

                  /content/dam/…/image3.jpg

                  Page4   

                  /content/dam/…/image4.jpg

                   

                   

                   

                  In DamReport column, on click of the result navigates to "<hostname>:<portname>/content/dam/.../image1.jpg.html".

                  i need this ".html" not to append.

                  • 6. Re: How to open a image from CQ reports results?
                    Fazil9999 Level 1

                    Hi,

                         Found the problem. In the reporting libs file(Column.js), they have written the code in such a way that, what ever the link maybe ".html" will be appended.

                         example  :

                    Result in page activity report

                    A links navigates to "http://hostname:portname/etc/designs/default/jcr:content.html" in page activity report, where it should be like "http://hostname:portname/etc/designs/default.html"

                     

                    So in my case, Image couldn't open.

                    Just made some script level change and it worked fine.

                     

                    Thanks for Your effort

                    Fazz

                    • 7. Re: How to open a image from CQ reports results?
                      Sham HC Level 7

                      Thanks Fazz.  I am sorry, During my research I have modified that files & hence issue went unnoticied. I verified with fresh instance & can reproduce the issue. I have filled the case CQ5-21733.