Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5611 Zobrazení

Hello,

I am trying to create my first dynamic report, but I keep getting a damaged PDF as a result so nothing will open. If I remove the lines that call the dynamic content like:

<para style="Standard">[[repeatIn(objects,'p')]][[p.name]]</para>

So, trying to understand what is going on I am wondering if objects in my module is doing what its suppose to do. Is there anyway I can debug the content of objects to see whats going on and why the report is not working?

Have anyone else experienced a corrupted PDF file when trying to add dynamic content?

Thanks

Avatar
Zrušit
Nejlepší odpověď

Hi ,

The objects you mentioned in the nutshell is the model that you are working on , let say you are working on the sales order , then the object is the sales order and anything that defined in the model of SALES ORDER can be access thru this object.

but you have understand the concept of the RML report of OpenERP , the best place to go is

https://doc.openerp.com/6.0/developer/3_11_reports/11_2_XSL-RML_reports/

HTH.

Avatar
Zrušit
Autor

Thanks Kalmenchia!! So basically if I am calling a report like report_sxw.report_sxw('report.prov', 'product.product', 'addons/sim/report.rml',parser= folio_report) then under the .rml file the object will be 'product.product', right? Thats "automatically" or I have to 'pass' the object somehow? I am asking this because for some reason when I create dynamic reports I always get a damaged PDF so I am trying to debug everything to understand whats wrong. Thanks again for your time.

yes , as long as you do this right , 1. the report defination py file, rml are in getting the right model ,eg yours , you already called the "product.product" , so it will get from product model . When u get a corrupted pdf , it has many reasons , perhaps , your RML template is not correct , and the best if you are going to use the RML's way then you have learn RML syntax or ELSE , there are a few options available , http://blog.instant-erp.com/2013/05/the-7-seven-options-of-reports-in.html and more is coming i believe !

Autor

Thanks again. I understand RML syntax pretty much. I am testing with a super simple report and as soon as I remove the "dynamic" part from the RML file, for example "<para style="Standard">[[repeatIn(objects,'p')]][[p.name]]</para>" it works, thats why I am trying to understand what can be so wrong with that line that is producing a corrupted PDF. If you have any idea please let me know. Thanks again for your help!

Related Posts Odpovědi Zobrazení Aktivita
1
lis 24
1512
0
srp 24
1558
2
lis 23
3521
5
srp 23
9753
2
kvě 23
2552