How to connect to Sp from Tableau? - tableau-api

I have SP's written in SQL server. When i connect to Tableau I have to use these SPs. How to pass values to SP in tableau?
Any help about this concern is appreciated.

http://onlinehelp.tableau.com/current/pro/desktop/en-us/connect_basic_stored_procedures.html
Basically, you add the stored procedure into the data source and then you create parameters in tableau and use them to execute the stored procedure.
From the left pane, drag the procedure to the canvas or double-click
one of the listed procedures. If parameters are available in the
procedure, the Parameters dialog box automatically displays. Instead
of entering a value, you can use an existing Tableau parameter, or
create a new Tableau parameter for the value:
If you then expose the Tableau parameter in the view, users are able
to change the value of the parameter in the procedure interactively.

Related

How do I format the script stored in information_schema.routines

We have an internal resource used by our developers and support to help identify data issues when we are diagnosing problems in our system. It's used to support a collection of data feeds and they are very customized. What we would like to do is allow one of our users to click the name of a stored procedure and then view the CREATE script of that stored procedure. This is done on an ASP.NET form.
I can get this information by using this statement:
select object_definition(object_id(routine_name))
from information_schema.routines
where routine_name like '%sprocname%'
However, the returned script is unformatted and in a single cell, on a single line. Is there a way for me to format this as if I had right-clicked on the stored procedure in SSMS and select "Script stored procedure as CREATE to"? Because it is all on a single line, if I have commented any portion of the procedure out using two dashes it comments the entire rest of the procedure that follows it.

SQL Developer - automatically refresh a query

Is there a way to automatically refresh my own query in Oracle SQL Developer?
Something like Tools/Monitor Sessions.../Refresh but for any provided query.
Yes, turn your query into a user defined report.
You can right-click on your query result grid in the worksheet -
Then if you want a new one, i'd just keep the one and edit the report properties for your new query.
Doesn't have to be a grid either - you can have a report of type script. Or use charts. Or a lot more.

Get List of Values (LOV) from sql query in JasperReport

In Oracle Reports I am able to run reports which get parameters by querying from database. In PHP/mySQL I am able to populate data in HTML dropdown menu by using sql query.
I would like to do the same in my JasperReports, either using JasperReport Studio or using JasperReport Server input controls. The current LOV I am able to get using JReport 'Input Controls' makes me enter options manually.
This is what I am trying to explain in words:
You can do this with an Input Control in JasperServer. When in the Create Input Control page of the wizard choose a Type of Single-select Query. This will enable you to enter a SQL query so you can provide a list of options from the database.
There is also a Multi-select Query alternative.

Using Select query, nothing merges onto Crystal report

I have a Crystal template that I am modifying in developer because we are changing the datasource from an Access file to our Oracle DB. I created a database field that accurately connects to Oracle and added a select statement that because pulls a field from a particular table
select s.field from table s;
On the right hand side, under database fields, I see my command and can right click and browse the data, which right now returns two values.
I also made a formula field using an Azalea barcode function that calls the values (I think, this is where stuff is going wrong, I guess)
The formula field is
BarcodeC39ASCII({Command.field})
So this should take the data and format it into the barcode, except when I use print preview or print out the report, no data is merged.
I've tested this by creating a new formula field with just the Command.field, and still no data is merged. I imagine there is something really obvious that I am missing and would appreciate any input.
So unless I misunderstood your question, you are changing your datasource from Access DB to Oracle DB, correct? Assuming that the database structure remains the same then all you should need to do is go into Database -> Set Datasource Location and set the datasource location from the Access DB to the Oracle DB and your existing report should work as it did. You might have to map some fields, but that should be the extend of it. Is that what you are trying to do?
Chris

Jasperreport parameter selection from SQL query

I wanted to create a JasperReport which asks the user for a deliverer before it creates a report with data of the last the deliveries of the selected deliverer.
The problem, how I can do that? I found only examples where a parameter is created and the ArrayList is filled statically. But in my parameter I need the query result over the table of deliverers filled.
Can anybody tell me a possible solution?
I'm using Jaspersoft Server 5.1 which directly access a PostgreSQL database which has a datawarehouse structur. So it's not possible to use Java code.
Here is the documentation for adding input controls to reports in JasperReports Server:
http://community.jaspersoft.com/documentation/jasperreports-server-user-guide/adding-input-controls
Scroll down to the section that deals with query-based input controls. Your input control will have a name, such as deliverer. In your report, you must add deliverer as a parameter and reference it in your query, as you have done in your comment.