Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: sql xaction result display badly in CDF

  1. #1
    Join Date
    Aug 2009
    Posts
    122

    Default sql xaction result display badly in CDF

    i made a sql xaction and run successful , the result is at below.



    i add the xaction into a cdf page. After i run cdf page i found the result display in one row only. Shouldn't it display in multiply rows ?
    Attached Images Attached Images   
    Last edited by mathhew; 11-25-2009 at 09:27 AM.

  2. #2
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    Maybe, what are you trying to do there? Why don't you use a table component to print that in a better format (or if you want a report, use PRD)
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Aug 2009
    Posts
    122

    Default

    Quote Originally Posted by pmalves View Post
    Maybe, what are you trying to do there? Why don't you use a table component to print that in a better format (or if you want a report, use PRD)
    so here is my problem.
    i want to 2 charts and 1 table on cdf page. 2 charts represent same meaning(may be different company's sales). table shows detail information of company which is clicked by customer in charts.
    However table component didn't work for me ,so i decide to use xaction. Unfortunately , xaction show result at only one row.

    May be i can use report to do that. Can i make a report into a xaction and deliver a parameter into a report ?

  4. #4
    Join Date
    Aug 2009
    Posts
    122

    Default


  5. #5
    Join Date
    Jul 2007
    Posts
    2,497

    Default

    You have a lot of weird problems, I don't know what's happening; The tableComponent works fine for me.

    Do you have the cdf tutorial? Has a lot of extensive samples and docs, I'm curious to see if that works for you or if you have something else wrong on your system
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  6. #6
    Join Date
    Nov 2009
    Posts
    28

    Default

    The result looks strange because you only send out the result from the query without doing any html-formating. When looking at a result set in DS or in the user console the result gets formated with ViewAction but not if run it with CDF (appends "wrapper=false" to the URL).
    So unless you don't create your own table-layout based on the result I guess you should try to get the table component working.
    Seems strange that it works for everyone else...
    Have you tested jtable.xaction in DS by adding default values to inputs:
    QUERY = "select NON EMPTY [Measures].[Sales] ON COLUMNS, NON EMPTY TopCount([Customers].[All Customers].Children, 10, [Measures].[Sales]) ON ROWS from [SteelWheelsSales]"
    CATALOG = "file:C:\biserver-ce-3.5.0.stable\biserver-ce\pentaho-solutions\steel-wheels\analysis\steelwheels.mondrian.xml" (my path to the sample xml)
    JNDI = "SampleData"

    If the Xaction works you should get the below response when testing it (don't forget to refresh solution repository):

    {"metadata":["Sales"],"values":[["Euro+ Shopping Channel","912294.11"],["Mini Gifts Distributors Ltd.","654858.06"],["Australian Collectors, Co.","200995.41"],["Muscle Machine Inc","197736.94"],["La Rochelle Gifts","180124.9"],["Down Under Souveniers, Inc","174139.77"],["Dragon Souveniers, Ltd.","172989.68"],["Land of Toys Inc.","164069.44"],["The Sharp Gifts Warehouse","160010.27"],["Kelly's Gift Shop","158344.79"]]}

    If not you might want to try to remove the Javascript Process Action and change the output to query_result just to rule out any problems with locals and JSON.

    /Andreas

  7. #7
    Join Date
    Aug 2009
    Posts
    122

    Default

    Quote Originally Posted by pmalves View Post
    You have a lot of weird problems, I don't know what's happening; The tableComponent works fine for me.

    Do you have the cdf tutorial? Has a lot of extensive samples and docs, I'm curious to see if that works for you or if you have something else wrong on your system
    thanks for reply. i got problem on tablecomponent(http://forums.pentaho.org/showthread.php?t=73498) and we have talked about it. i am trying to solve the problem.

  8. #8
    Join Date
    Aug 2009
    Posts
    122

    Default

    Quote Originally Posted by AndreasT View Post
    The result looks strange because you only send out the result from the query without doing any html-formating. When looking at a result set in DS or in the user console the result gets formated with ViewAction but not if run it with CDF (appends "wrapper=false" to the URL).
    So unless you don't create your own table-layout based on the result I guess you should try to get the table component working.
    Seems strange that it works for everyone else...
    Have you tested jtable.xaction in DS by adding default values to inputs:
    QUERY = "select NON EMPTY [Measures].[Sales] ON COLUMNS, NON EMPTY TopCount([Customers].[All Customers].Children, 10, [Measures].[Sales]) ON ROWS from [SteelWheelsSales]"
    CATALOG = "file:C:\biserver-ce-3.5.0.stable\biserver-ce\pentaho-solutions\steel-wheels\analysis\steelwheels.mondrian.xml" (my path to the sample xml)
    JNDI = "SampleData"

    If the Xaction works you should get the below response when testing it (don't forget to refresh solution repository):

    {"metadata":["Sales"],"values":[["Euro+ Shopping Channel","912294.11"],["Mini Gifts Distributors Ltd.","654858.06"],["Australian Collectors, Co.","200995.41"],["Muscle Machine Inc","197736.94"],["La Rochelle Gifts","180124.9"],["Down Under Souveniers, Inc","174139.77"],["Dragon Souveniers, Ltd.","172989.68"],["Land of Toys Inc.","164069.44"],["The Sharp Gifts Warehouse","160010.27"],["Kelly's Gift Shop","158344.79"]]}

    If not you might want to try to remove the Javascript Process Action and change the output to query_result just to rule out any problems with locals and JSON.

    /Andreas
    you are right, i don't have html-formatting code for my result.
    i just write "<div id="table_Object">"in template.html , i don't know how to add html-formatting based on my sql result . do i need to write some html code(<br>,<p>) in template.html or in xaction file ?

  9. #9
    Join Date
    Nov 2009
    Posts
    28

    Default

    I guess you could either add the formating in the xaction or add your own component to the Core components file which makes the formating.
    You could try to use the table in google visualizations if you choose to use xaction.
    If you follow the video from Michael Tarallo, http://michaeltarallo.blogspot.com/2...1_archive.html, it would be pretty easy.
    But I personal think you should try to figure out why the table component don't work.

    Br,
    Andreas

  10. #10
    Join Date
    Aug 2009
    Posts
    122

    Default

    thanks for pmalves and AndreasT always answer my in patient.

    I try a lot of times , change browser , JDK version , even OS. However i always failed to see the table component works.

    Is there anything can tell me where wrong is (like logs or error window) , i can't locate error because there is little error information. Dose anybody have good idea?

    PS: my QueryComponent failed either.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.