PowerPivot and query parameters

Is there any plans to support parameterized sql queries?If I try to execute query it requests declared parameters by means of form,but I can't check resulting query.Why?It says "Must declare the scalar variable ...". 
WTF?
Regards.
P.S.
Without parameterizing PowerPivot is useless  IMHO.

What we decided to do, as this is a glaring oversight is to expose a Parameters table via BDC. The end users can then set the "global parameters" for the site, (like date ranges for a quarter that they want to expose). They are able to make updates directly
to the parameters then when the data is refreshed we are able to get a filtered view. Not perfect, but certainly better than having to open multiple sheets to reset very similar parameters.
We did something like this, with the initial settings set to defaults so if the users were to delete the parameters they would simply get this current year. While it isn't 100% wonderful it gets us by, and enables our customer to surface only the data sets
they are interested in making available. 
Declare @datestart as datetime
Declare @dateend as datetime
Set @datestart='01/01/2013' 
Set @dateend='01/10/2014'
select @datestart = value from parameters where name = 'StartDate';
select @dateend = value from parameters where name = 'EndDate';
QUERY HERE.

Similar Messages

  • ADF: How to print query and query parameters passed in the executeQueryForCollection methof of VO impl class.

    Hi,
    Kindly let me know how to print the query and the parameters passed to it? I tried with the params parameter in super.executeQueryForCollection(qc, params, noUserParams); but could not succeed.
    I need to log the query and the params passed to it. Kindly help.
    Thanks in advance,
    Kalpana.

    Here you go
    Coding With Passion: Oracle ADF - Debug view object query with parameters

  • Another bug in Flex? (Application.parameters and query strings)

    I'm passing in two query string parameters in the source of SWFLoader and both of them are clumped together in the first parameter by application.parameters.
    But I switch the order of the parameters in the query string and both parameters are returned correctly:
    Case #1:
    Query String:  ?cfg=zzzzzzz54B&embed_div=x
    parameters.cfg: zzzzzzz54B&embed_div=x
    parameters.embed_div:  [nothing]
    Case #2:
    Query String:  ?embed_div=x&cfg=zzzzzzz54B
    parameters.cfg: zzzzzzz54B
    parameters.embed_div: x
    Here is the actual debug commands:
    Dumper.info(this.url);
    Dumper.info(this.parameters.cfg)
    Dumper.info(this.parameters.embed_div);
    And output:
    (Case #1)
    [INFO]: file:///C:/Program%20Files/WordRad234/chm/wordrad_kt/web%20pages/zzzzzzz5/rad_3xf.swf?cfg =zzzzzzz54B%26embed_div%3Dx (String)
    [INFO]: zzzzzzz54B&embed_div=x (String)
    [INFO]: (Object)
    (Case #2)
    [INFO]: file:///C:/Program%20Files/WordRad234/chm/wordrad_kt/web%20pages/zzzzzzz5/rad_3xf.swf?emb ed_div=x&cfg=zzzzzzz54B (String)
    [INFO]: zzzzzzz54B (String)
    [INFO]: x (String)
    Something I just noticed: the equal sign after embed_div is replaced by %3D but only if embed_div comes last.

    NEVERMIND:
    It was something I was doing  to the source of SWFLoader beforehand (involving encodeURIComponent).
    I have to say, I have many, many times thought something was a bug in Flex and it was in fact my code.  In general, I think Flex/AS3 is an elegant and useful product.  The sort of ad hoc  tweaks that have to be done to avoid memory leaks though is ridiculous (though I do have that figured out pretty much as well.)

  • 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 |

  • Powerpivot filter query based on another table's visible results?

    Excel 2010 x32 on Win 7 x64
    I have multiple tables coming into Powerpivot via SQL connection. They have some relationships pre-defined from the source.
    I need to reduce the amount of data I'm bringing in for my testing. One of the tables has great granularity, containing every event in the database. One field in this data is "Event Type".
    A separate table has a short list of the event types of interest.
    I'd like to filter the first table's data pull (SQL refresh) to only include the event types that are listed (and visible) in the second table, in addition to an existing date range filter that is already in place. Ultimately my goal is to widen
    the date range I can pull in before hitting Excel's memory limits, by eliminating the events I don't care about.
    Currently I'm using a SQL query to pull in the granular data;
    SELECT
      [Fact RawData].*
    FROM
      [Fact RawData]
    WHERE
      [Fact RawData].[Event Date] >= N'2014-06-01T00:00:00'  
    How would I adjust this to also say "only where [Fact RawData].[Event Type] IN {a column in a data pull that is already in powerpivot}"
    and how will that work under a "refresh all" scenario, where I would need the event table to update before this SQL is executed each time?
    Many thanks!

    If I understand correctly, these articles indicate that I can apply filters during
    data import, but I'm not clear how rows can be filtered during import based on
    another powerpivot table results. <o:p></o:p>
    From the first link:<o:p></o:p>
    "For data feeds, you can only change the columns that are imported. You can’t filter
    rows by values unless the source of the data feed is a report, and the report
    is parameterized."<o:p></o:p>
    So I guess the clarification of my original question is: How do I create a parameterized
    report, based on the data in another powerpivot table, and also ensure that the
    parameterized report is executed /after/ the source powerpivot table is
    refreshed so that the proper row filtering is applied?<o:p></o:p>
    Simplified example:<o:p></o:p>
    Table 1 = List of all physicians who have ever had a patient in a large hospital system.
    Filter when bringing results into powerpivot limits results to physicians from
    a target physician group, clinical specialty, or other filter based on reporting needs. <o:p></o:p>
    Table 2 = anonymized records for all patients, physician listed in each record. Filtered
    by time period when bringing into powerpivot.<o:p></o:p>
    I could bring back the whole patient table, but it is so large that Excel runs out of
    resources unless my time period is tiny. If I can limit the returned rows from
    Table 2 based on the current list of physicians shown in Table 1, then I will
    have a much smaller data set and can expand the time period filter to be more
    meaningful and make sure all the target records are brought back, without
    having to run multiple subsets of physicians or time, and still have to
    merge/remove duplicate records.<o:p></o:p>
    Thank you for any advice/URLs/etc.<o:p></o:p>

  • 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

  • "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

  • 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

  • "Define query parameters" popup in Dataset properties - Refersh field, not displayed for Sps in SSDT 2010 (Works fine in BIDS)

    When we upgraded our SSRs projects to 2012, we are facing an issue in Data tools environment.
    When we click REFRESH FIELDS button in Dataset properties, With query type as SP (For all our sps), the "Define query parameters"  popup is not displayed. 
    When we checked the SQL Profiler for queries executed at back end , NULL values are used for parameters.
    But when we Used the QUERY DESIGNER button, and clicked execute for sp, the popup comes.
    For User defined Functions, the Popup comes correctly.
    In BIDS, still we can open the RDLs and do the operations correctly
    Please advice

    Dear Wendy Fu
    My Scenario is different.
    In Query Designer, Every thing is fine (Parameter Popup is coming, and fields are populated under data set)
    But what we need to do is
    1, Select Query Type As SP
    2, Select the required SP
    3, Click Refresh Button
    4, A "Define
    query parameters" window popsup
    5, Provide values and click Ok
    6, Fields will be populated under the dataset
    The issue we face is that, we are not getting the  Define query parameters popup,
    Hence NULL values are passed to execute the sp, to retrieve the fields set.
    The Work around we are using now is editing the sp, and use
    set @Parameter = Value
    for each parameters in sp, and then we get the fields populated under dataset, when we click refresh.
    The issue exists in both  MSDT for
    Visual studio 2010 &  MSDT for  Visual studio 2012.
    But every thing is fine in BIDS with VS 2008 Shell for the same RDL

  • TO_NUMBER and NLS parameters......don't understand

    I am trying to get my head around the use of format elements and NLS parameters with TO_NUMBER and TBH am at my wits end. So I'm going to start with something simple. I've never bothered or had to bother with the third parameter 'nls params' for NLS settings and now that I have I really regret it.
    This works even though the '.' and ',' characters are not in their normal positions....
    SQL> SELECT TO_NUMBER(  '17.000,23', '999G999D99', 'nls_numeric_characters='',.'' ') FROM DUAL;
    TO_NUMBER('17.000,23','999G999D99','NLS_NUMERIC_CHARACTERS='',.''')
                                                               17000.2
    So why is this version throwing up an error?   (I should say all I've changed is the order of ',' and '.' in the string)
    SQL> SELECT TO_NUMBER(  '17,000.23', '999G999D99', 'nls_numeric_characters='',.'' ') FROM DUAL;
    SELECT TO_NUMBER(  '17,000.23', '999G999D99', 'nls_numeric_characters='',.'' ') FROM DUAL
    ERROR at line 1:
    ORA-01722: invalid number
    Also does the order of characters matter here  'nls_numeric_characters='',.'' ')  ?
    I apologise but when marking code in my spl*plus CLI and trying to paste here as 'SQL insert' lines ended up missing or wrapping or line spacing changing seconds later. I ended up with one line written over the other and the missing lines only being visible when highlighted!!!

    Also does the order of characters matter here  'nls_numeric_characters='',.'' ')  ?
    Of course the order is important. How would you tell the meaning of each character if it wasn't?
    First character is the decimal separator, and the second is the thousand separator.
    Your first query is OK because the decimal separator used in the input string is '.' and the thousand separator is ',', which matches exactly the characters specified in the NLS parameter.
    The second query failed for the opposite reason.

  • Number of Query parameters problem

    Ok, so I have a form that has always has one of two values filled in, but a different number of parameters in the rest.
    Example:
    The user will have to fillin (City) and (State), or (zipcode) to do a query. But they can also fill in the (numOfBedrooms), (numOfBathrooms), (minPrice), (maxPrice), etc...
    How do I get the information out and query against the right data fields. I thought of putting the collected data into an array for each item that is queried, but I need to know how to construct the Where clause, like.
    WHERE numOfBedrooms = " + inputNumBeds + " AND" + etc...
    What if they don't put in the number of bedrooms, and put in only the number of bathrooms or the max price?
    How do I know when to use the AND, >=, <=, >= and <=, in the right place?
    I just dont know how to construct the query and put it all together when its submitted by the form?
    Thanks in advance.
    orozcom

    Thanks guys, Will do.
    So with each one should I do something like.
    If (numBedroom != null)
    Insert the and statement;
    or should I do a
    if (numBedroom != 0) // This will be a pulldown menu
    anyway. I could just default to 0.
    Insert the and statement.
    Zero is a magic value in the above so null might be a better choice. Using null requires the use of Integer vs int though. That decision is rather minor. However if you have some cases where zero is a legitimate value to search on then for numerics it might be better to choose a really good magic value like Integer.MIN_VALUE.
    >
    Same with the price, but I could probably do a.
    If(( minPrice != 0) && (maxPrice !=0))
    insert the > minPrice and < maxPrice statement
    Then do the other if statements.
    As suggested you can get creative if you want or need to.
    In the above what you have is one field with different operations possible. So you would have...
    - operand
    - leftValue
    - rightValue
    Operand can then have values like "equals", "greater than" and "between". For the specific example you gave above the operand would be "between" and you would use both values.

  • Data Components && Query Parameters

    I just started playing with the database binding since I use PostgreSQL. I have a couple questions around parameters. Let's say that I want to make a page to display / update configuration variables from my application. I have a table in my database called config, with two simple members ckey and cvalue. Let's say I have 20 key / value pairs.
    I want my page to simply load the values associated with all 20 keys into 20 different text boxes. I created a query with the WHERE clause being WHERE ckey = ?. Now, I've seen some posts that say that I have to have a Session Bean parameter to populate this ? -- is this correct? Can't I have a simple keyword somewhere since this parameter will be fairly static for each of my 20 text boxes? Could I just name each text box the associated ckey name?
    Secondly, how do I go about letting the data components update and validate this data if it is changed? The tutorial didn't show me much. Thanks.

    Hi,
    Please take a look at the AppModel sample application. This is available at:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    This sample application demonstrates many features including how to handle the query parameters and how to update etc.
    Hope this helps
    Cheers
    Giri :-)
    Creator Team

  • POWL - Query parameters doesn't open

    Hi Gurus,
    I configured a POWL for shopping carts based on SAPSRM_E_CHECK_STATUS.
    1. Create custom application ID
    2. Create a custom POWL type with the standard feeder (/SAPSRM/CL_CLL_PWL_A_SC_ESS)
    3. Create the link between application ID and POWL type (Tx. POWL_TYPER)
    4. Create the query with the POWL Type ID.
    At this last one if you click on button "Query parameters" any windows is opened.
    Can anybody help me?
    I double check the configuration but I didn't see any problem.
    Many thanks in advance.
    David.

    Hi Konstantin,
    I solved by myself.
    I didn't create the field catalog for POWL Type. For this reason I hadn't any field to show into the query parameters.
    Thanks,
    David.

  • 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.

