Menu

don't know how to create a report from sql query

imane
2017-10-18
2017-10-18
  • imane

    imane - 2017-10-18

    Hi im new with openreports,
    i wrote an sql query wich successifuly retreive data from mysql console , but the same query didn't want to work with open reports below the sql query
    SELECT projects.name ,trackers.name , issues.subject ,issue_statuses.name FROM projects,trackers, issues,issue_statuses WHERE projects.id=issues.project_id AND trackers.id=issues.tracker_id AND issues.status_id=issue_statuses.id
    when i execute it in open reports it has like a confusion with the column name 'name' .
    One more thing I didn't know how to configure a report with report parameter.
    Thanks

     
    • bryan

      bryan - 2017-10-18

      Does column alaising work?

      SELECT projects.name as project,trackers.name as tracker, issues.subject ,
      issue_statuses.name as status FROM projects,trackers, issues,issue_statuses
      WHERE projects.id=issues.project_id AND trackers.id=issues.tracker_id AND
      issues.status_id=issue_statuses.id

      On 18 October 2017 at 21:26, imane enami@users.sf.net wrote:

      Hi im new with openreports,
      i wrote an sql query wich successifuly retreive data from mysql console ,
      but the same query didn't want to work with open reports below the sql
      query
      SELECT projects.name ,trackers.name , issues.subject ,issue_statuses.name
      FROM projects,trackers, issues,issue_statuses WHERE projects.id=issues.project_id
      AND trackers.id=issues.tracker_id AND issues.status_id=issue_statuses.id
      when i execute it in open reports it has like a confusion with the column
      name 'name' .
      One more thing I didn't know how to configure a report with report
      parameter.
      Thanks


      don't know how to create a report from sql query
      https://sourceforge.net/p/oreports/discussion/187722/thread/42dbb991/?limit=25#9b9d


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/oreports/discussion/187722/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --

      Bryan Scott
      Database Administrator
      Pacific Island Forum Fisheries Agency
      http://www.ffa.int

       
    • Dataman

      Dataman - 2017-10-18

      Give the fields new names:

      projects.name AS project_name,trackers.name AS trackers_name,

      Then the entire original SQL in a outer query:

      SELECT *
      FROM ( put original sql with the new field names here)
      ;

      On Wed, Oct 18, 2017 at 5:26 AM, imane enami@users.sf.net wrote:

      Hi im new with openreports,
      i wrote an sql query wich successifuly retreive data from mysql console ,
      but the same query didn't want to work with open reports below the sql
      query
      SELECT projects.name ,trackers.name , issues.subject ,issue_statuses.name
      FROM projects,trackers, issues,issue_statuses WHERE projects.id=issues.project_id
      AND trackers.id=issues.tracker_id AND issues.status_id=issue_statuses.id
      when i execute it in open reports it has like a confusion with the column
      name 'name' .
      One more thing I didn't know how to configure a report with report
      parameter.
      Thanks


      don't know how to create a report from sql query
      https://sourceforge.net/p/oreports/discussion/187722/thread/42dbb991/?limit=25#9b9d


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/oreports/discussion/187722/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Kiva.org - loans that change lives

       
  • imane

    imane - 2017-10-18

    column alaising don't work also i tried it before.

     

Log in to post a comment.