Announcement

Collapse
No announcement yet.

PDF Reports: setting field precision throws MySQL error

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

  • PDF Reports: setting field precision throws MySQL error

    I'm creating a PDF Report in SC Enterprise with the latest updates.

    If I set a desired precision on a field, I get an error from MySQL:
    Error
    Error while accessing the database:
    Unknown column 'ROUND(MyField,2)' in 'field list'...
    A similar SELECT works fine from the MySQL command line.

    What's with the quotes (') enclosing the call to ROUND()? That might cause this.

    I noticed that trying to code this in the SQL causes a similar error:
    SELECT
    ROUND(Price, 2) AS Price,
    ....
    I get a similar error from that, even though it is valid SQL.

    Probably separate but related:
    If I try to change/remove/delete a precision on the field property (once defined), SC still calls ROUND() with the precision value that was first chosen (it cannot be changed or removed).
    Last edited by Giblet535; 05-12-2014, 01:32 PM.

  • #2
    Further investigation:

    This only happens if the ROUND() statement is entered in the SQL of the report. That will cause an error. There is no way to recover from that error, other than delete/new app.

    Creating a new report and using only the precision value for each field works as one expects.

    Comment


    • #3
      Hello,

      Issue reported to our bugs team.

      regards,
      Bernhard Bernsmann

      Comment

      Working...
      X