J,
Here is some code that may help. I pulled it from our reporting module 
that we created using reportwriter.  I may have missed something because 
I cut, pasted and changed a word or two to show how we do it.

import dabo.dReportWriter as drw

tmpCursor = self.Form.PrimaryBizobj.getTempCursor()

myreportdata = self.Form.reportbizobj
  or
myreportdata = tmpCursor.execute("select * from mydata where...")

rw = drw()
rw.OutputFile = 'myReport.pdf'

--point to the dir where my rfxml is if not in the app's dir, in this 
case I am pointing to app\reports
rw.ReportFormXML = os.path.join("reports",'myreport.rfxml')

rw.Cursor = myreportdata.getDataSet()
rw.Encoding = '1252'
rw.write()
if sys.platform == 'win32':
       cmd='start "Report Preview" "%s"'%(rw.OutputFile.strip())
else:
       cmd='xdg-open "'+rw.OutputFile.strip()+'"'

preview = Popen(cmd, shell=True)

Hope this helps.
Larry Long


On 2/26/2010 12:19 AM, jvandal wrote:
> I am looking at the reportDesigner screencasts and I don't know how to link a
> data file to the report.
> Do you have to create a Wizard app and then ? I looked at a Wizard app that
> I created a couple of months ago, but I saw no database files  relationship
> in the. I tried the Reportdesigner but I couldn't find a way to access the
> data?
> I have a FrmDoctor.py and it gives me a screen to enter , but I entered a
> sql statement to select data but  nothin
>    
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to