>Hi Ed,
>
>
>
>I saw this in the help file, I just wasn't sure where it went in the form?
>
>>
oF2W = NEWOBJECT("frx2word", "msoexp")
>>oF2W.SaveFolder = "C:\My Documents\"
>>oF2W.DOC_FileName = "Wordout.doc"
>>nSuccess = oF2W.ReportForm("MyReport")
>
>
>Does this code go in the "load" event of the form?
>
It goes at whatever point you create the output document.
>How do I go about printing the report for just the one consignor my user wants.
>
Select just the data for that one consignor into the cursor that drives the detail band of the FRX, either using SQL Select or a SET FILTER or by creating a filtered index
>Right now they enter the consignor code number in a textbox and it's used in the line, "repo form myreport for stnconsi_cons_no = "code number".
>
Assuming the report runs in the default data session,using the tables now open, add the following two lines of code before calling FRX2WORD
SET FILTER TO stnconsi_cons_no = "code number"
LOCATE
before the code I gave originally will do it brute force, you simply set a filter on the table equivalent to the FOR clause you use in your report form command now. Doing a SQL Select to create a temporary cursor would be better coding technique, but I don't know how the rest of the app or report is set up.
>How do you translate that into, nsuccess = oF2W.reportform("myreport")?
>
oF2W.ReportForm("myreport") executes the report MYREPORT.FRX and sends it's output to the Word doc named before. nsuccess contains a non-negative value if it succeeds, negative numbers are errors as listed in the docs. Read the docs; they explain this in detail. You have to learn what it does or you won't be able to use it; each time and place you use it you'll have to configure the reporting environment and FRX2WORD to run the report and create your output per your specs.