-
1. Re: Automatically print a single dashboard multiple times based on a filter
Aaron Clancy Feb 7, 2014 12:03 PM (in response to Carlo Liquido)Yes you can script this with tabcmd export. I've done it before in a batch script. Are you comfortable with batch?
-
2. Re: Automatically print a single dashboard multiple times based on a filter
Carlo Liquido Feb 7, 2014 12:11 PM (in response to Aaron Clancy)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.
-
3. Re: Automatically print a single dashboard multiple times based on a filter
Aaron Clancy Feb 7, 2014 12:33 PM (in response to Carlo Liquido)9 of 9 people found this helpfulAll 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)
rem *****************************
@echo off
set server=http://yourtableauserver
set user=administrator
set password=yourpassword
tabcmd login -s %server% -u %user% -p %password%
for /f "tokens=*" %%a in (Schoolslist.txt) do call :processline %%a
pause
goto :eof
:processline
echo Creating PDF for School %*
tabcmd export "workbookname/sheetname?School=%*" --pdf -f "C:\Scripts\PDFs\%*
goto :eof
:eof
rem ****************************
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)
Schoolabc
Schoolxyz
School123
...
...
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
-
4. Re: Automatically print a single dashboard multiple times based on a filter
Carlo Liquido Feb 7, 2014 12:58 PM (in response to Aaron Clancy)Awesome! thanks a ton. Hopefully I can figure it out.
-
5. Re: Automatically print a single dashboard multiple times based on a filter
Aaron Clancy Feb 7, 2014 1:31 PM (in response to Carlo Liquido)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
-
6. Re: Automatically print a single dashboard multiple times based on a filter
Dave Moyer Feb 7, 2014 2:24 PM (in response to Aaron Clancy)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.
-
7. Re: Automatically print a single dashboard multiple times based on a filter
christopher johnson Feb 17, 2014 7:04 AM (in response to Dave Moyer)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.
-
8. Re: Automatically print a single dashboard multiple times based on a filter
vishwanath Pendyala Mar 26, 2014 6:56 PM (in response to christopher johnson)Hi
Where you able to achieve this in the tableau desktop ?
Thanks
Karthik
-
9. Re: Automatically print a single dashboard multiple times based on a filter
vishwanath Pendyala Mar 26, 2014 6:58 PM (in response to Aaron Clancy)HI Aaron
I wanted to do the same but with out using Tableau Server , Is there any way to do it . Your comments are appreciated
Thanks
Karthik
-
10. Re: Automatically print a single dashboard multiple times based on a filter
Rattana Yeang Apr 7, 2016 4:03 PM (in response to Aaron Clancy)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?
-
11. Re: Automatically print a single dashboard multiple times based on a filter
Aaron Clancy Apr 7, 2016 4:18 PM (in response to Rattana Yeang)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
-
12. Re: Automatically print a single dashboard multiple times based on a filter
Michael Miller Apr 26, 2016 6:28 AM (in response to Aaron Clancy)Thank you! I was able to implement this process and it works beautifully.
-
13. Re: Automatically print a single dashboard multiple times based on a filter
Petrus Venter Jul 28, 2016 3:08 AM (in response to christopher johnson)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?
-
14. Re: Automatically print a single dashboard multiple times based on a filter
Jean-Paul Behrens Aug 22, 2016 10:22 AM (in response to Carlo Liquido)Hey Aaron,
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?