Passing and Parsing Multiple values for 1 Parameter using ASP and reportInterface.ReportParameters
Post Author: ckwizard77
CA Forum: Crystal Reports
HELP!!
I have been knocking my head against a wall trying to figure out how to pass multiple values to 1 parameter and how to add it to the parameter collection. I have code so if I pass single values for each parameter it works fine. I am passing the parmeters and values in a pipe delimited string through a url where it gets parsed and pass in here.
Any help would be greatly appreciated.
Here is the single param code:
Public Sub SetParamValues(ReportName, strParamName, ParamValue) Dim i,reportInterface, ParamName,strSubReprotName,CurrentValues Set reportInterface = reportObject.PluginInterface("") Set reportParameters = result.Item(1).PluginInterface("Report").ReportParameters For i=1 to reportParameters.Count if ReportName <>"" then strSubReprotName=reportInterface.ReportParameters.Item(i).ReportName if strSubReprotName=ReportName then ParamName = reportInterface.ReportParameters.Item(i).ParameterName if ucase(ParamName)=Ucase(strParamName) then Set CurrentValues = reportInterface.ReportParameters.Item(i).CurrentValues CurrentValues.Clear() Dim newSingleParameter Set newSingleParameter = ReportInterface.ReportParameters.Item(i).CreateSingleValue newSingleParameter.Value = ParamValue reportInterface.ReportParameters.Item(i).CurrentValues.Add newSingleParameter reportInterface.ReportParameters.Item(i).PromptOnDemandViewing=false iStore.Commit result End if End if Else ParamName = reportInterface.ReportParameters.Item(i).ParameterName Set param1 = reportInterface.ReportParameters.Item(i) if Ucase(ParamName)=UCase(strParamName) then Set CurrentValues = reportInterface.ReportParameters.Item(i).CurrentValues CurrentValues.Clear() Set newSingleParameter = ReportInterface.ReportParameters.Item(i).CreateSingleValue newSingleParameter.Value = ParamValue reportInterface.ReportParameters.Item(i).CurrentValues.Add newSingleParameter reportInterface.ReportParameters.Item(i).PromptOnDemandViewing=false iStore.Commit result End if End if NextEnd Sub
That Makes sense.
thanks a lot !
Well now are at it, mind if I ask you another quick question:
If I make an option in the multiselect list called ALL which should return all the results:
as should act like this
select * from dept;
you solution was:
select * from dept
where INSTR(':'||:P1_EMPNO||':', ':'||empno ||':') > 0
Can I modify this to return all the rows ?
Similar Messages
-
How to passing multiple values for a parameter of discoverer(url parameters
Hi All,
I am trying to pass multiple values for a parameter of disco report. I am trying to include my url for discoverer viewer report. the values has the following
'jeff,mark'
'sfophiee,angela'
Thanks and Regards
VenkatHello Venkat,
I know there are some problems with 10.1.2.0.2, maybe if you haven't done yet you can try with 10.1.2.2, assuming this version should be working for multiple parameter values :
OracleAS Discoverer 10.1.2.2 is installed with the following patch :
Patch 4960210 PLACEHOLDER BUG FOR AS/DS 10G R2 PATCH SET 2 10.1.2.2
So, once installed you can try adding your parameter as param_<parameter_name>='sfophiee,angela'
Hope this helps, otherwise feel free to log a Service Request to Support.
Best Regards,
Gianluca -
Create URL with multiple values for one parameter
Post Author: cbamberg
CA Forum: General
While I have no problems to create the URL to open a report with a single value for a parameter from my Java application, I don't know how to format multiple values for a parameter when I want to pass the "&prompt0=" value. The values I want to pass are numbers, not strings.
Anyone can help?Hi gayatri,
you need to select both the product id and custname.put a count on the prodid column and write a condition of count>1 and apply it.
Thanks
Hari -
Multiple values for the Parameter
1. Had any tried the selecting MULTIPLE values for the parameter in Oracle Discoverer Plus Releae 4.1 Version 4.1.37.00.0. If so can please let me know how to implement it.
2. In a Page-Detail Cross Tab workbook, I have to show the weighted average instead of the avg or sum. Any inputs please.
3. I have to compare two periods (TOP) of datapoints. Any inputs please.If you wanted to eliminate the need for users to type in the parameter values, you could create a LOV on the desired column. This will produce a distinct list of all valid values where the user would simply select as the wish. Of course you still need to check the "let user enter multiple values" checkbox if you want them to select more than one.
-DG -
Running report from command line with multiple value for same parameter
Hey,
I know how to run a report from the command line specifying parameters values each time but I was wondering if someone could tell me how I would go about running the same report multiple times in a batch program but specifying a list of values to pass to a parameter each time.
So for example if a parameter was 'School Number', how could I run a report in a batch program that would pass a school number to the report as a parameter using a list of school numbers generated for a sql statement or something. So if I had 300 school numbers in my list then I would get 300 different reports when the batch program finished.
This leads me to another question. How can I dynamically change the name of the report generated by the batch to use the school number value passed in, so for example if the value 3 was passed in the name would be something like School 3.pdf, if 4 was passed in the name would be School 4.pdf....etc
Any help on this?
ThanksHello,
Bursting and Distribution may help you ....
37 Bursting and Distributing a Report
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_dist.htm
Regards -
Passing multiple values to a parameter in report
Can anyone help me how to pass multiple parameters to a parameter in my report.
As user is able to select multiple values from list of values , can I pass the selected values to calling function.
Suppose if User selects Value1,Value2,Value3 from list of values of a parameter P_Org,
I need to pass all these values to parameter P_Org in my Before Trigger Function in Discoverer reproting tool.
Thanks in advanceI have a Before trigger Function to which the parameters will be passed.
Suppose if User selects multiple values for a parameter then how to pass these multiple Values to that parameter?
eg:In first Workbook Before Trigger is fired and the paramters for the trigger are
'par1','par2','par3' etc.
If User selects multiple values for a parameter 'par1' from the list of values displayed then how to pass all these values to 'par1' in Function?
After firing the trigger rows are inserted in a temp_table .My second Workbook will
fetch the rows inserted in this Temp Table.
I hope u understood what my requirement is...
Thanks in advance -
Any way to pass Multiple Values for a single Label in the Parameter?
I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter.
PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
QUESTION:
Any way to pass Multiple Values for a single Label in the Parameter?
I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
it correct.
I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
Note: We are using Report Builder 3.0Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
Try creating either a function or stored procedure using the code below (compliments to
http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string:
CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
BEGIN
DECLARE @SeparatorPosition INT
DECLARE @ArrayValue VARCHAR(1000)
SET @Array = @Array + @Separator
WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
BEGIN
SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
END
RETURN
END
Once created you can do things like this:
SELECT * FROM Parse('John,Bill,David,Thomas', ',')
SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
This is what your SQL query would probably look like:
SELECT OperationID, OperationName FROM dbo.Operations
WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value. -
- I have a Product list box (asp.net) used as multiple selected values for a parameter.
- The Product ID is defined in the Oracle procedure as NUMBER data type.
- In my crystal report, I have a parameter field allow multiple values as p_product_id type as Number. This is the code in my Record Selection Formula for the report:
({?p_product_id}[1] = -1 OR {Procedure_name.product_id} in {p_product_id})
- In C#, this is my code
List<decimal?> productUnit = new List<decimal?>();
int counter = 0;
decimal prod;
for (int i = 0; i < lstProducts.Items.Count; i++)
if (lstProducts.Items[i].Selected)
if (decimal.TryParse(lstProduct.Items[i].Value, out prod))
productUnit.Add((decimal?)prod);
counter++;
if (counter == 0)
productUnit.Add(-1);
ReportingDAO rDataFactory = new ReportingDAO();
retVal = rDataFactory.GetProductReport(productUnit);
public CrystalDecisions.CrystalReports.Engine.ReportDocument GetProductReport(List<decimal?> productUnit)
CrystalDecisions.CrystalReports.Engine.ReportDocument retVal = new rptProductDownload();
ReportLogon rptLog = new ReportLogon();
rptLog.Logon(retVal, "RPT_PRODUCT_DOWNLOAD");
retVal.SetParameterValue("p_product_id", productUnit);
I keep having the "Value does not fall within the expected range" when I debug. My question is, is the data type I used for procedure/Crystal report/ and C# correct ? I always have problem with the data type. Any help would be
appreciated
Thank youHi progGirl,
Thank you for your post, but Microsoft doesn't provide support for CrystalReport now. Please post your question in SAP official site here:
http://forums.sdn.sap.com/forum.jspa?forumID=313
Thank you for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
I need to pass null as a default value for a parameter in Before Trigger
Hi All,
I am using Before trigger function in calculation tab which has some set of parameters.So, I accept some parameters which are passed to this Before Trigger function and need these parameters default value as null.
To be clear I want to set the Default value for a parameter in workbook to be NULL and pass the same to the calling Function.
please help me.
Thanks in advanceHi All,
I am using Before trigger function in calculation tab which has some set of parameters.So, I accept some parameters which are passed to this Before Trigger function and need these parameters default value as null.
To be clear I want to set the Default value for a parameter in workbook to be NULL and pass the same to the calling Function.
please help me.
Thanks in advance -
Passing multiple values for a single field in URL to call sap Transaction
Hi All,
I need to pass multiple values for a single field to SAP transaction .
means if i have say a field "Date" which can contain more than one value, <b>but its not a range which has two fields</b> . How is it possible.
Let me know pls.
Regards,
Sirisha.R.S.Hi Satyajit,
I need to call a transaction with multiple values which gives me the report based on those values.
So I need to pass multiple values for a single parameter.
I hope u got it.
Regards,
Sirisha.R.S. -
How to pass more than one value for one column in procedure
hi
select id, name from col_tab where dept_name in ('ECE','CIVIL');
when i was running this it is working well.
CREATE OR REPLACE PACKAGE pack_str
AS
TYPE type_refcur IS REF CURSOR;
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
END pack_str;
CREATE OR REPLACE PACKAGE BODY pack_str
AS
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
IS
BEGIN
OPEN ans FOR
select id,name from col_tab where dept_name in char_in ;
END str;
END pack_str;
the package was created.
my doubt is
1.how to pass more than one value for char_in (e.g ('ECE','CIVIL'))
2. when i was storing the value in string like val = 'ECE,CIVIL' ,
how to get the id,name for ECE and CIVIL.
plz help meHi Rebekh ,
I am recreating your packages for the desired output.
CREATE OR REPLACE PACKAGE pack_str
AS
TYPE type_refcur IS REF CURSOR;
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur);
END pack_str;
CREATE OR REPLACE PACKAGE BODY pack_str
AS
PROCEDURE str(char_in VARCHAR2,ans OUT type_refcur)
IS
lv_t varchar2(200);
BEGIN
lv_t := REPLACE(char_in,',',''',''');
lv_t := 'select id,name from col_tab where dept_name in (''' || lv_t || ''')' ;
OPEN ans FOR lv_t;
END str;
END pack_str;
Note:-
Input Parameter char_in is a comma seperated value for dept_name
-Debamalya -
Multiple choose for one parameter
Hi, does Oracle Report support the multiple choose for one parameter? i used a IN statement inside my WHERE conditions as following
Select ....
where ....
content.style IN (:p_style)
(content.style is a column in table "content", and "p_style" is a bind variable)
i want user can have multiple choises on p_style value. but in the parameter form i only can make one choise. Does any one know how to do the multi choise from parameter form? if you do, please help me. Thank you very much.
Li<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by whl:
Hi, does Oracle Report support the multiple choose for one parameter? i used a IN statement inside my WHERE conditions as following
Select ....
where ....
content.style IN (:p_style)
(content.style is a column in table "content", and "p_style" is a bind variable)
i want user can have multiple choises on p_style value. but in the parameter form i only can make one choise. Does any one know how to do the multi choise from parameter form? if you do, please help me. Thank you very much.
Li<HR></BLOCKQUOTE>
you can do that by flowing the stap
at first you will write a select statement
select ...
From ...
where Style (colomn name) = &style1
then you create a user parameter soupose wich name is P_style and which valus is x, y, and z you should enter another value soupose that name is 'All' (All means x + y + Z)
then you write in after parameter form trigger...
IF :P_style = 'All' then
:style1 := null;
Else :style1 := 'and style (style means your column name) = :P_style;
end if;
null -
Multiple values for Time Characteristics (Ex: 0CALMONTH) in planning layout
Hello,
We are on BW - BPS 3.5v
We have a realtime infocube with only time characteristic 0CALMONTH.
There is a requirement that in my Planning layout I have to display the Keyfigures for:
(CURRENT MONTH) (CUMULATIVE 4 MONTHS FROM CURRENT MONTH) (CUMULATIVE 7 MONTHS FROM CUR MONTH)
I defined 3 exit variables on 0CALMONTH , one for Current Month, one for All 4 months from Current Month and another for All 7 months from Current Month.
In my planning layout when I use these variables for 0CALMONTH, I don't get the values for 4 months & 7 months.
I checked the variables are being populated with correct values. But when they get passed to the layout it doesn't read the Cube.
I got the basic doubt if we can give multiple values for the time characteristics in planning layout..??
Thanks for any suggestions.
VishHi.
Did you created 3 restricted KF: one with KF amount and variable current month, second with amount and variable 4 monthes, third with amount and variable 7 monthes ?
Did you have match records in you cube ?
Regards. -
Error: Missing initial value for session parameter
Hi,
I'm facing a problem while running the ETL process for Complete 11.5.10 Execution Plan in DAC Client. Some tasks are getting failed beacuse of the following error:-
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: VAR_27026 [Error: Missing initial value for session parameter:[$DBConnection_OLAP].].
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6270 [Error: Variable parameter expansion error.].
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6163 [Error initializing variables and parameters for the paritition.].
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: CMN_1761 [Timestamp Event: [Mon Nov 19 21:01:52 2007]].
ERROR : TM_6292 : (5080|4064) Session task instance [SDE_ORA_Product_Category_Derive_Full]: TM_6226 [ERROR: Failed to initialize session [SDE_ORA_Product_Category_Derive_Full]].
ERROR : LM_36320 [Mon Nov 19 21:02:08 2007] : (2108|2632) Session task instance [SDE_ORA_Product_Category_Derive_Full]: Execution failed.
When i checked the parameter file i can see the value assigned to the $DBConnection_OLAP. The same tasks ran successfully when i ran the ETL process for Complete 11.5.10 for the first time. I did not change anything after that and also all these are came built-in with the installation of Oracle BI Applications.
Please anyone give me an idea what is causing the problem.
Thanks,in DAC > Run History > Task Details, query
Name = SDE_ORA_Product_Category_Temporary
Open Status Description, look for string -lpf, the file after it is the actual parameter file DAC send to INFA server. E.g
-lpf D:\DACTOPUS\Informatica\parameters\SDE_ORAR12_Adaptor.SDE_ORA_Product_Category_Temporary.txt
Open the parameter file, most likely the [session_name] does not match with SDE_ORA_Product_Category_Derive_Full or some parameters are missing. -
Multiple values for single field
hi
In order to upload Purchase order details, how you handle multiple values for a single field?
Eg: Item field may contain no. of values for a recordHi,
It is generally taken care using BDC's by Table Control, and if you are using BAPI's then there are tables for ITEMS.
Regards,
Atish
Maybe you are looking for
-
Sparsebundle could not be created (error 45)
I just bought my first ever Mac a little over 30 days ago and also purchased a 1TB Seagate FreeAgent GoFlex Home network storage system. I immediately installed the GoFlex software that included a full integration into Time Machine. This worked perfe
-
Minimum and Multiple Order Qty attributes by product
What are the options for managing Sales Order Multiples. Would like to have the option of setting required or optional quantities. For example, Product A is shipped on a pallet with 12 units. Would like orders to be managed as 12, 24, 36 etc. In othe
-
Since upgrading to OSX Yosemite last night, I get this error message when I open spreadsheets previously created in Google Drive: "A browser error has occurred. Please hold the Shift key and click the Refresh button to try again." Following these ins
-
Mutiple sold to party in one sales order???
Hi, Is it possible for one sales order have mutiple sold-to party??? If yes, how to do the split when in billing process for those mutiple sold-to parties? Thank you.
-
HTTPS Port on Managing the URI of the Human Task Service
Hi, I am working on SOA\BPM suite and when I deploy my workflow application (bpm + human workflow UI projects) noted , since some days ago, that all Human Workflow listed on Enterprise Manager (navigating as in [SOA-BPM Suite Dev Guide|http://docs.or