Parameter drop-down list
Post Author: tss98
CA Forum: Crystal Reports
Does anyone know how to create a drop-list for a parameter such that it will only show those records which meet a certain criteria? For example, I am developing a report which prints out a single record (for a permit), but the drop-down list shows all the possible permit numbers and I only want to show those that are related to some certain criteria (like a certain permit type or a certain location or a certain company).
If it is a dynamic parameter then there is no way to get rid of the "..." since Crystal does not know what the values are to populate the parameter list until it is too late.
Similar Messages
-
Crystal Report 2008 with ClearQuest 7.1, parameter drop down list
Hi all,
I am creating the reports using CR 2008 and uploading their design into CQ 7.1.
The issue I have has to do with the dynamic cascading parameters of the report.
When designing everything is working fine. I am able to choose my first param, the project and based on the chosen project, the second param shows related reviews.
The problem is when i upload the design into CQ, the parameter drop down list is not there and instead there is a free form text field.
How do I resolve this issue, any ideas?
Thanks
-PAPHello,
I believe that version of CQ uses the CR RDC ( craxdrt.dll ) to run reports. That engine is legacy and it never supported cascading Parameters.
Talk to CQ on upgrading to the latest .NET report engines. I believe they are working on an updated version.
Only option is to not use cascading parameters until you upgrade.
Thank you
Don -
JSP HTML parameter form to call report - Dependent drop down list
I have a report parameter form developed using HTML & JSP to call oracle reports6i.
First parameter "STATES", Second Parameter "CITY"
I have a master-detail relation betwen STATE & CITY table.
I want the parameter form drop down lists dependant. ie if the user chang STATE value in the first drop down, the second drop down list CITY shoud
change automatically.
Please help
Thanks
VimalVimal,
This is not functionality that's available in the Reports generated parameter form. In order to do this you'll need to build the parameter form yourself as a true HTML form and code the javascript to link the fields.
Hope this helps,
Danny -
Hi,
in my ssrs report i have two parameters, accounts and Manager ,there is a cascading between the accounts parameter and manager parameter, as per the cascading we will get managers names based on the account we selected in the accounts parameter,
my requirement is the first name in the mangers drop down list has to get selected as default value.
please help me with this, it is an urgent requirement.
Thanks in advance,
NaveenHi NaveenMSBI,
According to your description, you want to use cascading parameters in the report, if the accounts are selected when you preview the report, the first manager name will be selected from drop down list as the default value. If so, there can be two scenarios:
• If manager is single-valued parameter, we can get Available Values and Default Values from the same query as below. Then when the accounts are selected, the first manager name will be selected as default value.
SELECT managerName FROM table_name WHERE accounts IN (@accounts)
• If manager is multi-valued parameter, we need to use different query for Available Values and Default Values. In this case, please refer to Patrick’s solution.
For more information about Adding Cascading Parameters, please refer to the following document:
http://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
If you have any questions, please feel free to let me know.
Best Regards,
Wendy Fu -
How to increase the width of the drop down list box in SSRS multi value parameter
Hi,
I am using SSRS 2012. I have a parameter, which accepts multi value.
The width of the drop down list box is very small, and the user need to scroll to the right to view the complete view of the content in the list box. But, if I don't use multi value then the length is good. Kindly suggest how to I increase the width
of the list box when it set to multi value parameter.
Thanks in advance,
Mahalengam ArumugamHi Mahalengam,
After testing the issue in my local environment, I can reproduce it. When the values for a single parameter are too long, the drop-down list of the parameter will automatically enlarge to an appropriate size. While the values for a multiple parameter are
too long, we need to scroll to the right to view the complete view of the content in the list box in SSRS 2008. But in SSRS 2008R2 and SSRS 2012, we can directly drag the black control at the bottom of the list box to control the size.
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Hi Katherine,
Thanks for your reply. I understood we need to drag the list box to a maximum size to view the contents.
But, this seems an additional task, i know this is a limitation in the current version of SSRS and hope it will be resolved in the next versions.
Thanks for your efforts,
Mahalengam Arumugam -
Introduction
There is a scenario that thousands of values in the drop-down of a parameter. Scrolling through the large drop down list is slow and cumbersome. Is there a way that we add a search feature in the report, so that it can filter down the values in the drop
down list to a smaller list of values?
Solution
To achieve this requirement, we can add a parameter with multiple keywords ahead, then all of available values which are begin with the keyword will display in the parameter list. In this scenario, we can create cascading parameters. One is a keyword parameter,
and the other parameter is based on the keyword to display the available values.
In order to enable the user to type multiple keywords, we can use the query below to create a split function which takes the list and the de-limiter as input parameters and splits all the values in the database:
CREATE FUNCTION [dbo].[SplitParameterValues] (@InputString NVARCHAR(max), @SplitChar VARCHAR(5))
RETURNS @ValuesList TABLE
param NVARCHAR(255)
AS
BEGIN
DECLARE @ListValue NVARCHAR(max)
SET @InputString = @InputString + @SplitChar
WHILE @InputString!= @SplitChar
BEGIN
SELECT @ListValue = SUBSTRING(@InputString , 1, (CHARINDEX(@SplitChar, @InputString)-1))
IF (CHARINDEX(@SplitChar, @InputString) + len(@SplitChar))>(LEN(@InputString))
BEGIN
SET @InputString=@SplitChar
END
ELSE
BEGIN
SELECT @InputString = SUBSTRING(@InputString, (CHARINDEX(@SplitChar, @InputString) + len(@SplitChar)) , LEN(@InputString)-(CHARINDEX(@SplitChar, @InputString)+ len(@SplitChar)-1) )
END
INSERT INTO @ValuesList VALUES( @ListValue)
END
RETURN
END
Use the query below create a stored procedure to return all available values for Account parameter:
create PROCEDURE sp (@keyword nvarchar(50))
AS
SELECT AccountDescription
FROM DimAccount d
inner join (SELECT [param] FROM SplitParameterValues (@keyword,',')) s on d.AccountDescription like (s.[param]+'%')
In Report Designer, select Stored Procedure as the Query type for DataSet1, then select or type sp in the drop-down list as below:
By default, there is a parameter named keyword in the Parameters pane.
Add a multi-value parameter named Account in the report, then select “Get values from a query” option for Available Values as below:
Report Design and Report Preview surface
Report Design:
Report Preview:
References:
Create User-defined Functions (Database Engine)
Adding Cascading Parameters (SSRS)
Applies to
Reporting Services 2005
Reporting Services 2008
Reporting Services 2008 R2
Reporting Services 2012
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Hmmm. This didn't work. I even re-booted, and Firefox still doesn't show the search engine.
It was actually an update to an earlier engine, and I foolishly removed the old version rather than just updating it.
Is there anything elsewhere (eg. the registry) that might be preventing this? -
How to use value in a drop-down list box as "With these Values" parameter?
Hello, new user.
I have a drop-down list box on Page 1, upon which the user can choose a study number. The List Box is named "P1_STUDY_NBR".
Then I have a list, one entry of which goes to my master-detail form, which is Page 6. I would like it to go to the study number that the user choose on Page 1.
In my target on the create/edit list entry, I put in "Page in this Application", "Page 6", then in Set these items, I put in
P6_STUDY_NBR
My question is what to use in With these values, where I want the contents of the P1_STUDY_NBR. I tried:
&P1_STUDY_NBR
and that does not work. If I put in one of the study numbers, like 336-00, then it does work, but I want it to pass the study number the user chooses in the list box. How do I refer to the contents of P1_STUDY_NBR?
-MaryYes, that does work, thanks. I'm now getting the default value I was putting in yesterday rather than an error message, so there must be something loading it, but I'll hunt around for what process might be doing that, or try re-creating the master-detail form again.
-
Trying to get Pivot table drop down list to affect bar chart below it
Hi,
In BI Answers I have a pivot table and a bar chart below it. At run time, I can choose a value from the
drop down list for the pivot table, but the bar chart below it doesn't react to the new value chosen
from the pivot table.
Does anyone know a way to get the bar chart to receive new values, permeating down from a table view
pivot table above it on the same report (apart from using prompted filters for the whole report).
Many thanks,
Jakeyou may want to try this...
in you bar chart criteria, set prompted filters of all the dimension fields u want from the pivot table.
in the pivot table, set action links on these dimension columns and loop it back to the current dashboard page.
now, when u click on a value on the pivot table, the dim values of this will be passed as a parameter to the the bar chart filter set and your bar chart will change accordingly...
-sharath -
How to add drop down list for query manager report in sap business one
Hi Every one,
I need drop down list for parameter selection in sap business one Query Manager.I have two Parameters 'Sales Order','Invoice'.
Please suggest.
Thanks and Regards
DEVHi,
you need to use this :
/*select from [dbo].[OINV] T2*/
DECLARE @Invoice varchar(100)
/*where*/
set @Invoice =/* T2.DocNum */N'[%2]'
you can change the tables and the parameter number but you have to write it exactly that way.
when you run the query within the SBO you will get list of objects ( in this case list of invoices)
hope it was helpful
Shachar -
Post Author: snufse
CA Forum: General
We have a report that prints data from a Sales Ticket table. The report has one parameter which is a Shift Start Date/Time. The Shift Start Date/Time is a field in the Sales Ticket table that goes with each Sales Ticket and also a field in a Shift table. When operator closes a shift, the Sales Tickets are updated with the Shift Start Date/Time and a new entry is made into the Shift table.
Now we need to run a sales ticket report that uses the Sales Ticket table and selects by Shift Start Date/time. Is there a way in the parameter entry screen to show user a drop down of all valid Shift Start Date/Time entries from the Shift table, this is the only way user will know what valid shift parameters exist. Now they have to run a shift report, pick the shift from the report and manually key that in as a parameter.
Thank you.Post Author: snufse
CA Forum: General
We are on CR XI product version 11.5.8.826.
I was reading about using a Command Object (connect to your datasource and entering sql command). If this is correct how could I get the result to show in a drop down list and have user select a line and use this as a parameter for creating the report?
Could you pleaseoint me in a direction where I might pick up some tutorial on how to do this. Thank you. -
How to create drop-down list in Portal??
My case: I have three locations A B C(in the database) for example.
I would like to use drop-down list to show list of All, A, B, and C.
After I choose any of them, for example A, it must show all the data of that particular location and if it is All it must show data of all three locations.
By using Simple Parameter, it's just a static one but I prefer the dynamic one that get directly from the database. And I also got a problem of showing all locations by choosing All in my dropdown menu
Any idea??!?
Thank you so much.You could try a dynamic page:<br>
<br>
<html><br>
<body><br>
<br>
<form action="http://host.port/pls/portal/etc." method="get"><br>
<select name="location"><br>
<ORACLE><br>
for rec in (select loc_code, loc_name from locations union select '-1' id, 'All' loc_name from dual)<br>
loop<br>
htp.p('<option value="' || rec.loc_code || '">' || rec.loc_name || '</option>');<br>
end loop;<br>
<ORACLE><br>
</select><br>
</form><br>
<br>
</body><br>
</html><br>
<br>
The form should then call your page with a &location=loc_code in the url. Using a page parameter and a bound variable you can access that. You may need to use a decode in your sql to deal with the All scenario:<br>
<br>
select ..... where loc_code like decode(:location, -1, loc_code, :location)<br>
<br>
Hope this helps.<br>
<br>
Patrick -
Populating Drop down List in Excel Planning Layout
HI!
hopefully somebody can help me.
I have a simple planing function ( copy function: Version1 => Version2 ), Version2 the target version is a BEx Variable and a parameter of the copy planing function.
basicly i want to put a drop down list on a Excel Planing Layout to manipulate the BEx Variable (Version 2 - the target version). So that the user can fill the BEx Variable by selecting the version by the dropdown list.
In BW-BPS is quite simple -but unfortunately i dont know how it works in BW-IP.
Best Regards
Mike
Message was edited by:
Mike KhatibHello Mike,
First you create two Drop Down lists (Dimension Version, Read Mode Masterdata table) in your workbook. Now go to the Visual basic editor (alt+F11) and you will find the following code for each Drop Down list:
Public Sub DROPDOWN_22_LostFocus()
Dim lComboBoxName As String
Dim BEx1 As Object
On Error Resume Next
lComboBoxName = "DROPDOWN_22"
Set BEx1 = Application.Run("BExAnalyzer.xla!GetBEx")
Call BEx1.RaiseComboBoxChange(Parent.Name, lComboBoxName)
End Sub
Comment the last line and add a function to output the chosen value to a cell in the workbook
Public Sub DROPDOWN_22_LostFocus()
Dim lComboBoxName As String
Dim BEx1 As Object
Dim version As String
'Call Dropdown List
On Error Resume Next
lComboBoxName = "DROPDOWN_22"
Set BEx1 = Application.Run("BExAnalyzer.xla!GetBEx")
'Call BEx1.RaiseComboBoxChange(Parent.Name, lComboBoxName)
'get version
version = DROPDOWN_22.Text
'output chosen version to a cell in the workbook
Range("C801").FormulaR1C1 = version
End Sub
Now add a command range to your workbook (VAR_VALUE_1,1, <VERSION>). Thats it.
If you need further information dont hesitate to ask me!
Best regards
Johannes
PS: Please assign points if this information was helpful -
Drop down list in Table Control - Value disappeared after pressing ENTER
Dear Gurus,
I have a problem in one of my development where I used a table control in which one field is a drop down list.
I used VRM_SET_VALUES and VRM_GET_VALUES for populating the values from the programand not use any domain level value table for that field.
My problem is when I select one value from this list , and pressing enter , the value get disappeared. But if I use a domain for this field with value table then everything working properly.
My doubt is am I doing some miss coding or using the VRM_ function modules improperly ?
I am sharing some code with you
in PAI :
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = 'ITAB-FIELD3' "This is drop down list element on screen
IMPORTING
values = values[] " even it is not the expor parameter...it will work..
EXCEPTIONS
id_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
No sy-subrc check required.
ENDIF.
IN PBO
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'IVBAP-ERNAM'
values = values[].
Can you please help me.
Thanks .HI,
The link contains the list box creation, just check if this might help.
Re: Getting values back from a listbox.
Regards and Best wishes. -
Purchase order sample - drop down list populating another drop down list
hello, when i use this sample script, it works fine. but when i add additional arrays to it, it doesn't work at all. please let me know what i need to change in this script in order to add additional items into the drop down lists. here is the script that works (displays 3 options in first drop down list (blank, option, another option)):
// This script object controls the interaction between the carrier and plan Drop-down lists.
// The array contains the carriers and the corresponding plans.
var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
// For each carrier, add a 'new Array(number of plan +1)'.
// Define the carrier and the corresponding plans.
// The array syntax is arrayName[index][index].
// The first index number represents the carrier,
// the second index number is the actual data value.
myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
myCarriers[0][1] = " ";
myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
myCarriers[1][1] = "MC250"; // the rest are plans.
myCarriers[1][2] = "MC2501";
myCarriers[1][3] = "MC5002";
myCarriers[1][4] = "MC5003";
myCarriers[1][5] = "MC1000";
myCarriers[1][6] = "MC2000";
myCarriers[1][7] = "MCHC2300";
myCarriers[1][8] = "MCHC3000";
myCarriers[1][9] = "MC2500";
myCarriers[1][10] = "MB";
myCarriers[1][11] = "P500";
myCarriers[1][12] = "MHH3000";
myCarriers[1][13] = "MHH5000";
myCarriers[2][0] = "BCCA"; // This is a new carrier, see how the first number is now [1].
myCarriers[2][1] = "S Plan";
myCarriers[2][2] = "BPlan";
myCarriers[2][3] = "P40";
myCarriers[2][4] = "P30";
myCarriers[2][5] = "P35*";
myCarriers[2][6] = "P45*";
myCarriers[2][7] = "Ad25*";
myCarriers[2][8] = "Pr20";
myCarriers[2][9] = "Pr10";
myCarriers[2][10] = "PH750*";
myCarriers[2][11] = "PH500*";
myCarriers[2][12] = "2400HD";
myCarriers[2][13] = "3500HD";
myCarriers[2][14] = "2000HD";
myCarriers[2][15] = "LH1500";
myCarriers[2][16] = "LH3000";
// This function will populate the carrier Drop-down List.
// This function is called from the initialize event of the carrier Drop-down List.
function getCarriers(dropdownField)
dropdownField.clearItems();
for (var i=0; i < myCarriers.length; i++)
dropdownField.addItem(myCarriers[i][0]);
// This function will populate the plans Drop-down List for any event EXCEPT the change event.
// This function is called by the initialize event of the plan Drop-down List.
function getPlans(carrierField, dropdownField)
dropdownField.clearItems(); // Clear the items of the Drop-down List.
for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
if(myCarriers[i][0] == carrierField.rawValue) // Check to see if they match.
for (var j=1; j < myCarriers[i].length; j++) // When they match, add the plans to the Drop-down List.
dropdownField.addItem(myCarriers[i][j]);
dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
// This function will populate the plans Drop-down List for the change event.
// This function is called by the change event of the carrier Drop-down List.
// The first parameter is simply a pointer to the xfa object model.
function getPlansOther(myXfa, dropdownField)
dropdownField.clearItems(); // Clear the items of the Drop-down list.
for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
if(myCarriers[i][0] == myXfa.event.newText) // Check to see if they match. Note: we have to use the event.newText in this case because
{ // the chcontinued...
change hasn't been committed yet.
for (var j=1; j < myCarriers[i].length; j++) // When they match, add the states/provinces to the Drop-down List.
dropdownField.addItem(myCarriers[i][j]);
dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
when i try to add 4 more arrays (add items to first drop down list and second drop down list), nothing displays in either drop down lists. please let me know the items that need to be changed - besides these items (i know i need to add arrays and add myCarriers[1][0],[2][0],[3][0] to [6][0] --- for 4 additional items in the first drop down):
var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
// For each carrier, add a 'new Array(number of plan +1)'.
// Define the carrier and the corresponding plans.
// The array syntax is arrayName[index][index].
// The first index number represents the carrier,
// the second index number is the actual data value.
myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
myCarriers[0][1] = " ";
myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
myCarriers[1][1] = "MC250"; // the rest are plans.
myCarriers[1][2] = "MC2501";
myCarriers[1][3] = "MC5002";
any help would be greatly appreciated. thank you! -
Show the drop down list of variant on the selection screen in ALV reports
Hi,
i have a alv report when i execute this display will come and then i click display layout it save as a variant on the selection screen and when i go back to selection screen and press f4 on the display variant its show the drop down list of varient.
can u send me some code for this functionality...its very urgent.
thanks!
VipinHi,
try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
START HERE
PARAMETERS: pa_vari TYPE disvariant-variant.
INITIALIZATION.
g_repid = sy-repid.
CLEAR e_variant.
e_variant-report = sy-cprog.
e_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pa_vari = e_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM alv_variant_f4 CHANGING pa_vari.
*& Form ALV_VARIANT_F4
FORM alv_variant_f4 CHANGING pa_vari.
DATA: l_exit(1) TYPE c.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = e_variant
i_tabname_header = 'ANYTHING'
i_save = 'A'
IMPORTING
e_exit = l_exit
es_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit = space.
pa_vari = e_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
END
Hope iy helps!
Alfonso
Maybe you are looking for
-
ESB/File Adapter - XML files containing multiple messages
Hi, In all the examples on file adapters I read, if files contain multiple messages, it always concerns non-XML files, such as CSV files. In our case, we have an XML file containing multiple messages, which we want to process separately (not in a bat
-
Error while putting message in weblogic queue
Hi Am having a bpel process which connects to weblogic queues using JMS Adapter and places XML content into the queue. I have imported the XSD too while creating the adapter. What i have observed is when i send a bulk of messages to be put in the que
-
My macbook air(2009) model is saying replace battery soon
do i need to send it to apple to get it fixed with a new battery or can i do it all my self (if so how can i do it and how much will it cost to replace and buy the battery) thanks a lot
-
Sending po printout by fax server
hi! i have a very urgent problem, we implemented fax server for sending purchase order printout to the vendor. we used userexit vn00001 for recieving the vax number of the agent. we need to get also the country code and change it to te country code o
-
Hi experts, I would like to make the field "vendor" in transaction MRHR as display only. I have created a screen variant for it in SHD0. I wonder if I need to create a z-tcode to make it effective? If yes, then I need to ask user to use ZMRHR ins