Bug 356166

Summary: Attempts to create duplicate record in MySQL for customised report
Product: [Applications] kmymoney Reporter: Alan Prescott <alanjprescott>
Component: databaseAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED DUPLICATE    
Severity: major CC: christian-david
Priority: NOR    
Version: 4.7.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alan Prescott 2015-12-01 16:53:04 UTC
I tried to create a customised version of the Transactions by Category report and received the following error message ...

Failed to configure report: Error in function void MyMoneyStorageSql::writeReport(const MyMoneyReport&, QSqlQuery&) : writing Reports
Driver = QMYSQL, Host = zanshin, User = alan, Database = KMyMoney
Driver Error: 
Database Error No -1: 
Text:  
Error type 0
Executed: INSERT INTO kmmReportConfig (name, XML, id) VALUES (?, ?, ?);
Query error No 1062: Duplicate entry 'R000002' for key 'PRIMARY' QMYSQL3: Unable to execute statement
Error type 2 

I logged out and back in again and tried again but had the same error message but this time referring to 'R000003'.

FYI kmmReportConfig currently holds records up to 'R000014'.

This is a MySQL database version on a remote host so that my wife can also access the family accounts from her Windoze box.

Reproducible: Always

Steps to Reproduce:
1. Edit a standard report
2. Save changes
3.

Actual Results:  
Fails to save the changes and reports a duplicate key error

Expected Results:  
Create nre, customised copy of the report

MySQL version of the KMyMoney database running on a remote host.
The user 'alan' has full privileges to the KMyMoney database
Comment 1 Christian David 2015-12-02 12:11:44 UTC
I am pretty sure this issue is/will be fixed in version 4.8. Until then you may want to change to the .kmy file or use the workaround described in the comment section of Bug 339103.

*** This bug has been marked as a duplicate of bug 339103 ***