View Single Post
Quote:
Originally Posted by stordoff
I also love this software but need to customize the HTML export.
I need to be able to customize the task report to only show columns that I want to show clients and I also want to have the Gantt view be similar to what I see where I can adjust it to view by quarter, by month, etc.
Thanks!:)
I'm not quite sure if I'm interpreting you correctly, but I think you're asking to be able to control exactly what scale the Gantt view is exported in ("Day", "Week", "Month", etc.,...) as well, perhaps independently, as the width of the columns. And I think you're also asking to be able to control which colums are visible in the Outline view that accompanies the Gantt Chart in html export.

The first is a good suggestion and not currently supported. It shouldn't be too much trouble to write an AppleScript to do what you want for the second. The columns that are visible are the ones that are included in the export, so you'll have to set the view colums, at least temporarily. This should get you started

Code:
tell application "OmniPlan"
	set frontWindow to front window
	set frontDocument to document of frontWindow
	set oldVisibleColumns to {} & task columns of frontWindow
	set task columns of frontWindow to {"Title", "Total Cost", "Effort", "Planned End"}
	tell frontDocument
		save in "Volumes:Extra:myReport.htmld" as "HTML Full Report" with properties {export template:"Users:tom:Library:Application Support:OmniPlan:HTMLTemplates:Custom Project Report"}
	end tell
	set task columns of frontWindow to oldVisibleColumns
end tell
Note that in the next release, there will be a new export command that will replace "save in", above, which will no longer support "as" or "with properties". This will be your new line, then:

Code:
export to "Volumes:Extra:myReport.htmld" as "HTML Full Report" using template "Users:tom:Library:Application Support:OmniPlan:HTMLTemplates:Custom Project Report"
The identifiers of all columns are documented in the AppleScript dictionary for OmniPlan. There are lots of ways this script could go, but hopefully this will get you started.

-Tom