BIRT Reports - How to schedule them and send by email? - eclipse

I am currently creating reports with Eclipse embedded Report Designer for BIRT reports. In my next step, I would like to schedule this reports in such a way:
It will run once per day on a set time.
It will be produced as PDF.
It will be sent by email to a concrete email address.
I am working on Windows. Is it possible to do all of that by running bash script as a scheduled task in Windows Task Scheduler?
Thanks.

You can either do this yourself with the free BIRT runtime or download the free BIRT iHub F-Type server at http://www.actuate.com/resources/product-downloads/.
How to use the BIRT runtime:
Download the BIRT runtime and install it.
http://download.eclipse.org/birt/downloads/#runtime
Test the runtime installation (if you use Windows it will look like the following)
C:\birt\ReportEngine>echo %BIRT_HOME%
C:\birt
C:\birt\ReportEngine>genReport.bat
C:\birt\ReportEngine>ECHO off
Help for ReportRunner
--mode/-m [run|render|runrender] [options] [rptdesign|rptdocument]
The default mode is runrender.
To see options for run mode, use:
--help/-h run
To see options for render mode, use:
--help/-h render
To see options for runrender mode, use:
--help/-h runrender
Print current message, use --help/-h
Test the runtime in console with a job like
C:\birt\ReportEngine>genReport.bat -o test.pdf -f PDF new_report.rptdesign
Create a batch file for your job (the sample you ran earlier).
In Windows Task Scheduler, make a task to run the batch file for your job.
Run your task on demand to make sure it runs correctly.
Windows task scheduler does have a simple email function but you will probably have to find a better program to send the generated file as email. Then add the script to run this program to your batch file. Make sure you read up on how to configure a task for Windows task scheduler correctly.

It sounds like you need a way of
running the a BIRT report, through the BIRT reporting engine,
using scheduler to control execution of the report a on a particular schedule
specifying output format
and specifying how the output should be delivered in the scheduled job.
You could role your own or you could use a Reporting/BI server that already has all of those capabilities. Depending on your other needs, this may be overkill or exactly right. I am using SpagoBI for that exact purpose. SpagoBI supports BIRT as one of the reporting formats and engines. It uses the quartz scheduler, and does support emailing a PDF version of a report to a specific email address (or list). You might also look into iHub or other products.
http://www.spagobi.org/
http://birt.actuate.com/products/birt-ihub
In SpagoBI, you would deploy your BIRT report to the SpagoBI server from SpagoBI Studio. Then, in SpagoBI Server you would setup the parameters on the report document and create a schedule for the report. On the schedule, you would specify the parameters (if other than default), a schedule, output format, and how you want the output stored/sent.

Related

How to make Metabase write scheduled files into STFP instead of E-mails

I use Metabase to generate dashboards and reports. I need to generate files using the scheduler and instead of sending them by e-mail, I need to make them available in SFTP. Do you have any suggestion on how to automate this processes ?
I use PostgreSQL as a database source.
I can also try other open source tools if needed.
I didn't find much information on how to do it yet.

FileMaker Task Automation

I'd like to automate several FileMaker tasks using Windows Task Scheduler. It looks like step scripts are the way to go, but I'm not sure. I'd like to run tasks, say exporting for example, several times per day, but WITHOUT opening the FileMaker GUI. Is that possible? Any tips you have would be great. Thanks.
It's possible to initiate a Filemaker script using a schedule server script with Filemaker Server. However, if the database is not hosted using Filemaker server, or not open using Filemaker Pro (sounds like your situation), then there is no active engine able to actually perform the calculations (script steps, etc). The database has to be running somewhere to initiate and perform any scripts.
If the database is hosted using Filemaker Server then it is pretty easy to setup a scheduled script that will run at a designated time. If you don't have a license of Filemaker Server some Filemaker cloud hosting providers have monthly plans that are relatively cheap ($20/month with unlimited connections), and they'll work with you to setup a scheduled script (for free).
The best way to automate FileMaker tasks is to use FileMaker Server which has scheduled scripts. Of course it is more expensive than standalone version of FileMaker Pro.
If you automate tasks on a local FileMaker file, you can not avoid starting FileMaker and opening the file.
FileMaker has a limited support for VBScript, you can run FileMaker, open file and run a FileMaker Script from VBScript and add that script to Windows Task Scheduler.
This is not preferable way, but if you have no other option, this may be handy.
in Task Scheduler, Create a task
on Action tab, choose
"Start Program"
on the next screen, point to FileMaker Pro exe file, typically it is in C:\Program Files\Filemaker Pro\FileMaker.exe
Add argument:
"fmp://hostName/fileName.fmp12?script=scriptName&param=optionalScriptParameters"
please read more here http://www.filemaker.com/help/12/fmp/en/html/sharing_data.16.7.html about url schema. This will vary depending on whether you are hosting your file on FileMaker Server or opening it locally.
Note: avoid having spaces or special characters in script name.
Save the task. Reopen task properties and save your windows account credentials, so that the task may run without you having to login.
either save FileMaker login credentials upon login (if your FM version allows), or pass credentials through fmp url (as described in the link above), or go to FileMaker file options, and use credentials in "Log in using": (which is not secure and not recommended).
I am using this method to automatically send emails with PDF attachments, since FileMaker server does not let you Export Records as PDF (not until v.16) on server scripts.

