Yes you can script this with tabcmd export. I've done it before in a batch script. Are you comfortable with batch?
I do not have any experience in batch. Is it something I could feasibly learn for just this purpose? It would immensely improve our capabilities so I am more than willing to put the time in.
7 of 7 people found this helpful
All of this is based off the assumption you have Tableau Server. If you don't then you won't be able to take this approach.
I went ahead and wrote the script for you:
Place the following text in a text editor and save it as a .bat extension (Change the variables to your values)
tabcmd login -s %server% -u %user% -p %password%
for /f "tokens=*" %%a in (Schoolslist.txt) do call :processline %%a
echo Creating PDF for School %*
tabcmd export "workbookname/sheetname?School=%*" --pdf -f "C:\Scripts\PDFs\%*
Create a text file in the same directory called Schoolslist.txt
It should just be your schools listed downward (This will get passed in as filter values to the worksheet)
Create a directory called PDFs somewhere on your file system
In the above line I have "School=%* " Replace School with whatever dimension in your data represents a School identifier such as SchoolID etc..... This will pass the value through to the published workbook and filter based off of the school identifier.
Once your done you should be able to double-click your new .bat file and it will iterate through the Schools list you created and create a PDF for each one of them in the PDFs folder, each being named after their School Name or ID.
This should be enough to get you started
Awesome! thanks a ton. Hopefully I can figure it out.
No problem glad to help!
You can automate the entire process, from PDF creation to email transmission to the individual schools if you want.
Sent from my iPhone
This is a problem I've been dealing with as well.
Is there a way to accomplish this automation without Tableau Server though? Or any guesses as possible routes to take even if you haven't accomplished this? I also need to create printed reports based on dashboards that would greatly benefit from some automation.
I would also like to mention that I have the same request for this same solution, but for users of Tableau Desktop, as I understand Dave Moyer is asking. Thanks.
Where you able to achieve this in the tableau desktop ?
I wanted to do the same but with out using Tableau Server , Is there any way to do it . Your comments are appreciated
I just tried this. It looks promising. But I get this error message that says the following:
'tabcmd' is not recognized as an internal or external command, operable program or batch file.
Does the .bat file have to execute on the computer that the server is on?
No it doesn't have to be on the same computer.
You do however need to make sure that the location of tabcmd is in your path environment variable or include the path in the tabcmd statement in the .bat file.
You will need to download tabcmd if you're trying this on a machine that doesn't have tableau server installed.
Sent from my iPhone
Thank you! I was able to implement this process and it works beautifully.
I also need to control the paging in PDF export, based on iterating across a single field. I have Tableau Desktop - can it be done?
This is great! and we are trying to implement this...
However, when our script runs through the loops and generates the dashboard PDFs for different values of the filter/paramter we get no data. Interestingly if we remove the parameter then the PDF has data, but it will only generate for one value of the filter/parameter... For reference my parameter is based on a filter, where the filter has a condition of filter = parameter:
Do you think having the parameter set up this way is causing issues ? Or perhaps do you think there is any other step in your experience that could be tripping us over?