Creating PDF documents and exporting download links from the Tableau server

StackOverflow https://stackoverflow.com/questions/23250390

  •  08-07-2023
  •  | 
  •  

문제

Is it possible to create PDF documents (e.g. on a nightly schedule) with Tableau and have those documents exposed by a URL by the Tableau server?

This sort of approach is common in the Jasper Reports and BIRT world, so I was wondering if the same approach is possible with Tableau?

I couldn't see any documentation on the Tableau site for creating PDFs, other than print to PDF

도움이 되었습니까?

해결책

With Tableau Server, you can access your published workbook in a pdf format with this URL: http://nameofyourtableauserver/views/NameOfYourWorkbook/NameOfYourView.pdf

Simply, the url is the url of your view + you add ".pdf".

The pdf file will be generated dynamically when accessing the URL.

Another option is to program your own script with tabcmd. You can have more info on tabcmd here: http://kb.tableausoftware.com/articles/knowledgebase/using-tabcmd

다른 팁

The same technique also works for PNG. You can control filters using ?field_name=value. You can even select multiple values like this ?field_name=value1,value2.

Parameters can be set the same way.

Personally I've had the best luck with discrete dimensions instead of continuous ones.

I use the Windows Task Scheduler with batch files and Tabcmd.

Programs needed:

  • Tabcmd
  • Windows TaskScheduler (All Programs- Accessories - system tools)

http://onlinehelp.tableausoftware.com/v8.1/server/en-us/tabcmd_overview.htm (tabcmd, how it works?)

Batchfile (create a text file and then save with file extension .bat):

  • 1- Locate tabcmd and login
  • 2- use function tabcmd get "http:\..." and -f "C:...pdf" to save to file.
  • 3- concatenate the filters you want to use to the end of your URL as shown in other answers(all filters on the view must be included(filled out))
  • 4- Save Batch file

Windows Task Scheduler:

  • 1- create a task that will execute the batch file
  • 2- TEST

You can do this by typing

http://server/views/WorkbookName/SheetName.pdf?:format=pdf

Another option will be using javascript api like below..

function exportPDF() {
  viz.showExportPDFDialog();
}   
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top