Re: [PythonReports-users] Images
Brought to you by:
a1s
From: Werner F. B. <wer...@fr...> - 2013-02-11 09:23:43
|
On 11/02/2013 10:10, alexander smishlajev wrote: > On 11.02.2013 11:03, Werner F. Bruhin wrote: >>> Indeed it is not evaluated. It shouldn't be, with your template >>> contents. Please change the <data> line to <data >>> expr="ru.getRecipeImagePNG(THIS.id)" /> >> Explains why I like to use the designer. > Matter of preference. I find it much easier to understand in XML. I am lousy in remembering syntax. My method is being called now - great, once per recipe, 3 for the test. But then I get this exception: NameError: global name 'Data' is not defined File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 555, in <module> dlg.ShowModal() File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_windows.py", line 805, in ShowModal return _windows_.Dialog_ShowModal(*args, **kwargs) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aquabutton.py", line 434, in OnLeftUp self.Notify() File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aquabutton.py", line 864, in Notify self.GetEventHandler().ProcessEvent(evt) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_core.py", line 4154, in ProcessEvent return _core_.EvtHandler_ProcessEvent(*args, **kwargs) File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 345, in doReportPreview env.report_preview() File "c:\Python27\Lib\site-packages\PythonReports\editor\environment.py", line 263, in report_preview _printout = self.report_build() File "c:\Python27\Lib\site-packages\PythonReports\editor\environment.py", line 245, in report_build return Builder(_template).run(_data) File "c:\Python27\Lib\site-packages\PythonReports\builder.py", line 1461, in run return self.build_printout() File "c:\Python27\Lib\site-packages\PythonReports\builder.py", line 2363, in build_printout Data.make_element(_root, data=_image.getdata(), Best regards and thanks for the quick turn around and the help on this. Werner |