Pentaho Report Use parameter in host name in JDBC Data Source - pentaho

I created a report shown in Pentaho Dashboard.
The Dashboard is implemented on many machines.
So, I must edit JDBC DataSouce in all SubReports in my report to match the hostname to introduce environment. (I am using MySQL)
Can I use a parameter in the hostname in DataSource ex. ${HostName}?
I tried to do that, but then the value wasn't shown in DataSet when I clicked DataSource and clicked SelectQuery.

I solved it myself.
I make report in Pentaho Report Designer with JNDI connection.
I published its report to my BI Server.
I edited these two files.
\biserver-ce\tomcat\conf\context.xml
\biserver-ce\tomcat\webapps\pentaho\WEB-INF\web.xml
Then the report showed data in datasource in context.xml.

Related

Field shows in Pentaho designer but not in OpenERP

I am new to Pentaho (5.01) and Open ERP(7.0) I have an existing report that I have added a field (text), that is a selection in the corresponding module.
In the Pentaho Report Designer Preview the value of the field is correct, however after loading the .prpt into OpenERP the report runs (PDF) and all the other fields are populated correctly except this one.
Is there some setting I am missing in OpenERP that is preventing display of this field? The field value is also correct in the DB (Postgres) table.
The issue was that the pentaho.server.url had been hardwired to an IP address.
In our OpenERP installation we have three servers, production, demo (copy of production) and development, The pentaho.server.url stored as a record in the ir_config_parameter table in the Postgres DB on developmen, has been pointed to the Pentaho report server for production. So even though I was loading the correct .prpt report file on the development system the query was pulling data from the production system which did not have the correct DB data or structure.
I deciphered this by debugging the report activation and calling code in the core.py (community/pentaho_reports) module.

Schema published but not seen in BI Server with jpivot

