Passing a comma in a parameter within a URL
I am trying to pass a parameter whose value contains a comma into Discoverer Viewer using a URL. I have followed the instructions that are given in the Disco documentation, substituting ~44 into the URL where the comma appears. Here's how it looks:
http://elvis.rock.local:7777/discoverer/viewer?us=anyuser&db=prod&eul=prodeul&wbk=ACT001TESTURL&wsk=2234&qp_Drivers=Smith~44+Shad+A+/+ssmith,Brady~44+Tom++/+brady&qp_Company=Mycompany
The problem is that the parameter values show up as 'Smith~44 Shad A / ssmith','Brady~44 Tom / brady' rather than what I expected: 'Smith, Shad A / ssmith','Brady, Tom / brady'. I have tried using ~32 and 002c instead, also tried enclosing in quotation marks, i.e., '~44'.
Obviously I don't get any results because the values passed in the parameters don't match up with the values in my table.
Any suggestions?
Thanks in advance,
Tricia
Hi,
It looks like you have a multivalued parameter and Discoverer cannot distinguish between a comma as a delimiter and a comma within the a parameter value. It is because you are using both multivalued parameters and commas within your parameters that you have the problem. If you have a list values like Smith,Brady,Cooke then the URL parameter qp_names=Smith,Brady,Cooke will be translated to 'Smith','Brady','Cooke'. On the other hand if you have a single parameter like Smith, Shad A then qp_name='Smith,+Shad+A' will be translated to 'Smith, Shad A'. I cann't think of any workaround other than using your own encoding.
So for example, if you encoded comma as ~2c then you would change you condition for the parameter from item_name IN (:Drivers) to REPLACE(item_name, ',','~2c') IN (:Drivers)
But then all users would have to enter the encoded comma not just when the URL was used.
Rod West
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 -
Passing mandatory parameter within several calculation view
Hi, I have syntax error when I try to pass parameter between several calculation view; let say:
Calculation view A: has mandatory parameter called company;
and
Calculation view B: has mandatory parameter called company;
What I want to achieve is to passing parameter from user from Calculation view B and then within Calculation view B, I called Calculation view A with user inputted parameter.
I have try similar like this, but giving me error:
var_out = SELECT ...
FROM :CA_A a,
"_SYS_BIC"."package-testing/CA_B" ('PLACEHOLDER' = ('$$COMPANY$$', COMPANY)) b
SQL: sql syntax error: incorrect syntax near "COMPANY": line ...
NB: COMPANY is mandatory parameter inside Calculated view BGot it.
Actually, passing the parameters from one CA to the other should be the easiest part.
Just do something like:
lt_a = SELECT * FROM "_SYS_BIC"."package/CA_A" ( 'PLACEHOLDER' = ('$$COMPANY$$', :COMPANY) );
Where "COMPANY" is the input parameter's name within both views.
Basically, within the calc view's code, just use colon & the parameter's name to refer to the paramete, similar to how you do with a logical table (e.g. :lt_a in the aforementioned case). It would also be the same to refer to a parameter within a procedure.
From your original code, the only difference is the colon you forgot before "COMPANY" parameter reference.
Within CA_A's own code, it should be the same to refer to the parameter within the code (i.e. :IP_COMP in the above case).
How to achieve what you're trying to is another story. But if you want help with the SQL itself, I'd ask it in another discussion thread. -
Passing multiple integer values as parameter in SSRS
Hello,
I am trying to pass a comma separated multiple integer value parameter in SSRS report and it errors out complaining that it is not able to convert the nvarchar value to datatype int. But it works fine when I pass a single value. Here is the code I am using
for the report and I am stuck at passing multiple values.
SELECT
id,count(*) as cnt
from table
and ID in (@id) group by id
eg: if I pass 10,20,30 then I would get error however if I pass 10 then it works fine
Is there a different method to pass multiple integer values?
Thanks for your help.A comma is, of course, a textual character and not an integer, thus the error you are getting. Multi-value parameters can be used for this.
Select "Allow multiple values"and set data type to Integer. Multi-value parameters deliver the values as an array. The query interface is smart enough to convert them to the proper syntax (comma-delimited) automatically so a statement like:
WHERE Field IN (@id)
where the parameter has an array of values {1, 2, and 3} is interpreted as:
WHERE Field IN (1,2,3)
You do not need to manually convert it in a transact SQL query. That is not the case for displaying the value array in your report. If you wish to display the array (described above) in your report as "1, 2, 3", you will need to use a join expression:
=Join(@id, ", ")
As DJ described, the other part to a multivalue parameter is the Available values. These can be set explicitly but given your example, I think it would be best to create a new dataset that retrieves a distinct list of the IDs that can be retrieved, perhaps
something like:
SELECT DISTINCT GroupName, GroupID
FROM table
WHERE [criteria]
Set the available values to use this query with GroupName (or whatever user-friendly field you choose for your dataset) as the label and the id as the value. The label field should be something the the target report user can easily identify the correct group
using.
If you don't want to or can't use a multivalue parameter for some reason then you will need to manipulate your parameter value prior to consuming it in your query. When you add the parameter to the TSql query and save the dataset, SSRS adds it to the Parameters
property of the dataset. Open the dataset properties and select the parameters tab. You should see your parameter in the list. click the expression builder (fx) button next to the value and enter this expression:
=Split(@id,",")
Note that the second element of the expression is the delimiter. If your text input has comma-space as a delimiter (1, 2, 3 vs 1,2,3) then that element must include ", ". My example just has comma so if you use that with a string "1, 2, 3"then
the resulting array will still have 3 elements but the 2nd and 3rd elements of the array will have a preceding space which will cause your dataset to error with the same error. As long as there are no non-numeric characters in any of the elements, the split6
will create the text array, SSRS will dynamically generate the correct "IN"syntax (comma separated) and SQL will convert the elements from VARCHAR to INT on the fly.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
Passing Java statements in the parameter list
I am relatively new to Java and have a need to create a method which has a Java statement passed to it in the parameter list. The purpose is to optionally run this statement within the method. For example:
I have a method called rotateAndTranslate that sets up an Affine Transform by saving the existing transform context, creating a new transform, and then invoking that transform. After the new transform is invoked, I would like to have the ability to run different Java graphics commands (or not) before continuing with the remaining portion of the existing method (in this case, restoring the previous transform.
I am not able to find any clear information on how to pass in Java statements and then invoke them.
Can someone help with this? Please keep it simple as I am still trying to get my head around Java and OOP.
Carlyou're talking about closures, more or less, which java doesn't currently have
you can get close to it by using anonymous inner classes. define an interface, say Transformer, and pass instances of that as arguments:
public interface Transformer {
void transform();
Transformer transformer = new Transformer() {
public void transform() {
// do the work here
MyTransformerClass.doTransform(transformer);
...obviously, the MyTransformerClass.doTransform() must take a Transformer as a parameter -
Passing a value to a Parameter Field From a VB Form
Post Author: as1971
CA Forum: General
Hello everyone
I'm using Visual Basic 6.0 and Crystal Report 9.0
I built a report using Crystal Report and named it Player_Statement.rpt. I then included it to my VB project and named it Player_Statement.Dsr
In this report I have a Parameter Field called P_Player_ID which I'm using in Record Selection Formula.
I'm using the following code to pass a value to the parameter:
Dim Report As CRAXDRT.ReportSet Report = New Player_StatementReport.ParameterFields.GetItemByName("P_Player_ID").AddCurrentValue CLng(cmbPlayerNB.BoundText)
When I execute the application I get the error message "The value or range you are adding has already existed" at the last line of code (Where I'm assigning the parameter a value)
Could anybody help me pleasePost Author: VinoTinto
CA Forum: General
Dim Report As CRAXDRT.ReportSet Report = New Player_StatementReport.GetItemByName("P_Player_ID").ClearCurrentValueAndRange Report.ParameterFields.GetItemByName("P_Player_ID").AddCurrentValue = CLng(cmbPlayerNB.Boundtext) -
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 -
Passing Inner class name as parameter
Hi,
How i can pass inner class name as parameter which is used to create object of inner class in the receiving method (class.formane(className))
Hope somebody can help me.
Thanks in advance.
PremNo, because an inner class can never have a constructor that doesn't take any arguments.
Without going through reflection, you always need an instance of the outer class to instantiate the inner class. Internally this instance is passed as a parameter to the inner class's constructor. So to create an instance of an inner class through reflection you need to get the appropriate constructor and call its newInstance method. Here's a complete example:import java.lang.reflect.Constructor;
class Outer {
class Inner {
public static void main(String[] args) throws Exception{
Class c = Class.forName("Outer$Inner");
Constructor cnstrctr = c.getDeclaredConstructor(new Class[] {Outer.class});
Outer o = new Outer();
Inner i = (Inner) cnstrctr.newInstance(new Object[]{o});
System.out.println(i);
} -
Pass table name as a parameter to function
Is there a way to pass table name as a parameter to functions? Then update the table in the function.
Thanks a lot.
JiaxinHi, Harm,
Thank you very much for your suggestion and example. But to get my program work, i need to realise code like follows:
CREATE OR REPLACE FUNCTION delstu_func(stuno char) RETURN NUMBER AS
BEGIN
EXECUTE IMMEDIATE 'DELETE FROM student s' ||
'WHERE' || 's.student_number' || '=' || stuno;
LOOP
DBMS_OUTPUT.PUT_LINE('record deleted');
END LOOP;
END;
SELECT delstu_func('s11') FROM STUDENT;
The intention is to check if such a function can perform operations such as update, delete and insert on occurence of certain values. When executing the above statement, the system returns an error message:
ERROR at line 1:
ORA-00933: SQL command not properly ended
ORA-06512: at "SCMJD1.DELSTU_FUNC", line 3
Could you tell me where is wrong?
Jiaxin -
Passing Item Number as a Parameter takes long time,need to make it optional
Hi,
I am trying to pass Inventory Item as a parameter in the discoverer report and it is taking long time to query the results. I am not sure how to make a parameter optional (Not Required)
Please advice
Thanks,
user12048986
Edited by: user12048986 on Apr 19, 2010 2:54 PMHi
In order to use the value ALL in a list of values you have to do two things. These are:
1. Create the LOV like you did with a SELECT 'ALL' FROM DUAL unioned to the real LOV
2. Create a condition that looks for the word ALL
Here's the condition:
COLUMN_VALUE = :Parameter_Value OR :Parameter_Value = 'ALL'
You could also make sure the value is in uppercase using this:
COLUMN_VALUE = :Parameter_Value OR UPPER(:Parameter_Value) = 'ALL'
This way if a user keyed 'all' it would still work.
Best wishes
Michael -
How to pass a Class as a parameter of a method?
I have a method like below. Inside this method I need to create a variable that his type is the type of the class I have passed as a method's parameter.
For example, if I call the method like this "Meth1(ClassPerson);" insed the method I need to declare a variable of class "ClassPerson", but if I call like "Meth1(ClassCity);" I need the same variable to be declared as a ClassCity.
public function Meth1( /*I dont know what to put here*/ ):void{
/*I dont know what to put here to declare my variable*/
/*here
comes
more
code
using
the
variable*/
I tried as below but dont worked:
public function Meth1( classtype:Class):void{
var var1:classtype = new classtype();
Can someone help me?evyatarBH, after declare the variable like you said an error occurs when I try to access some property of the variable. I receive a mesage telling that this property dont exists.
public function Meth1( classtype:Class ):void{
var var1:* = new ClassFactory(classe);
//when I try to do something like the line below the error appear
inputtext1.text = var1.fieldname;
rashare, I can't do this because I can't declare the object before the method is called. I must inform to the method only which class I will use, but the object must be created only inside the method. -
Passing range-value into a parameter of a subreport
Hello all
I've a problem with passing a formula into a parameter of the subreport.
I'm using a SAP BW query with a data range parameter. So I have to provide a range value first for executing this query.
I'd like to execute the query with a data range between the last two weeks. For this purpose if created a formula with following code:
[dateadd('d',-14,currentdate),currentdate]
This means, the result is an array. And exactly this is the problem. Because Crystal Reports doesn't support an array as a result of a formula.
Is there an other possibility for passing the array/data range to the parameter in the subreport?
I'm using Crystal Reports for enterprise (v.14.0.2).
Kind regards,
GregThanks, kglad. I was wondering about that. I thought that
putting a variable data type of :Number would have made it a
number, but I never got an error in the debugger so I thought it
was ok. I traced the data type and figured out it was actually a
string and changed the line like follows which turned the string to
an integer and made it work:
var image01ClosedPosition:Number =
parseInt(RootNode1.attributes.imageChangeX); -
Can we define a parameter within a subroutine?
Can we define a parameter within a subroutine?
Hi,
see first of all u cannt declare parameters in subroutine if u want u can declare variables locally that is by using the keyword DATA but u cant declare PARAMETERS locally ..
if it is helpfull plzz reward..
plzz dont forget to reward..... -
SSRS How to pass a value for Hidden parameter ?
Hello,
I have a SSRS report deployed on the Report server. This report is having an "Hidden" parameter.
Could someone please guide me, how to pass the value to this internal parameter in each of the following case -
1. Report is accessed through a Desktop application/Web application in Report Viewer.
2. Report is accessed through the Url.
3. Report is accessed through the Report Manager.
Any quick help on this is highly appreciated.
Thanks!
-Vinay Pugalia
If a post answers your question, please click "Mark As Answer" on that post or
"Vote as Helpful".
Web : Inkey Solutions
Blog : My Blog
Email : Vinay PugaliaHi Vinay Pugalia,
Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time and values cannot be passed to this type of parameter (when present in the child report) in case of a drill-through report implementation. This
type of parameter is read-only and not accessible in parent report.
This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.
So no matter you access the report through report manager, URL or Report Viewer. The passing value to the internal parameter will not work.
As you have mentioned that I will also suggest you use the hidden parameter instead.
More details information in this blog for your reference:
SSRS – Understanding Report Parameter Visibility
How to pass value to hide parameter is the same as that of the visible parameter, similar thread for your reference:
Passing the value in action property of a text box
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support -
How to pass an object as a parameter
how do you pass an object as a parameter? (what type should it be ?)
Well you can use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html]String
Or you can take a [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html]Double
And you can pass [url http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Event.html]Events
and get yourself in trouble
and you can use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html]Frame
or maybe take a [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html]List
but some will use [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html]Collection
depends you your direction
so if you need to know
if you should use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html]Map
then this is what to do
just browse the [url http://java.sun.com/j2se/1.4.2/docs/api/]API
Maybe you are looking for
-
Cloud player no longer appears in itunes
I previously could see the songs from my cloud in my itunes player, and now theyhave dissappeard. I have no idea why. I used to have songs either downloaded from cd's or purchased, along with songs that had the cloud icon next to them. Why has this h
-
How can I convert a Flare project to RoboHelp HTML 10?
In my company, we work in RoboHelp HTML 10. We aquired a company that uses Flare for their online help project, and now it falls to me to convert it to RoboHelp. I searched online and found the converter on the Show Me The Demo site, but the download
-
How to validate the columns in dynamic alv grid
Hi Friends, I want to validatethe value of all the columens (min 1 and max 40) which i create dynamically in alv grid. value must be between 0 and 1 only. Please help ,, need urgently.
-
when I try to update safari i get a volume not supported message but when i try to update mac osx 10.6.3 I cant because of a "an error occurred while evaluating javascript for the package" also when I try to update my mac from the apple->software upd
-
To_Date Func not working in Reports6i
Hi, I'm using Reports6i. I've a query like below Select ctry,sum(wt),decode(bltype, 'I', to_char(voy_eta,'MONYYYY'), 'E' ,to_char(voy_etd,'MONYYYY') ) voy_dt from Select bdl.bdl_type bltype,lm.loc_ctry ctry ,vm