I hope someone knows an easier way than I give below but at least I've found a work around for this though it is far more complicated than I'd wish.
Maybe I need to create a repository in order to run ktr files directly in the PUC, but I would think that it would work right out of the box without
having to build a repository. I instead get the diabolical:
org.pentaho.platform.api.engine.ActionExecutionException: Kettle.ERROR_0004 - The repository specified was not found (null)
So anyway:
Steps for generating and emailing Reports for BISERVER 5.4
This can also be used to apply the path to a subtransformation
executed in biserver. The basis of technique I mostly copied from
Miguel Cunhal, though I had to determine a number of paths on my own.
WARNING: No guarantees on functionality.
This is sort of quick and dirty as I have to get back to work, I just hope
it helps someone.
Note: Replace "reportadmin" directory with whatever name you feel needed.
1. Install RepositorySynchronizer and reboot twice.
2. Synchronize the repository.
---
Server steps
---
3. Enter the ./pentaho-solutions directory.
4. execute: ln -s repositorySynchronizer/public public
5. Create a directory in repositorySynchronizer above named home
6. Create a a directory in repositorySynchronizer/home named reportadmin
---
Developer steps
---
7. Create Kettle transformation using Pentaho Reporting Output as a template.
8. In the step: Create Template and Output paths:
a. Report_Template should = getVariable("Internal.Transformation.Filename.Directory"," ")+"/"+<prpt file>
b. Report_Output should = "./../../pentaho-solutions/home/reportadmin/"+<report name>
(hint: the base directory is biserver-ce/tomcat/bin)
c. Add a Report_Get field to the output of this step.
d. Report_Get should =
"/local/<path to biserver dir>/pentaho-solutions/home/reportadmin/"+<report name>
9. Add an Mail step to the transformation.
10. Use "Report_Get" field as the name of the file to attach.
11. Configure the rest of the Mail step as normal with data fields.
12. Add a Job->Copy Rows to result step. Name this 'output'
13. This is now ready to use in a CDE dashboard.
14. Reminder: If you are creating the report that mails this AFTER this
you'll need to synch the repository before it will work.
---
Scheduling
---
12. Since kettle transforms will not execute in the PUC or Scheduler, this is how
I schedule this.
12a. Here's a twist: You need to edit your Kettle transformation slightly because
OF COURSE quartz uses the tomcat/bin directory as it's base. So go to your transform
and change your Create Template and Output Paths step like so:
Report_Template = "./../../pentaho-solutions/home/reportadmin/"+ "/"+input;
13. Create a generic report in PRD.
14. Go to File->Resources
15. Click on import. Set the Content to text/xml. Name it 'do_emails' or whatever.
16. Make sure you are on the PRD Data Tab for the report (right hand side) and
right click 'Data Sets'. Then select Pentaho Data Integration. I forget if this an advanced
feature, if it is then you need to change the PRD setting to allow for it.
17. Double click on the new datasource, click on the green plus on the left.
18. Name your 'query' whatever.
19. In the file box type: 'do_emails', the box below it should fill up with
the steps in the kettle transformation.
20. Highlight the 'output' step and click OK
21. Save this report as 'gen_email_reports.prpt'.
22. Place this in whatever folder you need to on your BISERVER via Upload
in PUC.
23. Now you can schedule this report to run and it should generate reports
and email them out.
Maybe I need to create a repository in order to run ktr files directly in the PUC, but I would think that it would work right out of the box without
having to build a repository. I instead get the diabolical:
org.pentaho.platform.api.engine.ActionExecutionException: Kettle.ERROR_0004 - The repository specified was not found (null)
So anyway:
Steps for generating and emailing Reports for BISERVER 5.4
This can also be used to apply the path to a subtransformation
executed in biserver. The basis of technique I mostly copied from
Miguel Cunhal, though I had to determine a number of paths on my own.
WARNING: No guarantees on functionality.
This is sort of quick and dirty as I have to get back to work, I just hope
it helps someone.
Note: Replace "reportadmin" directory with whatever name you feel needed.
1. Install RepositorySynchronizer and reboot twice.
2. Synchronize the repository.
---
Server steps
---
3. Enter the ./pentaho-solutions directory.
4. execute: ln -s repositorySynchronizer/public public
5. Create a directory in repositorySynchronizer above named home
6. Create a a directory in repositorySynchronizer/home named reportadmin
---
Developer steps
---
7. Create Kettle transformation using Pentaho Reporting Output as a template.
8. In the step: Create Template and Output paths:
a. Report_Template should = getVariable("Internal.Transformation.Filename.Directory"," ")+"/"+<prpt file>
b. Report_Output should = "./../../pentaho-solutions/home/reportadmin/"+<report name>
(hint: the base directory is biserver-ce/tomcat/bin)
c. Add a Report_Get field to the output of this step.
d. Report_Get should =
"/local/<path to biserver dir>/pentaho-solutions/home/reportadmin/"+<report name>
9. Add an Mail step to the transformation.
10. Use "Report_Get" field as the name of the file to attach.
11. Configure the rest of the Mail step as normal with data fields.
12. Add a Job->Copy Rows to result step. Name this 'output'
13. This is now ready to use in a CDE dashboard.
14. Reminder: If you are creating the report that mails this AFTER this
you'll need to synch the repository before it will work.
---
Scheduling
---
12. Since kettle transforms will not execute in the PUC or Scheduler, this is how
I schedule this.
12a. Here's a twist: You need to edit your Kettle transformation slightly because
OF COURSE quartz uses the tomcat/bin directory as it's base. So go to your transform
and change your Create Template and Output Paths step like so:
Report_Template = "./../../pentaho-solutions/home/reportadmin/"+ "/"+input;
13. Create a generic report in PRD.
14. Go to File->Resources
15. Click on import. Set the Content to text/xml. Name it 'do_emails' or whatever.
16. Make sure you are on the PRD Data Tab for the report (right hand side) and
right click 'Data Sets'. Then select Pentaho Data Integration. I forget if this an advanced
feature, if it is then you need to change the PRD setting to allow for it.
17. Double click on the new datasource, click on the green plus on the left.
18. Name your 'query' whatever.
19. In the file box type: 'do_emails', the box below it should fill up with
the steps in the kettle transformation.
20. Highlight the 'output' step and click OK
21. Save this report as 'gen_email_reports.prpt'.
22. Place this in whatever folder you need to on your BISERVER via Upload
in PUC.
23. Now you can schedule this report to run and it should generate reports
and email them out.