On 07/13/2010 09:50 AM, Paul McNett wrote:
> On 7/13/10 8:58 AM, Jeff Johnson wrote:
>    
>> Creating reports with the designer is awesome but running them is
>> another story - at least for me.  I want to put up a form with a list
>> box on it and have the user select an item and use that record to run a
>> report.  A fairly common thing to do with my VFP apps.
>>      
> Yep, pretty common with my Dabo apps, too. :)
>
>    
>> I created a form
>> with the list box, but can't figure out how to either use that form or
>> add the controls to the report form.
>>      
> I don't understand. You created a UI form or dialog and have added the list 
> box, and
> this is working correctly?
>
> I have a FrmReport base class that has 'preview' and 'print' buttons, and 
> properties
> to set the rfxml and data set to use to run the report. When the user clicks
> 'preview', the report writer is instantiated with those properties, the 
> report is run
> and the output is previewed in the user's PDF viewer.
>
>    
>> I see an "addcontrols" method in
>> the report form, but no examples on how to use that method.
>>      
> Typically, like this:
>
> def addControls(self):
>     self.super()
>     siz = self.Sizer
>     hs = dabo.ui.dSizer("h")
>     hs.append(dabo.ui.dLabel(self, Caption="Invoice Date:")
>     hs.append(dabo.ui.dTextBox(self, RegID="txtInvDate"))
>     siz.insert(0, hs)
>
>
>    
>> I was also
>> wondering if I can use the .rfxml from the form I created in the report
>> form.
>>      
> Your overuse of the word "form" leaves me confused about what you are asking. 
> I think
> you are asking how to use the .rfxml you created using the designer in your 
> runtime
> ui form for running the report.
>
> You instantiate a dabo.dReportWriter instance, and feed it the .rfxml and 
> data set to
> report on.
>
>    
>> Any ideas will certainly be appreciated.
>>      
> Check out dabo/dabo/lib/reporting_tests/invoice_demo/invoice.py for how to
> instantiate and set the properties. In your case, you don't want to set
> UseTestCursor, but set the Cursor property instead.
>
> Paul
>
>
>
>    
Thanks Paul:

I created a dForm to look like I wanted my FrmReport to look like.

-- 
Jeff

---------------

Jeff Johnson
[email protected]
(623) 582-0323

www.san-dc.com

_______________________________________________
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