Maybe you are looking for

  • New hard drive; can't play songs purchased while under old (changed) login!

    My hard drive died and had to be replaced. Fortunately, I had backed up my library, but after importing my library again, I am unable to play any songs purchased under an old email/password. We changed internet providers and then I switched from PC t

  • Yosemite Won't Install (EtreCheck results)

    I have attempted to download and install Yosemite on my Early 2013 MacBook Pro. It gets most of the way through the installation and then just stops. Nothing. For hours. I had to restore my hard drive from a SuperDuper backup. I've run EtreCheck and

  • Small differences between while canceling invoice.

    Hello, While checking the accounting documents I  have notices that there are small differences between the GR document invoice document. The differences has occurred on GR\IR account and stock account  during canceling the invoice and is 0.01 EUR. T

  • Implement as in Apps USER form

    Hi all, I am required to change the password like in oracle apps Sysadmin>user with same as username and password text items only. In password text item When -validate- item trigger I wrote PACKAGE BODY change_pwd IS first_entry varchar2(30); procedu

  • How to Change PDF Viewer on Safari ?!

    Hey, I downloaded adobe pdf reader since it was on the staff pick's list thinking it was good, but it turn it to be slow. So now whenever i click on a pdf link it uses adobe to open it, but i wanna use preview since its much slicker. I tried uninstal