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 !

Coordinator
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 www.combit.net. 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.

Cheers,

-John

Dec 12, 2012 at 3:04 PM

The message I get while opening the design :

Project ' .... \report.ls'

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

Coordinator
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 http://www.combit.net/en/knowledgebase.aspx?action=display&articleid=KBTE000752 for a more detailed description than I was able to provide.

-John

Mar 28, 2013 at 11:42 AM
Hello!
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
Coordinator
Mar 28, 2013 at 12:35 PM
Hi,

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

Thx,
-John
Mar 28, 2013 at 12:45 PM
Yeah of course:
Environment:
  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:

Image
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 issue_statuses.name FROM issue_statuses WHERE id = '" + id + "'";
            DataTable dtId = GetDataTable(sql);

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

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.

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

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

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 :-).

-John