Error at creating a report : One of the expressions used has an error

Dec 12, 2012 at 1:03 PM

after installing and configuring RedmineReports I get a correct list of existing projects, then I click on "Create Report" and get the following error :

One of the expressions used has an error. Errors are displayed interactively at the design start. In other cases, use debug mode to determine the error.

I got this error using the default report and using a minimal report I made that just lists issue Ids and names.

How can I get a more elaborate diagnosis message regarding this error ? or at least enter the debug mode mentioned in message ?

Redmine version : 2.1.4.stable

RedmineReports version : 1.07 (binary download)

Thanks !

Dec 12, 2012 at 1:43 PM

Could you simply turn into the Designer and see if you get an error message when loading the report in there? Could you then try to hit the "Preview" tab in the Designer - do you get an error there?

To enter the debug mode, you could download the List & Label trial from It comes with a "Debug Tool". First start this tool, then choose "Logging > Force Debug Mode" from the menu, reproduce the error (you should get loads of debug messages then) and post the log file either here or PM me.



Dec 12, 2012 at 3:04 PM

The message I get while opening the design :

Project ' .... \'

Object 'Report Container(0.317in, 0.488in, 7.874inm 10.225in)'

Report Container Element 'Chart:History'

after editing the design and deleting all the History charts the issue is cleared, however generated report is empty. Guess this is a separate issue anyway.


Thank you for your support

Dec 13, 2012 at 5:39 AM

I think a debug log would be required to sort this out - your history table seems to miss something. Could you try to create a log file as described? See for a more detailed description than I was able to provide.


Mar 28, 2013 at 11:42 AM
I have the same problem as described above. I run my application and collected debug logs. Could you check it?
Thank you for help
log at pastebin
Mar 28, 2013 at 12:35 PM

could you tell us which Redmine version exactly you're using?

Mar 28, 2013 at 12:45 PM
Yeah of course:
  Redmine version                          2.1.4.stable
  Ruby version                             1.9.3 (i686-linux)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  google_analytics_plugin                  0.2.0
  redmine_ckeditor                         0.2.1
  redmine_default_columns                  0.1.1
  redmine_documents_short                  0.1.0
  redmine_graphs                           0.1.0
  redmine_local_avatars                    0.1.1
  redmine_logs                             0.0.5
  redmine_mylyn_connector                  2.8.2.stable
  redmine_plugin_views_revisions           0.0.1
Mar 28, 2013 at 1:01 PM
I guess that my problem source is in me issue state table:

Mar 28, 2013 at 1:23 PM
I thinnk, that bug reproduce from RedmineDataAccess.cs:
public string GetStatusNameFromId(int id)
            //from this line, when we try download non existing name, which id is statically added to *.lst file
            string sql = "SELECT FROM issue_statuses WHERE id = '" + id + "'";
            DataTable dtId = GetDataTable(sql);

            DataRow dr = dtId.Rows[0];
            return dr["name"].ToString();
Am i right?
Mar 28, 2013 at 2:15 PM

The database looks good, the fact that default_done_ratio might be null is checked somewhere else in the code... Please allow for the easter holidays, we'll come back to this issue early next week.

Mar 28, 2013 at 6:50 PM
No problem, I wish you happy a merry easter :)
Apr 4, 2013 at 9:24 PM
I found the solution for problem:
I edited report.lst from:
FormulaCoord=GetStatusNameFromId (1)
FormulaCoord=GetStatusNameFromId (15)
which correspond to my open status.

Problem cause History.1 which don't correspond to app variables:
therefore, I see the error:
Do you have an idea how to prevent it?
Apr 5, 2013 at 6:02 AM

Great you found the cause. What the report assumes is the following: Status IDs are assigned consecutively, starting with "1" and at least a few statuses are existing. In your case, you obviously only have IDs 14,15 and 16 assigned. Fix:
  • in the designer, locate the affected charts (probably the last two "History" charts, the title says "Distribution of Ticket Statuses"
  • double click, go to "Series Axis (Y)" and click on the button behind "Series Definitions"
  • in this dialog, delete all series but three
  • for these three, change the coordinate value to History.14, History.15 and History.16
  • repeat for the second chart
This should help. Feedback is welcome :-).