The below is a webcomponent for printing some reports I used the demo code from "WebContactList":, The only extra feature I wanted to add was the choice of HTML or PDF output. what code needs to be entered to add this extra choice?
Your help is appreciated. If you need me to provide more info, just let me know. Thanks.
ContactType: All or Individual
OutputType: HTML or PDF [this choice doesn't work yet, need code]
ContactList: <list of contacts>
ReportList: <list of reports>
PRINT
-------------------below form properties after validate code------------
Your help is appreciated. If you need me to provide more info, just let me know. Thanks.
ContactType: All or Individual
OutputType: HTML or PDF [this choice doesn't work yet, need code]
ContactList: <list of contacts>
ReportList: <list of reports>
-------------------below form properties after validate code------------
Code:
collections = alltrim(CurrentForm.Controls.ContactList) report = alltrim(CurrentForm.Controls.ReportList) if CurrentForm.Controls.ContactType = "1" then dim filter as c dim order as c Filter = ".T." Order = "Collection_status+str(Current_balance,19,5)" Dim filename as c filename = session.session_folder + "tempreport.pdf" filename = report.saveas(report,"pdf",filter,order,filename,.f.) if file.exists(filename) currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3") end if else IF eval_valid("collections") = .f. Then goto skipreport end if dim filter as c dim order as c Filter = "Collections_id = \""+collections+"\"" Order = "" Dim filename as c filename = session.session_folder + "tempreport.pdf" filename = report.saveas(report,"pdf",filter,order,filename,.f.) if file.exists(filename) currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3") end if skipreport: end if
Comment