Parsing URL query parameters

Hi all, I keep running into situations where I need to parse the parameters from the query string of a URL. I'm not using Servlets or anything like that.
After much frustration with not being able to find a decent parser, I wrote one myself, and thought I would offer it to others who might be fighting the same thing. If you use these, please keep the source code comments in place!
Here it is:
* Written by: Kevin Day, Trumpet, Inc. (c) 2003
* You are free to use this code as long as these comments
* remain in tact.
* Parse parameters from the query segment of a URL
* Pass in the query segment, and it returnes a MAP
* containing entries for each Name.
* Each map entry is a List of values (it is legal to
* have multiple name-value pairs in a URL query
* that have the same name!
     static public Map getParamsFromQuery(String q) throws InvalidParameterException{
          * Query, q, can be of the form:
          * <blank>
          * name
          * name=
          * name="value"
          * name="value"&
          * name="value"&name2
          * name="value"&name2="value2"
          * name="value"&name="value"
          * name="value & more"&name2="value"
          Map params = new HashMap();
          StringBuffer name = new StringBuffer();
          StringBuffer val = new StringBuffer();
          StringBuffer out = null;
          boolean inString = false;
          boolean readingName = true; // are we reading the name or the value?
          int i = -1;
          int qlen = q.length();
          out = name;
          while (i < qlen){
               char c = ++i < qlen ? q.charAt(i) : '&';
               if (inString){
                    if (c != '\"')
                         out.append(c);
                    else
                         inString = false;
               } else if (c == '&') {
                    String nameStr = cleanEscapes(name.toString());
                    String valStr = cleanEscapes(val.toString());
                    List valList = (List)params.get(nameStr);
                    if (valList == null){
                         valList = new LinkedList();
                         params.put(nameStr, valList);
                    valList.add(valStr);
                    name.setLength(0);
                    val.setLength(0);
                    out = name;
               } else if (c == '=') {
                    out = val;
               } else if (c == '\"') {
                    inString = true;
               } else {
                    out.append(c);
          if (inString) throw new InvalidParameterException("Unexpected end of query string " + q + " - Expected '\"' at position " + i);
          return params;
     static private String cleanEscapes(String s){
          try {
               return URLDecoder.decode(s, "UTF-8");
          } catch (UnsupportedEncodingException e) {
               e.printStackTrace();
          return s;
You'll also need to create a new Exception class called InvalidParameterException.
Cheers,
- Kevin

Because javax.servlet.* is not included in the
standard Java distribution. I am writing my own
mini-web server interface for applications and don'tSounds like an interesting project, have you thought about implementing the Servlet API (or a subset)? It is well known to developers, and I dont think it would require that much extra work, but that would depend on mini mini is of course =).
want to add that dependency nastiness just to get a
parser...OK, I was just curious.

Similar Messages

  • Solution to parse URL query parameters

    I would like to parse query parameters in a URL GET request. I want to know if there is an efficient solution.
    e.g. http://www.google.com?search=red&query=blue
    I want to get "search", "red", "query", "blue" strings. I am not sure whether using StringTokenizer is the efficient solution.
    Thanks
    Jawahar

          StringTokenizer st = new StringTokenizer("http://www.google.com?search=red&query=blue","?&=",true);
          Properties params = new Properties();
          String previous = null;
          while (st.hasMoreTokens())
             String current = st.nextToken();
             if ("?".equals(current) || "&".equals(current))
                //ignore
             }else if ("=".equals(current))
                params.setProperty(URLDecoder.decode(previous),URLDecoder.decode(st.nextToken()));
             }else{
                previous = current;
          params.store(System.out,"PARAMETERS");

  • Managing beans based on URL query parameters

    I was just reading this thread with interest, but it didn't come to the conclusion that I need.
    http://forum.java.sun.com/thread.jsp?forum=427&thread=441432
    In that thread, there were two screens: a table of links to employees and an "edit employee" page. The solution was to use the command_action on the list create an "employee data" bean, which could then be edited on the "edit employee" page.
    My problem is that I need to create some session beans based on query parameters in the URL. Using the example above, I'd have something like: http://localhost/app/editEmployee?empNo=38
    Why? Because the user can bookmark the edit employee page, have two
    browser windows open (which would require two seperate employee data beans), etc... and we need to handle that. It looks like
    that means I can't use the solution in the above thread.
    My current thought is to create a managed-bean with request scope and have it create the EmployeeData bean.
    Another idea is to somehow initialize the bean with managed-properties
    <managed-bean>
        <managed-bean-name>EmpBean</managed-bean-name>
        <managed-bean-class>com.mycompany.EmpBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
            <property-name>employeeID</property-name>
            <value-ref>queryParamBean</value-ref>
        </managed-property>
    </managed-bean>
    <!--
      just returns FacesContext.getCurrentInstance().getServletRequest().getParameter("id")
    -->
    <managed-bean>
        <managed-bean-name>queryParamBean</managed-bean-name>
        <managed-bean-class>com.mycompany.QueryParamBean</managed-bean-class>
        <managed-bean-scope>none</managed-bean-scope>but that seems kinda hacky. Any other ideas?

    Excellent, using requestScope gets rid of the queryParamBean hack from my first post. For some reason I thought value-ref evaluatations only resolved against stuff the VariableResolver can see. That's not the case. Thanks.
    Unfortunately, this bean really wants to be cached on the session, not the request. I suppose it would be possible to have EmpBean delegate to a bean which is actually cached on the session, but that feels like a hack too (and is a lot of glue code).
    So, I think I'm back to the factory, which can handle creating the bean from the query params, caching it, and putting it on the servlet request. I also got a visit from Captain Obvious and realized that the factory could just be a scriplet.
    <% BeanCreator.createBean("com.company.EmpBean", request.getParameter("id")); %>which also isn't great, but is perhaps easier to understand than the BeanCreator from above. I looked into using EL Functions in the variable resolver for the factory, but it doesn't look like that's possible. It's probably possible to extend VariableResolver to add factory methods for managed-beans, which might be the cleanest solution. I'm thinking something like
    <managed-bean>
      <managed-bean-name>Emp</managed-bean-name>
      <managed-bean-factory>
         <factory-name>com.company.BeanFactory.getBean</factory-name>
         <bean-class>com.company.EmpBean</bean-class>
         <arg-value-ref>sessionScope.id</arg-value-ref>
      </managed-bean-factory>But for now, the current two hacks are:
    #1: to create a URL use plain html <href>.
    #2: use a factory method (varying implementions) to create the bean, cache it, and put it on the servlet request

  • "Source not found" Error creating URL Data control with query parameters

    Hi,
    I have a restful service for which i want to create a URL data control. I am able to create the URL data control successfully when i am not passing any parameters in the Source field. But if i am specifying the parameters in the source field like this Department=##ParamName##, something weird is happening. After giving the param string in the Source field, it asks for default param value to test the url. It tests the url successfully. After that i select XML as the data format in which i am mentioning the xsd like this . "file:///C:/..../something.xsd" . And this is when i am getting the error. "Invalid Connection. The source is not found". I am giving exactly same path for xsd which i gave while creating URL data control without query parameters. Infact i was able to create the URL data control with query parameters successfully till afternoon. after that it started giving me this error all of a sudden. Infact as soon as i was able to create a URL data contol with query parameter successfully, i took a backup of the application before moving further. But even that backup is not working now.
    As far as i understand, i dont think there will be any change in xsd if query params are passed to a web service. Please correct me if i am wrong.
    Just dont know what could be the issue. Please help
    Thanks

    Hi,
    xsd is used for the URL service to know what the returned data structure is so it can create the ADF DC metadata
    Frank

  • Opening a url  with parameters in an application

    I'm able to open a url in a browser from my application, but I want to open a url with parameters.
    for instanse http://mypage.asp?parameter=a
    You get a file not found. Is this possible?
    I'm currently using
    Runtime.getRuntime().exec( "cmd /C start " + url);

    Found the answer -- you have to put the url in quotes lest the ampersands parse the end off.

  • Query parameters in BC and setting up Site Search tracking in Google Analytics

    I would like to enable site search tracking in Google Analytics for a non-eCommerce BC site but I do not know what query parameters I need to use to enable site search tracking - can anyone help?!
    I can turn Site search tracking 'on' in Analytics but it requires the query parameters to be entered e.g. 's' or 'q'. I have the option of selecting 'strip query parameters out of URL' but I'm not sure what this does and what needs to be done in the backend of BC?
    Usually, when an internal search is done within a website (and in this case it is www.newcastleairport.com.au), the URL will indicate the parameters by adding a 'en&q' in the URL. To test what metric would be used for the Airport, I did a search on 'annual report' and the following URL came up (not containing an en&q)
    http://www.newcastleairport.com.au/Default.aspx?SiteSearchID=1012&ID=/travellers-search-re sult#.U3A3HmQ-JU0
    Any help would be appreciated. There was a previous discussion re this subject but it remained unanswered but there was a suggestion around using javascript within a web app?
    Cheers

    Hi Sebastian and Manas,
    I am trying to set up a hybrid environment and followed the blog posts. Everything was set up as per the guidelines mentioned but still I am not able to fetch any results from SharePoint Online inside my on-premise environment. 
    There are no errors coming as such. Its just that my on-premise is showing no results from SPO. However if the same user logs on into the Office 365 SPO site he is able to see SPO search results. That means there is no permission related issue specific to
    test user. 
    I am totally out of ideas now. In case you have faced similar issues while setting up the same then any pointers to troubleshoot would be very helpful.
    The link to my query that I have asked on the forums is
    https://social.msdn.microsoft.com/Forums/office/en-US/540d2629-ec6b-4905-b8e2-f6ba4e770d26/configure-one-way-outbound-hybrid-search?forum=sharepointgeneral
    Thanks,
    Geetanjali
    Geetanjali Arora | My blogs |

  • Is it possible to pass Query parameters between two XLF's

    Hi,
    I have a parent dashboard (.xlf) and i'm trying to launch another .xlf (child) from the main dashboard using OpenDocURL.
    Is it possible to pass Query Parameters from parent to the child using OpenDocURL ?
    If not , how we can do it ? . I don't want to use SWF loader to load the child dashboard.
    I'm using SAP Dashboard 4.1 SP4.
    Thanks,
    Shiva.

    Hi Permisindo,
    I tried the approach suggested in the blog, but the parameters are not being passed.
    I have a master xlf and a child swf. I used swf loader to load the child and pass the paramters.
    Here is the URL -
    http://<Server>:8080/BOE/Xcelsius/opendoc/documentDownload?sIDType=CUID&iDocID=<doc id>&sKind=Flash&Fac=All Departments&RoomGroup=All Rooms
    I created the flash varibles(Fac , RoomGroup) in the child swf which i mapped to the respective query trigger cells.

  • How to send query parameters using BIApplicationFrame

    HI,
    I am working on integration of BEx WebTemplate in webdynpro view.
    I am using BIApplicationFrame ui element for this.
    I set the template id in template property of BIApplicationFrame.
    I have to execute a query of this template.
    So i selected the option 'query' of dataProviderStateType property.
    <b>How to send the query parameters to that query.</b>
    I did not find any help ( Example tutorial ) for BIApplicationFrame UI element in SDN.
    Please anybody help me out.

    Hi Charan
    I tried to add the costume parameter in BIApplicationFrame same method that you mentioned. But the result is not coming.
    I am trying to pass the input variable for the query.
    My url is:
    http://<host>:<port>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=BTMP_20100929_054852&DUMMY=8&debug=x&BI_COMMAND=&BI_COMMAND-BI_COMMAND_TYPE=SET_SELECTION_STATE&BI_COMMAND-CHARACTERISTICS_SELECTIONS=&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1=&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=ZCUSTOM1&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS=&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STRING&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=C07&BI_COMMAND-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF=DP_1&REQUEST_ID=11
    If I execute the url directly the out put is coming perfectly after filtering and if I pass the parameter by adding code in wddomodifyview method the filters not working.
    My webdynpro code given below:
    mapParams.put("BI_COMMAND=&BI_COMMAND-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF=DP_1&BI_COMMAND-BI_COMMAND_TYPE=SET_SELECTION_STATE&BI_COMMAND-CHARACTERISTICS_SELECTIONS=&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1=&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=ZCUSTOM1&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS=&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STRING&BI_COMMAND-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING","C05");
    Appreciate if you can help me on this.
    Sajith

  • How to send query parameters using BIApplicationFrame in WD Java

    HI,
    I am working on integration of BEx WebTemplate in webdynpro view.
    I am using BIApplicationFrame ui element for this.
    I set the template id in template property of BIApplicationFrame.
    I have to execute a query of this template.
    So i selected the option 'query' of dataProviderStateType property.
    How to send the query parameters to that query.
    I am setting the fowlloing values in BIApplicationFrame
    dataProviderStateName: BEx Query Name
    dataProviderStateType: query
    server: server url
    server type: java
    templateid: BEx template id.
    The query screen is opening ..But no data.
    I have to pass the following two parameters to that query:
    BI_COMMAND_1-I_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=ZVARCUST01&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=0500000003
    &BI_COMMAND_2-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=0I_CMNTH&BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=01/2000-12/2002
    How to send these two query parameters using BIApplicationFrame.
    I did not find any help ( Example tutorial ) for BIApplicationFrame UI element in SDN.
    Please help me.

    My problem solved. I used the following code in wdModifyView() method.
    Map parameters=new HashMap();
    parameters.put("BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=ZVARCUST01&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING","0500000003");
    parameters.put("BI_COMMAND_2-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=0I_CMNTH&BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_2-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING","01/2000-12/2002");
    WDBIMethods.addCustomParameters(wdThis.wdGetAPI(),"BIApplicationFrame",parameters);

  • Not able to see any Query Parameters in Siebel Application

    We are unable to see any query parameters once we reach Siebel Application i.e if we access Call Center Application, we do not see any additional data in URL after callcenter_enu/start.swe this happens wven when we add/edit records in Call Center Application.

    Yup, its on. I have tried wifi on n off. Even tried Network reset and restart nothing works. Not able to see any wifi names in the list.

  • How to access FlashVars or URL Query String

    I am a bit of a rookie with Flash/AS3 and I need help trying to access FlashVars or URL in Object/Embed tags. I've searched in the Internet and the forums but cannot get my head around how to implement this.  Here is my example.
    1) ACTION SCRIPT - I have created a simple flash banner with clickable button (sparkle) with a mouse down event.
    The action script (AS3) for the button is the following:
    sparkle.addEventListener(
        MouseEvent.MOUSE_DOWN,
        function(evt:MouseEvent):void {
            var url:String = "http://www.[site_url].com/as/img.cfm";
          var request:URLRequest = new URLRequest(url);
            var variables:URLVariables = new URLVariables();
            variables.gphc = "382";
            request.data = variables;
            request.method = URLRequestMethod.GET;
          navigateToURL(request);
         *** the core issue to resolve is how to make the line above (variables.gphc = "382";) to be set dynamically.  I would like for the variable to come from the FlashVars or the URL vars
    2) OBJECT/EMBED - my object/embed code with include FlashVars and URL Query String
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ID="bannerAD" WIDTH="728"  HEIGHT="90">
         <PARAM NAME="movie" VALUE="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382">
        <PARAM NAME="quality" VALUE="high">
        <PARAM NAME="bgcolor" VALUE="#FFFFFF">
        <PARAM NAME="FlashVars" value="gphc=382" />
        <EMBED src="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382" quality="high"WIDTH="728" HEIGHT="90" TYPE="application/x-shockwave-flash"  PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" FlashVars="gphc=382" />
    </OBJECT>
    Questions that I need answered ... How do we access the FlashVars or the URL Query String?  I have found many references to loaderInfo but no clear way to implement that I'm able to understand. So if the loaderInfo is the key, where do I add in the loaderComplete() function into my action script above in #1?
    function loaderComplete(myEvent:Event)
      var flashVars=this.loaderInfo.parameters;
      gphcTextField.text=flashVars.gphc
    this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    Any help is much appreciated.

    Thank you for your input.  I implemented your sugguestion in the following way without any success.  Notice below in the addEventListner that I have added the snippet of code.  Is this a good place (correct place) to set the local_var?  I did confirm that the FlashVars and URL variables were set.
    sparkle.addEventListener(
         MouseEvent.MOUSE_DOWN,
         function(evt:MouseEvent):void {
             var url:String = "http://www.[site_url].com/as/img.cfm";
             var request:URLRequest = new URLRequest(url);
             var variables:URLVariables = new URLVariables();
             var local_gphc:String = LoaderInfo(this.root.loaderInfo).parameters.gphc;
             variables.gphc = local_gphc;
             request.data = variables;
             request.method = URLRequestMethod.GET;
           navigateToURL(request);
    Thank you for your help.

  • How to handle a large number of query parameters for a Browse screen

    I need to implement an advanced search functionality in a browse screen for a large table.  The table has 80+ columns and therefore will have a large number of possible query parameters.  The screen will be built on a modeled query with all
    of the parameters marked as optional.  Given the large number of parameters, I am thinking that it would be better to use a separate screen to receive the parameter input from the user, rather than a Popup.  Is it possible for example to have a search
    button on the browse screen (screen a) open a new screen (screen b) that contains all of the search parameters, have the user enter the parameters they want, then click a button to send all of the parameters back to screen a where the query is executed and
    the search results are returned to the table control?  This would effectively make screen b an advanced modal window for screen a.  In addition, if the user were to execute the query, then want to change a parameter, they would need to be able to
    re-open screen b and have all of their original parameters still set.  How would you implement this, or otherwise deal with a large number of optional query parameters in the html client?  My initial thinking is to store all of the parameters in
    an object and use beforeShown/afterClosed to pass them between the screens, but I'm not quite sure how to make that work.  TIA

    Wow Josh, thanks.  I have a lot of reading to do.  What I ultimately plan to do with this (my other posts relate to this too), is have a separate screen for advanced filtering that also allows the user to save their queries if desired. 
    There is an excellent way to get at all of the query information in the Query_Executed() method.  I just put an extra Boolean parameter in the query called "SaveQuery" and when true, the Query_Executed event triggers an entry into a table with
    the query name, user name, and parameter value pairs that the user entered.  Upon revisiting the screen, I want the user to be able to select from their saved queries and load all the screen parameters (screen properties) from their selected query. 
    I almost have it working.  It may be as easy as marking all of the screen properties that are query parameters as screen parameters (not required), then passing them in from the saved query data (filtered by username, queryname, and selected
    item).  I'll post an update once I get it.  Probably will have some more questions as I go through it.  Thanks again! 

  • Using Form to pass value to query parameters in the selct part of query

    I created a form in Access 2007 to pass 2 values to an Access query.  I am doing this to create delimited output (very large) with the parameters included in the selected data. The select works and is something like this:
    SELECT "^"+!FORM!EXPORT2DAT!PREF_VALUE+"_"+Replace(UCase([column_1])," ","_")+"^|" AS OUTPUT_column1, "^"+!FORM!EXPORT2DAT!COMPANY_VALUE+[COLUMN_3]+"
    ([COMPANY_VALUE])"+"^|" AS OUTPUT_column2,....................
    The form has text boxes for the values I want to pass PREF_VALUE and COMPANY_VALUE to the query parameters, and an execute button to open the query when clicked.
    However when I enter the values and click the execute button, I still get the parameter boxes for the 2 parameters. 1 for this: !FORM!EXPORT2DAT!PREF_VALUE, and FORM!EXPORT2DAT!COMPANY_VALUE. I thought I was filling in with the form text box values.
    Can I use the form's text boxes to pass values to concatenated using(+) columns in the select part of the query as I'm doing above?
    Thanks in advance for your response.

    I have never seen a select statement like that! 
    For query criteria I would use this --
       [FORMS]![EXPORT2DAT]![PREF_VALUE]
                   and              [FORMS]![EXPORT2DAT]![COMPANY_VALUE]
    Build a little, test a little

  • Failed to parse SQL query: ORA-01403: no data found

    I'm going to post and answer my own question in the hope that others will not have to struggle with this error.
    Using a report of the type PL/SQL Function Body Returning SQL and using generic columns you may run into this error
    failed to parse SQL query:
    ORA-01403: no data found
    The SQL will run stand alone but the report fails.
    There is a setting just below the source you should check:
    "Maximum number of generic report columns"
    In my case the number of columns was dynamic and when it exceeded the number set as the maximium number of generic columns I received the 1403 error.
    Hope this helps someone.
    Greg

    Thanks for much for the pointer. For anyone else struggling with this too, I found that my generic columns had unordered themselves. Reordering them solved the problem for me.
    Edited by: user11096971 on Jul 22, 2010 3:19 AM

  • Using Reporting Services Web Service methods to run a report with query parameters

    I'm attempting to use the ReportExecutionService methods to process a report that contains four parameters,  two of them query parameters. In total, the report must execute two queries. The two query parameters are determined by the execution of
    the second query.
    So, I've read about GetExecutionInfo and SetExecutionParams. To quote the MSDN page for GetExecutionInfo, "Use this method iteratively with the SetExecutionParameters method to evaluate parameters that have query- or expression-based defaults."
    Can anybody explain how to use this, or any other method, to execute a report such as mine? The first query gets the rows of the report; the second query gets the row count. LoadReport does not seem to do the trick by itself. I need to use the technique
    described in the quote above, I think.
    I could really use some help. Thanks!

    Hello,
    If I understand correctly, you create a local report which choose report from Report Server. You have two query parameters in the report which are returned by stored procedure. Currently, you cannot get default values for these parameters when run the report.
    Based on my test, if we haven’t configure these parameter with Available Values, we can reproduce the same issue. Also, caching issue may cause the same issue. If the issue is persist, please delete the corresponding report in the report server. Then, redeploy
    it to check.
    There is a similar issue, you can refer to it.
    http://social.msdn.microsoft.com/Forums/en-US/6a548d65-35d0-4a3e-8b64-3b7b655c76ee/ssrs-2008-report-parameter-default-value-doesnt-work-when-deployed
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

Maybe you are looking for

  • 10.6.8 update downgrades USB

    I have just updateded my MacMini Server to 10.6.8 and this seems to have downgraded my USB ports to 1.1. This is according to Elgato EyeTV which no longer recognizes my EyeTV Hybrid. I get a dialogue advising that my Hybrid is plugged into a USB 1.1

  • Pdf files open in microsoft office pictures and will not open

    when trying to open a pdf file of pictures or an emailed document it goesinto microsoft office pictures...a blank screen appears with a small square in the center with the office picture logo and nothing opens

  • Unable to find Business Rules in the JDeveloper while creating new project

    Hi All, I am going through the chapter 9 Creating a Rule-enabled Non-SOA Java EE Application for JDevloper 11g. I am following the instruction given in the chapter. However I am unable to find a Business Rules category for creating a Business rules d

  • CS5 "Undo" keyboard command doesn't work...

    ..after I enter a custom size in a document window, still continues. If I use "built in" size views w/ command + or -, everything is fine. As soon as I type in 52% or something in the window, command +z for "undo" does not respond. Only the redo/undo

  • Restarting Process chain from the middle

    Hi all, I have a question about process chain in BW7.0. When the error has occured in the process chain, is there any way to restart the process chain from where the error has occured? One of the way I came up with was to set the process type into Re