I wrote a custom script to output the data I need for reporting to the swedish tax authorities.
See https://wiki.dolibarr.org/index.php/FAQ_Custom_reporting_script_EN
If you would like my help I would be happy to assist you in writing a custom script based on your needs.