How to call SQL Agent Job Wizard from PowerShell?

I need it to automate modification of SQL Server Scheduled jobs and want to reuse functionality of SSMS Scheduled job wizard.
Is it possible to popup SSMS Scheduled job wizard using PowerShell, use it and then close?
Update: I am aware of how to modify jobs using SPs and PS. The wizard is just one step in automated process. The next steps are to read the job settings and generate job script as per company's standard (that is important as out of the box Drop and Create script is not good enough), set encoding of the file etc.
You call a job via integrated MS SQL procedure sp_start_job. You call this SQL via Invoke-SqlCmd.
To modify/create the job you have to use sp_add_job, sp_add_jobstep, sp_update_job and sp_add_jobschedule.

Can Tableau Desktop be automatically refreshed when the database is updated

I'm using Tableau Desktop 9.0 to create a visualization by extracting the data from DB2 database. But this database is updated everyday. That is, at the every time the data in the database changes. So is it possible for me to schedule a task of refreshing the extracted data source automatically at specific interval of time so that, after updating the report should reflect the results accordingly. Can this be done through Tableau Desktop automatically? The main thing is that it can easily be done on Tableau Server as known. But I cannot afford for a Server so I'm trying to get an answer is it possible with the Tableau Desktop or not.
Use the Tableau Data Extract Command-Line Utility in a batch script (like DOS/cmd or PowerShell) and schedule the batch script to run on the Windows Task Scheduler.
Assuming you're using Windows. Use Task Scheduler to schedule (a variation of) the following Powershell script on a daily basis.
C:\Program Files\Tableau\Tableau 9.0\bin>tableau refreshextract--server
https://blah_blah_server_name --username YourServerSignIn --password
YourServerPwd --datasource "Some_Table" --source-username YourDatabaseSignIn
--source-password YourDatabasePassword

Is it possibile to remotely process an SSAS cube throgh script?

I have an SQL Server Analysis Service (SSAS) cube (developed with BIDS 2012) and I would like to give the opportunity to the users (that use cube through PowerPivot) to process the cube in their local machines.
I found some material on how to make a scheduled job on the server through Powershell or SQL Agent or SSIS but no material on remotely process the cube. Any advice?
There are several possibilities to trigger a cube processing. The low level method is issuing an XMLA statement to the database containing the cube. To see how this looks like, open SQL Server Management Studio, connect to the AS instance, right-click on an AS database, and select "Process". Configure the processing settings, but instead of hitting OK, select "Script from the top toolbar to have the XMLA process command be generated for you. Leave the dialog with Cancel.
All methods that process a cube end in some way or the other in sending a command like this to the AS database.
There are several options to trigger a cube processing:
In Management Studio, by clicking OK in the above mentioned dialog.
In PowerShell (see http://technet.microsoft.com/en-us/library/hh510171.aspx).
In Integration Services, there is an Analysis Services processing task (http://msdn.microsoft.com/en-us/library/ms141779.aspx).
You can set up a SQL Server Agent job, job steps could either be a direct XMLA step, or an Integration Services step containing the process task (among possibly other tasks).
The question, however, is how the setups described above can be accessed by end users. An important issue here is of course that the user executing the process task needs to have the permission to process the cube. As you might not want to give this permission directly, it might make sense to use some impersonation on the way of calling it. With Management Studio - and as far as I am aware with PowerShell - this cannot easily be achieved.
Integration services and Agent jobs offer the possibility of impersonations. Integration services packages are executed by the dtexec command line tool (part of the SQL Server client tools), there is also a tool called dtexecui (available as "Execute Package Utility" in a standard SQL Server client tool installation), which lets you use a dialog to configure all settings, and then execute a package, but it also can display the command line for dtexec, according to your settings.
And to call a SQL Server Agent job, an easy interface are the stored procedures (http://msdn.microsoft.com/en-us/library/ms187763.aspx), especially sp_start_job (Note this is asynchronous, you call it, it starts the job and returns. It does not wait for the job to complete before returning.) and sp_help_jobactivity to ask for job status as well as sp_help_jobhistory for details of jobs that were running.
All in all I think there is no final solution available, but I mentioned some building blocks that you could use to code your own solution, depending on the preferences in your environment.