Just a thought,
If power server is aprox the same as the old Jaguar CTS, you should be able to code in PB script. If it's the same as Powerdynamo, then it's another ball game, and powerscript is not cutting it.
If it is powerscript compatible, consider using Salve as HTML on datastores and convert that file to excel or .doc using OLE over third party dll.
You'd save a massive amount of time as compared to C# export and perhaps as good but cheaper than the third party tool you plan to use.
It preserves the GUI better than most convert programs I've seen, not to mention the native SaveAs Excel and doc pbscript functions that basically only save the columns retrieved in SQL/Spr as displayed in detail band of dwo.
The native Excel functions are still not very smooth if you want wysiwyg.
We allow the user to select WYSIWYG in a setup that basically is OLE. Excel goes pretty much like this:
dwo.SaveAs( ls_docname, HTMLTable!, TRUE )
oleobject myoleobject, lole_Sheet
myoleobject = CREATE OLEObject
myoleobject.ConnectToNewObject("Excel.Application")
myoleobject.Application.DisplayAlerts = False
myoleobject.Workbooks.Open(ls_docname)
lole_Sheet = myoleobject.ActiveSheet
lole_Sheet.Cells.Borders.LineStyle = 0
myoleobject.Activeworkbook.SaveAS(ls_xls, 1)
myoleobject.Workbooks.close()
myoleobject.quit()
myoleobject.DisconnectObject()
Word goes like this:
oleobject myoleobject, lole_Sheet
myoleobject = CREATE OLEObject
myoleobject.ConnectToNewObject("Word.Application")
myoleobject.Documents.Open(ls_docname)
if ll_orientation = 1 then
myoleobject.ActiveDocument.PageSetup.TogglePortrait
end if
myoleobject.ActiveDocument.SaveAs(ls_word)
myoleobject.quit()
myoleobject.DisconnectObject()
The other option is to scan the dwo for columns & computed fields, what bands they reside in.
ls_syntax = sqlca.SyntaxFromSQL(as_sql,'style(type=grid)',ls_errors)
ll_ret = lds.create(ls_syntax,ls_errors)
ll_ret = lds.SetTransObject(sqlca)
ll_ret = lds.Retrieve()
Then map it together using data syntax.
lds.Object.Data.Primary.Current[1,ll_colid_new,ll_count,ll_colid_new] = adw_dwo.Object.Data.Primary.Current[1,ll_colid,ll_count,ll_colid]
Regards
Brage