How to call stored procedure in pentaho reporting designer? - pentaho

I am new to learn pentaho reporting tool,
Can anyone tell me how to call stored procedure in pentaho report designer.
In Report designer we have not seen the directly stored procedure .
How will i find out and call stored procedure in report designer ?

If your database is MS SQL server, convert your Store Procedure to Function with table as its result.

if your db is postgres then you can simply write following query:
Select * from As ( ,....);
Here is the columns that you need in report.

CALL SCHEMA.STORED_PROCEDURE (Parameters you wish to pass in)
CALL SCHEMA.STORED_PROCEDURE (Param1, Param2, Param3)
This is with a db2 database but syntax similar for others.

Related

Create dynamic report in Access 2003 from SQL Stored Procedure

I have to create a report in MS Access 2003 that shows data from sql stored procedure. Stored procedure returns data in table matrix. This report will create columns at the run time as column names are not predefined. How can I
Call this stored procedure from the MS Access report?
Create columns in the report at run time?
Thank you.
Create a Pass-Through query that calls the SP, and use that as record source for the report.
The usual way is to create enough columns in the report, and then show/hide them as you need (.Visible property).

Sql Azure Getting Data From Stored Procedures With IN C# MVC

I am new to sql server azure.Basically i Need to execute a stored procedure with the parameters which will return the data. I want to know how can i get that data in View Model.Its gives me the message "Child evalution not allowed".I have gone through external tables.
Any help would be appreciated.

Stored procedure in MDX

It is possible to create stored procedure in MDX (Microsoft Analysis Serwer) the same like in MS SQL? I created simply query in MDX and now I would like to use this query to build stored procedure.
I don't believe there are stored procedures as such.
What we use is this project compiled into SQL Server:
https://olapextensions.codeplex.com/
There is no stored procedure in MDX.

From a Query Window, can a Stored Procedure be opened into another Query Window?

Is there command inside a Query Window that will open a stored procedure in another Query Window?
i.e.
MODIFY dbo.pCreateGarnishmentForEmployee
I am using SQL Server management Studio 2005 and Red Gate's SQL Prompt.
Currently I have to do the follwowing multiple steps:
Open Object Explorer
Navigate Programmability | Stored Procedure
Right Click the Stored Procedure name
Select Modify
A Query Window will open up with the ALTER PROCEDURE.
As I mentioned above, what I would like to do is from a Query Window type
in something to the effect of
MODIFY dbo.pCreateGarnishmentForEmployee
You are trying to mix two technologies here.
SQL and SQLSyntax
The SQL Management Tool
It is probably not possible to use TSQL to manipulate the Management Studio, which is what you appear to want. I suspect cut and paste is your only option.
I think that the only way that I'm aware of that produces an outcome similar to what you're asking for is running sp_helptext against your stored procedure name
sp_helptext 'dbo.pCreateGarnishmentForEmployee'
which will output the text as a resultset. Then click on the column header and copy/paste the resultset into the query window. You'll also need to change the
CREATE PROCEDURE ...
to
ALTER PROCEDURE ...
This method does not always produce the nicely formatted layout of your stored procedure however, so bear this in mind.
There is a way to do this from the command line (i.e., from outside of SSMS).
It requires that you save your stored procedure text (as in, click "save", not execute). Here's an example:
Ssms "C:\...\SQL Server Management Studio Projects\mySolution\myProject\myScript.sql"
See the article on MSDN for more detailed info: http://msdn.microsoft.com/en-us/library/ms162825.aspx

How To use a stored procedure in a crystal reports 8.5?

I have to make a new report using crystal report8.5 .
I have created a stored procedure in SQL Server 2005. The stored procedure has one input parameter.
Now I wanna to know that how I can add that stored procedure and show its result in my report
while designing that report?
thank you
First go to File > Options > Database (going from memory) and make sure the checkbox for Stored Procedures is ticked. Then, when you setup your connection to SQL Server, as well as a Tables section you'll see a Stored Procedures one beneath it. Find your stored procedure in the list, add it as the data source for your report, and you'll be able to use it as a normal source.