Map parameters to the query in oracle reports - oraclereports

I have created two bind date parameters in oracle reports on top of that I have created 3 more general parameters but I am unable to map those parameters to the query.
Please help me how to map the parameters(other than bind parameters).

as i have understood your question is that you want to know how to include the parameters you have made into the query. for this just write as below ..suppose your parameter name is p_from_date. now u want to query the value where there the value is equal to your parameter. then it could be written as
where effective_date=:p_from_date.

Related

Using a parameter as a filter - Multiple values not working

The report works for just 1 choice, but when I add more than one, it does not return anything ( no errors, just nothing in the report).
My SQL statement includes the parameter #Region
where Region_Name IN (#Region)
In the Region parameter's properties, I set to allow multiple values.
in the dataset filter's properties:
Expression: =Fields!Region.Value
Operator: IN
Value: =Parameters!Region.Value(0)
*EDIT
I removed the dataset filter as suggested.
Below are the properties for the parameter.
The available values come from another data set that is a distinct list of regions.
Your edit makes a lot more sense. To use multivalue parameters you just need to reference the parameter in the usual way, except use in within the SQL:
select cols
from table
where specificcol in #Region
And then don't have a dataset filter set, just make sure there is a reference to the Region parameter in the Parameters property page. The filtering of the data is handled by the inclusion of the parameter in the SQL, so you don't need to also have a filter on the SSRS dataset.
Instead of using a parameter to go back and forth between the stored procedure and the report, I created the parameter and used it in the tablix properties.
Expression: =Fields!Region.Value
Operator: IN
Value: =Parameters!Region.Value
When you first create the value, it adds a (0) to the end of the expression. Remove that and it works as expected.
Thank you #iamdave for the help!
EDIT:
I came back to this and was able to filter using the parameter and stored procedure.
I followed a link from a question to here: http://www.codeulike.com/2012/03/ssrs-multi-value-parameters-with-less.html
I created a dataset parameter and removed the one from the tablix properties. Then created the function provided and it worked. I did not mess with the "ALL" features in the post.
Thanks for all the tips. Brent

Passing multiple values using URL to a drop down parameter in SSRS

I am trying to pass multiple values for a parameter in ssrs which is delimited by ','.Limiting the result data set using where condition using split function in stored proc, this gives me results of my report data set
WHERE YEAR(a.month_start_date)IN (SELECT Value FROM dbo.FnSplit(#year,','))
--AND datename(month,month_start_date) IN (SELECT Value FROM dbo.FnSplit(#month,','))
AND b1.branch_cd IN (SELECT Value FROM dbo.FnSplit(#branch,','))
I created a data set to get available values for year filter
Configured the parameter to get available values from my filter data set and also checked option to "Allow multiple values"
Select distinct year(month_start_date) as Year
From [DB].[dbo].[table]
Then I also limited my report data set to accept parameters with following condition.I configured parameter to accept the following value
=Join(Parameters!year.Value,",")
I pass in values in url
http://<servername>/ReportServer/Pages/ReportViewer.aspx?<reportname>rs:Command=Render&year=2012,2013,2014
My filter does not select the values passed thru the url. The report only shows me the list of values in drop down but does not select the values parsed thru url
I am not sure if I am missing anything else. Please suggest.
Thanks!
The issue here is that your URL is constructed incorrectly. You are trying to pass througth the years as a single parameter and that isn't how it works. Pass it through as a whole heap of parameters and then let the reporting server put it together and put it into the SQL.
Your URL should look like this (I changed the : to %3a and broke up the year parameter)
http://<servername>/ReportServer/Pages/ReportViewer.aspx?<reportname>rs%3aCommand=Render&year=2012&year=2013&year=2014
I hope this helps someone out.

How to passing date parameter using pentaho designer?

I have problem how to passing parameter date field database in report.
I have set the parameter like this :- X.createDate= ${datetim} in MySql.
I have also put the parameter setting in pentaho designer. When i run the report. the result not appear.
Below is Screenshot for parameter setting in report:-
Anybody know about this?.
You set a query on the parameter. If a parameter has a query, the query's results will be used as validation source. Any provided parameter value will be checked and only accepted if it is found in that result-set.
First: Mark the parameter as mandatory, so that you get informed if the reporting engine considers your parameter invalid.
Second: the date-picker does not actually indicate which values are valid or not. So if you indeed only want to select parameters based on the available dates in the database, I would recommend to NOT use the date-picker. Use a drop-down menu instead.

DataSet query with Parameters does not work in Report Builder

The following picture shows the query and its result with no variables:
The next one shows the same query with a variable and a different result:
This how the parameter was set just before the query execution:
I have also tried setting the parameter without '' but it produces the same result.
Any clue about what's going on? Any help would be greatly appreciated.
NOTE: The DBMS is MySql
This weird issue is due to the fact that SSRS is connected to MySQL by ODBC connector; therefore, the query parameters should be defined as ? and their names are Parameter1, Parameter2, etc... in order of appearance
Source: http://www.tek-tips.com/viewthread.cfm?qid=1354185
In Report Builder 3.0 you can user parameters in a dataset query using the following syntax:
WHERE sql_column_name = (#Parameter_name_in_ReportBuilder)
Example:
SELECT * from [dbName].[dbo].[TableName]
WHERE Account=(#Parameter1)
Before you can run the report, you need to configure a paramter named Parameter1 (in this example, change this to the name of your parameter) in Dataset Properties - Parameters. The value field should be set to one of the parameters

SSRS Model query - how to pass in a parameter?

I have a report based on Report Model and for creating dataset I use the query designer (as there is no real other way). However I am struggling with how to pass a report parameter to the query to use it as a filter. Anything starting with # is considered as a syntax error...
Is there a way?
Thank you in advance.
The trick is in the Filter definition to specify the property as a 'prompt'. This will eventually create a parameter for which you then can map the value from the report parameters.