problem solved... thank u 2017-11-23 11:49 GMT+00:00 António Ramos <ramstei...@gmail.com>:
> I´m setting the page margins but the pdf and printed paper dont assume > that value > > [image: Imagem inline 1] > > [image: Imagem inline 2] > > 2017-11-23 11:11 GMT+00:00 António Ramos <ramstei...@gmail.com>: > >> Thank you for your help. >> >> >> 2017-11-22 20:37 GMT+00:00 Alex <a...@jobsta.at>: >> >>> you do not have to buy a license for a private app: >>> https://www.reportbro.com/license/index >>> >>> the logo is only printed when using the public available reportbro >>> instance. When you use your own server there will not be a logo on the >>> generated pdf file. Unless you call generate_pdf with add_watermark=True >>> parameter: >>> https://www.reportbro.com/docs/methods >>> >>> you should not read the report template from the report_request table, >>> because it is only used as a temporary table for the plugin (as mentioned >>> above). You should store your report template yourself (in your save >>> controller) and then use this template (from db or file system etc.) to >>> generate a report. >>> >>> about the fonts: what does not work? first you have to add it when >>> initializing the plugin so the font is available in the designer. This is >>> demonstrated in the certificate demo: >>> https://www.reportbro.com/demos/index >>> >>> On the server you have to specify the additional_fonts parameter, the >>> value of the font must be the same as the value in the plugin intialization >>> (so the font matches). And of course the specified ttf file must exist (in >>> your case static/fonts/arial.ttf) >>> >>> On Wednesday, November 22, 2017 at 3:56:33 PM UTC+1, Ramos wrote: >>>> >>>> Great. Will investigate further... >>>> >>>> Also another question >>>> >>>> the reportbro logo at the bottom of the pdf is there to stay? >>>> >>>> I´m doing a private app for my business. Do i need to pay any licence? >>>> How do i remove that logo in the bottom of the page? >>>> >>>> Regards >>>> António >>>> >>>> 2017-11-22 13:31 GMT+00:00 Alex <al...@jobsta.at>: >>>> >>>>> On Wednesday, November 22, 2017 at 1:46:06 PM UTC+1, Ramos wrote: >>>>>> >>>>>> Some questions ... >>>>>> >>>>>> 1 - i see that you have already a report_request table with the >>>>>> reports. >>>>>> Are you talking about this table to save reports? Looks to me that >>>>>> this table is to save the "templates" of the pdf reports >>>>>> >>>>> >>>>> this is a different table to temporarily store report definition and >>>>> data. It is used as a workaround for the plugin. The data for pdf preview >>>>> in MS Edge browser cannot be set directly and needs a url instead. Further >>>>> this is also needed for xls preview, because there is no simple preview >>>>> plugin for xls. Therefor the url for xls preview is opened in a new tab >>>>> and >>>>> handled by the browser. >>>>> >>>>> >>>>>> 2 - How do i merge data from my db with your templates and generate a >>>>>> live pdf with live data? so users can save it in their desktop ? >>>>>> >>>>> >>>>> in your web2py controller (where you generate the final pdf file) >>>>> create a Report instance: >>>>> report = Report(report_definition, data) >>>>> >>>>> where report_definition is the report template (the one you uploaded >>>>> to your save controller), and data is a dict containing the actual data to >>>>> fill in. the keys must match with your parameters of the report. E.g. if >>>>> you have a parameter "first_name" then data must contain a key >>>>> "first_name". You should check afterwards if there were any errors during >>>>> report initialization (report.errors) >>>>> >>>>> the report itself (pdf file) is created with >>>>> report_file = report.generate_pdf() >>>>> >>>>> >>>>>> regards >>>>>> António >>>>>> >>>>>> 2017-11-22 12:35 GMT+00:00 Alex <al...@jobsta.at>: >>>>>> >>>>>>> On Wednesday, November 22, 2017 at 12:07:56 PM UTC+1, Ramos wrote: >>>>>>>> >>>>>>>> Not that easy :) >>>>>>>> >>>>>>>> i´m reading your links and also this link >>>>>>>> https://github.com/jobsta/reportbro-designer/blob/master/dem >>>>>>>> os/custom_save.html >>>>>>>> >>>>>>>> where i´m stuck in the save part >>>>>>>> >>>>>>>> what url do i put in the save url ? >>>>>>>> >>>>>>> >>>>>>> that's up to you. e.g. >>>>>>> '{{=URL('report', 'save')}}' >>>>>>> so you would need a controller file report.py with a function save >>>>>>> in your application. There you have to save the report (available as >>>>>>> data >>>>>>> parameter) yourself wherever you want to. E.g. you could save it in >>>>>>> your db >>>>>>> or as a file. >>>>>>> >>>>>>> In your case you don't have the controller you specified in the url, >>>>>>> therefor the ajax call fails. >>>>>>> >>>>>>> >>>>>>>> [image: Imagem inline 1] >>>>>>>> >>>>>>>> i moved the run function from the reportbro_web2py.py to a >>>>>>>> controller and i use it in the above "your save controller url" but i >>>>>>>> get a >>>>>>>> bad request in the browser when i do in the console >>>>>>>> $('#reportbro').reportBro('save') >>>>>>>> >>>>>>>> Thank you >>>>>>>> >>>>>>>> -- >>>>>>> Resources: >>>>>>> - http://web2py.com >>>>>>> - http://web2py.com/book (Documentation) >>>>>>> - http://github.com/web2py/web2py (Source code) >>>>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>>>> --- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "web2py-users" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to web2py+un...@googlegroups.com. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> Resources: >>>>> - http://web2py.com >>>>> - http://web2py.com/book (Documentation) >>>>> - http://github.com/web2py/web2py (Source code) >>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "web2py-users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to web2py+un...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.