Announcement

Collapse
No announcement yet.

Limit records in graphics

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Limit records in graphics

    How can i limit the number of records to show in a graphic.
    I need sum sales for product, but when i run my report, it show all my products.

    I put to end if my SQL statment LIMIT 10 but SC show a error when i do that.?

  • #2
    Hello,

    Try removing pagination from that application (on the app configuration), and then apply limit on your SQL.

    regards,
    Bernhard Bernsmann

    Comment


    • #3
      I did, but i get a error, SC generate a SQL and add to LIMIT 10 the group by with my rule for grouping:

      Error
      Se produjo un error al acceder a la base de datos
      You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by suc.suc_nmbre, pro_nmbrecrto order by suc.suc_nmbre asc, pro_nmbrecrto' at line 1
      select count(*), sum(ved_cntdad) as sum_cantidad, sum(ved_prcio) as sum_valor, suc.suc_nmbre, pro_nmbrecrto from ved_vnta_dtlle ved, ven_vnta ven, pro_prdcto pro, suc_scrsal suc where ven.ven_cdgo = ved.ven_cdgo and ved.pro_cdgo = pro.pro_cdgo and ven.suc_cdgo = suc.suc_cdgo and ven.neg_cdgo = 1 and tdo_cdgo = 'VEN' and ven.ven_procsdo = 'S' and ven.ven_actvo = 'S' LIMIT 10 group by suc.suc_nmbre, pro_nmbrecrto order by suc.suc_nmbre asc, pro_nmbrecrto asc
      Attached Files

      Comment

      Working...
      X