Specified query not executable here - pentaho reporting - pentaho

So I've designed a report in Pentaho Report Designer 3.9 and previewed it and ran it on my machine and everything works fine.
I have an input paramater that is a dropdown list and gets its values from a query called Vertical-List.
Now the drop down works on my machine. However, when I publish the report to the Online interface and try to access it, I get a message that says "The Specified query 'Vertical-List' is not executable here". I don't know what that means and what to do. It worked this morning and suddenly it stopped working.
Please help a brother out.
here is the query that generates the drop down
SELECT
`verticals`.`vertical_id`,
`verticals`.`vertical_name`
FROM
`verticals`

Double check your datasource and query, especially the parameters. If you have parameters, remember that a parameter is read in the Pentaho Report Designer as ${parameter_name}.
Also double check that you have defined the datasource in your BI Server.

Related

SSRS Deployed Report Not Executing WHERE clause

I have an SSRS report that works perfectly in Visual Studio 2017.
But when I deploy it, the deployed report comes back with all the data, ignoring the filters in the WHERE clause. I know it's this because when I remove the WHERE clause from my Visual Studio report, the data matches the deployed report.
This report pings off a shared data source; the dataset is not a shared.
Even a simple WHERE tbl.flag = 'Y' does not seem to do anything to the deployed report.
Why is SSRS not recognizing the entire SQL?
Not really an expert in SSRS, I just make them based off some YT tutorials and deploy them to the link that was given to me, so any advice or links for research are appreciated.
Check the server setting in the report project properties in Visual Studio.
If they look OK then delete the server copy of the report and redeploy.
If the report does not reappear then that proves that the report is either
a. not being deployed (you should see an error in the visual studio output window), or
b. it's being deployed to where you think it should be.
From the web portal you can search for a report by name and it will search all folders on the server so if it did deploy OK, you could find it that way.
I have discovered the issues was some inline comments I had in the SQL. I had some comments above the WHERE clause using dashes, --, explaining the filter. Once I removed it, the report executed correctly.
I was also able to change the comment style to the /* <my comment> */ and it executed correctly. It seems that other style of comments with dashes made the server think everything afterwards was a comment, and therefore not executed.

Conversion error in Visual Studio not showing data types

I'm running into an issue when trying to view a report I set up in visual studio. The report is throwing a conversion error (which I'm familiar with), but it's not showing any information about that conversion error. see screen shot below (I guess I can't embed the image, so please see link). This is running a stored procedure I set up in SSMS, and in that stored procedure everything works just fine. There are three queries and a stupidly simple export with 4 fields. All of the individual queries work just fine.
The conversion error appears to be involving a parameter I set up in the report. This parameter labeled 'performance' is varchar(30) and only interacts with other varchar(30) data types. I literally only compare it to a single field that is of the exact same data type, and do not use the parameter for any other purpose. The reason I say I believe this is the issue is because when previewing the report in visual studio, I can enter a performance name with single quotes around it, and the error doesn't appear (although this isn't helpful because it passes along the single quotes and therefor messes up the match).
I run visual studio and SSMS through a hosted platform, so every angle of this is interacting with a remote server and remote applications. Nothing is stored in house.
Any help here would be much appreciated! I've already discussed this with the company hosting our applications, but without knowing whether or not this issue is server-side or on my end, they're unwilling to assist.

Failed to retrieve data from the database, Database Vendor Code 9421

I have a report made in Crystal Reports XI. The report is generated and exported to PDF in visual basic script using COM interface. Generally everything is running smoothly, but in one case generation breaks with error:
Failed to retrieve data from the database. Details: [Database Vendor Code 9421]
Database used is MSSQL 2005 connected over ODBC to CR XI. When I am opening report with exactly the same parameters in Designer, everything works fine.
It looks like it is data related, but it is hard to trace since the whole report is pretty sophisticated. Anyway I spent half a day on crawling over Dr. Google and it seems that he has no clue what might be an issue.
When you previewed the report in Crystal Reports Developer, did you look at the whole thing? Some custom formulae are not calculated until you actually look at the page.
Try scrolling through the entire report top to bottom. If your error message pops up halfway through and Crystal refuses to preview the rest of the report, then there's probably some anomaly in your datasource that is tripping up a custom Formula in your Crystal Report.

Reporting Services: Exported to Excel results are different than the ones viewed on IE

I'm having this problem:
The SQL Server holds a said value, let's say 990.30, the Reporting Services Report show a different value (948.33) when viewed online, in the brower and a third value (912.22) when the report is exported to Excel.
There are no formulas on Excel, just plain values.
Also, there's no formula on the layout of the report.
The code shows only a simple select that, when run on the SQL Server Management Studio, returns me the original value (990.30).
How on earth shall I start to troubleshoot this ?
I've never heard of this kind of problem before. I would recommend submitting a ticket to Microsoft and provide them with screen shots of the errors, the RDL file, a sample output of the stored procedure, etc.
To troubleshoot this on your own, I would recommend creating a new report that just has a simple table that returns all the details from your stored procedure or query to validate the values are consisten across all interfaces. From there, just start adding on complexity until you get the report to look like it is today.

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.