I created an schema in Schema Workbench and publish with no errors, but when I got in BI Server with the standard user admin, I choose New->jpivot, then it display the name of the schema I created but it does not display the cube. For reference the error I get from catalina.out is:
17:11:45,174 ERROR [PentahoDataSourceResolver] PentahoXmlaServlet.ERROR_0002 - IDatasourceService.UNABLE_TO_INSTANTIATE_OBJECT
org.pentaho.platform.api.data.DBDatasourceServiceException: javax.naming.NameNotFoundException: Name [Esquema Salario] is not bound in this Context. Unable to find [Esquema Salario].
Name [Esquema Salario] is not bound in this Context errors usually appear if you use JNDI name, which is not defined on your system. So, I assumed, that this is the name of the datasource, which you reference while publishing Mondrian schema files to BI server.
Xml file with Mondrian schema definition generated by Schema Workbench does not contain any information regarding how to connect to database. So, you need to specify these details when you upload your schema file on BI server (It's done on step 4 below).
But first you have to create the connection itself (steps 1-2):
Create new JDBC datasource:
Define connection parameters:
If cubes still don't appear after these steps, you may republish your cube: follow same steps as in step 1, but select "Analysis" instead of "JDBC" in the end.
Upload the xml file, generated by schema workbench and select the datasource, which you have created on step 2. .
If cube still does not appear - check your log again. If you see the same Name is not bound error, you may try to restart your BI server application (new connections usually get recongnized immediately, but if you had a connection with same name before, than you might need to restart tomcat).
If that does not work, than once again, check log files. I guess, you'll have some different error in this case.
I had the same problem as the OP (blank screen when clicking New View) with the latest version of Pentaho BI server 7.1 (latest at the moment) and even with the 6.0 version one, Pivot4J SNAPSHOT 1.0 plug in version (latest as of today), Schema Workbech 3.14 (latest as of today).
And as, in line with OP, my catalina.out log was also spitting the Name [DatasourceName] is not bound in this Context. Unable to find [DatasourceName].
After several trials and errors I noticed the problem showed up when I checked the "Register the XMLA Data Source" when publishing the schema on Schema Workbench. So to fix the problem I just unchecked it before publishing.
Another way to fix this is going to the Manage Datasources option on the BI server, Import Analysis, choosing the schema created by Schema Workbench, AND manually setting the data source parameter value EnableXmla to false and saving changes. Now the schema should show up when clicking on Create New > Pivot4J view.

Pentaho CDE how use my database

I'm trying to create a Penaho Dashboard using CDE and I have problems accessing my Data.
I have found tutorials but they always use SampleData or Steel Wheels. I have managed to do that myself, but I need to access my own database.
I was able to connect with my oracle database from the Data Source manager and created my own Data Source. But now I don't know how to access those tables from CDE. If I chose "sql datasource" I see the SampleData datasource and can do queries on it, but not the one I created with my database.
So, once I create a connection with my orcale database, how do I access my tables from CDE?
Thanks
There are two options:
SQL over JDBC: you define the db host, port, name, username and password;
SQL over JNDI: it'll use a registered JNDI from the Pentaho platform.
The JNDI field is an auto-complete field and fills in the various available options. However, if your newly created connection doesn't show up there, don't worry. Just type it in, it'll work.
you have to setup your data-source..
Click on datasources-panel on right corner
Click on sql Queries from the list you have seen on left side.
then click on sql over sqljndi
now here in properties in jndi set your database connection you want to access.
you can-not see the out-put of particular query in CDE for that open the same file in CDA for checking particular query's result(which you can find under files section).

Can't Display different Database

Goal:
Select a specific database named contoseRetailDW based on the list of different database in Peformance Point Dashboard application.
Problem:
The servername is correct but unfortunately a list of different database don't display.
What am I missing in order to display different database
Background info:
I'm using a the role as administrator that is based on windows authenfication. I'm using SharePoint BI enterprize and Windows Server.
I see that you are trying to create a new Data Source in PerformancePoint.
The selection that you have checked in the screenshot is a "Standard Connection". The intent of this is to use an SSAS Multidementional datasource. From your other screenshots it looks like you are just trying to connect to a database engine i.e. A Tabular Datasource.
In PerformancePoint tabular datasources are only compatible with Filters and Scorecards. This is described in an msdn article titled Planning for PerformancePoint data sources

extract raw SQL query from a Crystal Report .rpt file

I've got an .rpt file that I did not write and can find no documentation about. I want to be able to review the SQL that is generated from this report so that I can figure out, well, what data it was pulling and what WHERE clause parameters were used.
I can open it up and see the report layout. But when I select Database|Show SQL Query... the report tries to connect to the data source. The problem is, the data source being used is unknown to me, probably an ODBC connection used by whoever wrote the query. All I can do at that stage is 'Cancel' and I'm back to looking at the report designer.
Am I missing something? Can I get to the SQL query without connecting to the datasource? It seems like viewing the selection criteria shouldn't be dependent on a data connection.
Thanks.
version: Crystal Reports 2008
I know that this is an old thread, but I encountered this same problem. Effectively we used to have a database/application that has since been aquired by an external agency.
Although they now have the database/application they don't have access to crystal reports, so we can't just send them the old report that we used to run. Likewise we can't run it as we don't even have the database set up anywhere.... So instead our plan was just to extract the SQL code generated by the report and forward that on.
We experienced the same problem, but the solution is actually pretty simple.
If you don't have access to the original data source, just create a new 'blank' datasource (such as an ODBC connection). As long as the connection to the datasource works (i.e. it is some kind of valid datasource this it works fine). When running the 'Show SQL' option point the report to this datasource. As long as you don't try to actually run the report (and only show the SQL) the operation wont fail. This worked for our situation anyway. (Crystal Reports 2008)
(I can give more details if it helps in any way.)
It should be possible to find out some details about the existing datasource, by selecting Database > Set Datasource Location... .
As well as enabling you to change the datasource location, this should show you some information about the current datasource, such as which type of datasource is being used, and possibly (dependant on the type of driver) the name of the database. It is likely to be less helpful if (as you surmise) the datasource is ODBC, but if it uses a native driver there may be something useful.
Without the password, I'm not sure how much you can do. It seems "Show SQL Query" requires to report to run first, then generate the SQL plan.
It's not ideal, but you could go to Database > Visual Linking Expert to at least see the tables and how they are joined, and the go to the Record Selection Formula Editor and see what the custom WHERE statements are.
Viewing the SQL of a Command in a Crystal Report File
There are times you have just the report file, but not the associated database structure that the report uses.
This is common when dealing with example reports of functionality you wish to mimic.
This is a workaround ONLY to allow you to see the SQL of a Command that a Crystal Report is based on, when you don't have the underlying database connection that the report is based on.
In essence, the dialog box has to be satisfied before it will show the SQL, so we fool it with a legitimate Data Source, just not one that would work with the SQL that is actually in the SQL Command.
Why does a report use a command? Doesn't Crystal Reports have the ability to link tables?
When a Crystal Report is based on a record set that is too complex for the table linking functionality within Crystal Reports, the report can instead be based on a SQL Query, usually developed/tested in another editor tool and pasted into the command. This allows advanced SQL functions to be utilized.
If you don't already have a Data Source on your computer set up that you can connect to, you will need to build one first.
A simple Microsoft Access .mdb file saved in a simple location will suffice.
I placed mine with the path C:\A_test\test.mdb to make it easy to find.
If you don't have one, google for a sample mdb file and download it, saving it with a name and location you can remember. (You won't ever actually open this file, but just connect to it.)
Once you have the file saved, open the ODBC Administrator and create a New Data Source.
(you can get to the ODBC Administrator quickly from Start > type ODBC in the Search)
On the User DSN tab, click the Add button.
Scroll down the driver list to Microsoft Access Driver (*.mdb), select it and click the Finish button.
In the Data Source Name box, type a name (I used MyTest).
Click the Select Button and select the mdb file you saved from a previous step, click OK.
Click OK again. You will see your new Data Source listed by the name you gave it. Click OK.
You now have the data source you will need for the next steps.
Open the Crystal Report you want to see the SQL command for, and click on Database Expert button or Database>Database Expert Menu.
Under Selected Tables, right click on the Command and choose View Command
The Data Source Selection Box appears. Select the Data Source you created (or one you already use) and click the Finish button. The View Command box should open with the SQL in the left pane. Copy the SQL into your favorite text editor.
Whats happening is that the crystal reports needs a database to connect to regardless if its the original source DB or not.
Create a local database or use a database stored on a server, added it to your ODBC Datasources and use it when connecting. After a successful connection you should be able to view the SQL query without an error.