View or Query

I am very inexperienced with LS (second attempt after looking a few years ago).
I have watched many video tutorials which has got me very motivated to give it a nother go but I am failing at the first hurdle.
I have an existing DB in SQl2008 for CLIENTS and an SQL View which is filtered to only show records based on a users list of area's they can access).
CREATE VIEW [dbo].[vCLIENT] AS
SELECT dbo.CLIENT.Client_Name
, dbo.CLIENT.Client_Address
FROM dbo.CLIENT
INNER JOIN dbo.USER_AREA
ON dbo.USER_AREA.Centre_Code = dbo.CLIENT.Centre_Code
I started my new app by using this view but the primary key is being infered so I am now thinking what I would be better doing is creating a "Query", could someone confirm this is the correct path to take and possibly provide a syntax example I would
add in to the code ?
Thanks in advance
Dave

Efficient:
Whenever possible i try to use views on the SQL Server. This reduce the amount of data fly to the Client. Second I'm easy able to create Indexes and so on to Speed up collecting the data.
A Version which working on the Middle Tier:
You can use the preprocessquery Option.
In LS (HTML) create a query based on your table. In the query designer you can choose write code and the preprocessQuery.
In the Query you can add code like this (VB but C# is working in the same way)
Private Sub qrySelectTableforUser_PreprocessQuery(ByRef query As System.Linq.IQueryable(Of LightSwitchApplication.yourtable))
query = query.Where(Function(fx) fx.user Is Me.Application.User.Name)
End Sub
Hope this helps.
Kind Regards
Thomas

Similar Messages

  • Data view in Query

    Hi,
    My Data flow has 4 dso's and 1 cube. There are some common fields in 4 dso's. It was a 3.5 flow and I have migrated to BI7.0. SOme of the mapping were proposed by itself but some are not.
    Now my question is How the data would be viewed at query level.
    Would appreciate if anybody can make me understand.
    Thanks

    On the cube.
    I am not able to understand how it will fetch the records. Let us assume Sales Documnet no. is in all four tables and our requirement is that we have to pick delivery information from one table and sales document no. from another table. How the system will link the record.
    Thanks

  • CM14 BI Publisher - modifying an existing Data Model, the Graphic View in Query Builder does not display

    I am trying to edit the default forms/reports that come with CM14, trying to edit the data model, data set, (to get to the old Infomaker style graphic view) , the Query model does not display (error the list of tables is too long..) Oracle tell me the limit is 60,  there are not 60 tables referenced in any CM report.
    Does this Query builder view work at all on any report?
    (bigger question, we are moving from CM12, should we move to CM13 which works with infomaker?)
    Thanks,
    Paul L

    Kurt, thanks for your replies.
    A couple of notes/clarifications.
    1.     You are correct that BI works better in Firefox--I have observed issues with the BI display when using IE.  I would recommend using Firefox too.
    2.     You are correct about the way to get to the Query Builder to see a graphical view of data tables.  There are basically two issues with this that I mentioned, but will re-iterate:
    a.  If you have an EXISTING query in the data set, then click the "Query Builder" button, this will remove the existing query that's there, it will NOT display the existing query in the query builder.  Query Builder works only to create a NEW query from scratch.
    b.  Query builder is limited to selecting 60 fields max in your query.  If you are creating a large report with many tables, you may find that 60 fields is not enough.  For that you will have to work in the SQL edit screen rather than using the query builder.
    I would impress on anyone developing CM14 reports that they become familiar with the database schema and relationships to avoid problems when developing your BI reports.  You should be able to find the tables and joins documentation in the knowledgebase.

  • SharePoint 2013 List View with query string filter stops working after editing view from browser

    I have created one list definition in which I have added one list view which will filter data from query string paramater
    So when I am creating list from my list definition, view with query string filter is working fine.
    But when I am modifying view from UI(I am not changing any thing , just opening "Modify View" page and then click on "Save" button), view gets stop working means it's not filtering data based on query string
    Any suggestion what I am missing?
    Below is my list view schema
    <View BaseViewID="11" Type="HTML" TabularView="FALSE" WebPartZoneID="Main" DisplayName="$Resources:OIPLBScoreCard,viewFilterTasksByTarget;" MobileView="True" MobileDefaultView="False" Url="FilteredTasks.aspx" SetupPath="pages\viewpage.aspx" DefaultView="FALSE" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
    <Toolbar Type="Standard" />
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    <ParameterBinding Name="TargetId" Location="QueryString(TargetId)" />
    </ParameterBindings>
    <JSLink>hierarchytaskslist.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <JSLink>clienttemplates.js</JSLink>
    <RowLimit Paged="TRUE">100</RowLimit>
    <ViewFields>
    <FieldRef Name="Body"></FieldRef>
    <FieldRef Name="Title"></FieldRef>
    <FieldRef Name="StartDate"></FieldRef>
    <FieldRef Name="DueDate"></FieldRef>
    </ViewFields>
    <ViewData>
    <FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete"></FieldRef>
    <FieldRef Name="DueDate" Type="TimelineDueDate"></FieldRef>
    </ViewData>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="oipscTargetLookup" LookupId="TRUE"/>
    <Value Type="Lookup">{TargetId}</Value>
    </Eq>
    </Where>
    </Query>
    </View>
    I have one lookup field from "Target List" in my source list and I want to filter data based on that lookup field.

    Hi JayJT,
    The Miscellaneous is located in the contact list that you used for the connection.
    So , you need to edit the page, then edit the contact list that you used, in the web part properties of the contact list, you will find Miscellaneous, then expand it and select ‘Server Render’ .
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How To change the ADF View Object  query where-clause at RunTime?

    I am trying to create a simple display page which will display user data (username, assoc_dist_id, assoc_agent_id, status , etc). The User data is stored in a database table and i am using an ADF Read Only table based on the View Object to display the data on the JSF page.
    However, i want to display only the users that a particular person accessing the page has the AUTH LEVEL to see. e.g. If the person accessing the page is an 'ApplicationAdministrator' then the page should display all users in the table, If its a 'DistributorAdministrator' then the page should display only users associated with that Distributor (i.e. assoc_dist_id = :p_Dist_id ) and If its an 'AgentAdministrator' , then the page should display only users associated with that Agent ( i.e. assoc_agent_id = :p_Agent_id).
    Currently my af:table component displays all the users in the table because the query for the view object is (select * from users) . However, i want to use the same viewobject and just set the where-clause at runtime with the appropriate parameter to restrict the dataset returned.
    Do anyone knows how to accomplish this ?

    David,
    See the custom method initializeDynamicVariableDefaults() in the SRViewObjectImpl.java class in the FrameworkExtentions project in the SRDemoSampleADFBC sample application. You can find out how to install the demo if you haven't already from the ADF Learning Center at:
    http://www.oracle.com/technology/products/adf/learnadf.html
    This class is a framework extension class for view objects that adds a neat, generic feature to be able to dynamic default the value of named bind variables. You can read more about what framework extension classes are and how to use them in Chapter 25, "Advanced Business Components Techniques" of the ADF Developer's Guide for Forms/4GL Developers, also available at the learning center above.
    It is an example of generic framework functionality that "kicks in" based on the presence of custom metadata properties on a named bind variable. See section 25.3.3 "Implementing Generic Functionality Driven by Custom Properties" in the dev guide for more details. Using this sample code, if you add a bind variable to a view object, and define a custom metadata property named "DynamicDefaultValue" on that bind variable, and set this custom metadata property to the value "CurrentUser", then that bind variable will have its value dynamically defaulted to the name of the authenticated user logged in. If instead you set this custom property to the value "UserRole", then the bind variable will be set to the comma-separated string containing the list of roles that the authenticated user is part of.
    Once you've created a framework extension class for view objects like this, you can have the view objects you create inherit this generic functionality.See section 25.1.4 "How to Base an ADF Component on a Framework Extension Class" in the dev guide for more info on this.
    By adapting a technique like this (or some idea similar that better suits your needs) you can have your view object query contain bind variables whose values automatically take on the defaults based on something in the user-session environment.

  • View object query bind variable

    I have a bind variable in my view object query and "Required" is unchecked for it. Due to this JUnits are failing with the Missing IN or OUT parameter error. If I set the bind variable as required, the JUnits run fine.
    But this bind variable is also used in several view criterias where it is set as Optional. So if I set the bind variable in the view object query as Required, will it affect the view criterias as well?

    check https://blogs.oracle.com/jdevotnharvest/entry/the_infamous_missing_in_or

  • Unable to view adf query panel in jsf page

    hi i cannot view the Query > ADF Query Panel when i click the query button to load the page but i can see the page in design. i can only see the search with drop down arrow but cannot see other part of ADF Query Panel . i did this by 9.Expand the EmpDetails1 data control and expand the Named Criteria node below it. Select All Queriable Attributes and drag it into the new query.jsf page. Create it as a Query > ADF Query Panel.
    Edited by: user603350 on 2011/12/08 12:04 PM

    the query button am talking about is the button i click to navigate to the other page(jsf) the page does not display the Query > ADF Query Panel.
    am doing this tutorial http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_3.html am having problem in step 9 .Expand the EmpDetails1 data control and expand the Named Criteria node below it. Select All Queriable Attributes and drag it into the new query.jsf page. Create it as a Query > ADF Query Panel. i can view the ADF Query Panel in design but when i run the application and click the navigation button the page does not show the full ADF Query Panel it only show the search with drop down arrow
    Edited by: user603350 on 2011/12/08 8:39 PM

  • BOXI3.0 Universe Design using view or query in SQL

    Hi. Alias here.
    I would like to know what are the effect to the BOXI3.0 or SQL performance if:
    1. We are using view or query in creating the universe?
    2. Is it the correct way of creating the universe only from tables?
    3. If need to do combination between tables and views?
    Hope you all can reply to this matter.
    Regards,
    Alias

    Hi Alias,
    Designer has the capability to import tables and views you cna use in the design of the universe. Furthermore, you can also create a derived table in the universe - in simple terms it is much like a view, but the code is in the universe availble to the universe designer.
    With all this available to you, it is pretty much up to you how you want to tackle the design. I would say first prise is using the physical tables in the databse, then move to using a view and if there are certain restrictions on the designer, use the derived tables.
    Remeber this, at the end of the day, any SQL code generated or used is passed down to the database to be processed, may it be the query from the universe directly on the tables or by means of the views or derived tables - the database server will need to crunch through it all - and this is what will determine your performance.
    Regards
    Jacques

  • Cannot export Financial Report from HTML view to Query Ready Mode

    Hi,
    I am opening Hyperion Financial Reports in Workspace in HTML mode. On the bottom right of the report, when I click on "Export in Query Ready Mode", the report does not get transported to excel. Rather, a message flashes for a split-second and disappears. The message is "The address is not valid". Can anyone please advise as to what should I do to get the report in excel? I did notice that there is also File->Export->Excel->Fully Formatted Grids & Texts, but we want to get it in Query Ready Mode.
    Version is 11.1.1.3. Thanks for any suggestions.
    ABG

    We have resolved this issue. The problem was that Smart View installation/configuration was not complete on the machine which I used to launch report into Query Ready Mode. Once Smart View was fixed, we were able to convert report from HTML view to Query Ready Mode.
    ABG

  • Using XL reporter view in query generator

    is it possible to use XL report views in query generator ?

    Yes, they XLR views start with ixv.
    Jim

  • View Command/Query Without Connection?

    I need to reverse engineer an old report so that I can reconstruct it using a new database.  The report used the Command feature, and I am fairly certain the fields being called into the report are not renamed, but I need to see which tables were used - how can I view the query without setting up a connection to the database?  (There are over 100 tables in the current database, with many replications of field names, so they are insufficient in determining the need - the old database is no longer in existence, and there was no data dictionary for it, so I cannot access it or recreate it).
    CR wants me to create a connection or log in before I can view the query, and I'm not finding a way around that ...
    Any ideas?
    thanks!

    I had already tried that before posting - CR "fixes" things to correlate with a new database, so the query bound to another database that is similar (if I had access to one, which I don't) would be altered to reflect the new database.
    The entire purpose of trying to get the query is to get the table names used in the original/missing database, and that's what I can't figure out how to do.  CR is requiring a logon to a database before allowing me to view the query that was typed in, but in so doing the query is altered.

  • Different in viewing the query in query designer and bex analyzer in BW Prd

    hello...i transported the query from bw dev into bw prod successfully. when i view the query using query designer in prod, the query is the same copy of query in bw dev and QA but when i view the same query under the bex analyzer in prod, the query is not the same.
    the correct query should be able to see 3 mandatory variable input but when i view it under the bex analyzer, only 1 mandatory variable can be seen here. Whereas when i view it under query designer, i can see the 3 mandatory variable being define there. And this query is assigned in one of the role as well.
    any idea on this? thanks!!!

    i checked in rsrt in sap, the personalization of the variable is not in yellow color, i can see the 3 variable in bex analyzer but the other 2 variable which is a mandatory field input for that query appear as optional variable input instead of the mandatory field input...

  • Views in query designer

    Hi,
    can you please tell .
    In the tcode:RSRT1 we have View What does it mean?
    Can we create views in query designer?
    Can we use the dictionary views in query designer?
    Can you please tell about?
    Regards
    Naresh

    Hi Naresh.
    RSRT1 is used to view the output of queries as well as views.
    This is the reason why you see the option to input view.
    the difference between RSRT and RSRT1 is as follows
    rsrt allows only queries to be executed and provides output in List as well as HTML format
    rsrt1 allows you to execute views as well as queries and in HTML format.
    hope this helps,
    Sri...

  • Unable to View SQL query

    Hi, I was trying to view the SQL of a crystal report connected to Oracle11 DB via native connection. But the "show SQL option " under database menu is greyed out. can someone please let me know the reasons behind this greying out of the option . Is there any way I can view the query of this report??

    Thank You for the quick response. The report is created on a single table . This table's fields are placed in the subreport which is placed at the footer section of the Main report. The main report just holds the column header. I hope its clear.

  • DIFF. between Quick Viewer and Query Builder

    Hi experts,
    can any body explain the difference between Quick Viewer and Query Builder with examples and can u forward the related material( how to create Quick Viewer and Query Builder ) other than help.sap.com.
    useful answers duly rewarded
    thanks in advance
    sai krishna

    my mail id: was [email protected], please send me the material
    i will assign the points
    thanks in advance
    sai krishna

  • Issue with View object query

    Hi,
    I have extended my controller to add an additional condition to the view object query where I appen an add condition.If there is any kind of exception the add condition keeps on appending without refreshing the query to the orginal one.I have to clear the cache to be able to fix it
    below is the peice of code.What should I do to be able to get the original query or refresh it because when i do a getQuery it keeps giving me the query with the earlier condition that I appended and again appends the new condition.
    strQuery = oaviewobjectimpl.getQuery();
    oaviewobjectimpl.setQuery(strQuery+" AND MtlCategoriesKfv.CONCATENATED_SEGMENTS = '"+strCategory+"'");
    RequisitionAMImpl requisitionamimpl1 = (RequisitionAMImpl)oapagecontext.getApplicationModule(oawebbean);
    OAViewObjectImpl oaviewobjectimpl = requisitionamimpl.getReqCategoryVO();
    String strQuery = oaviewobjectimpl.getQuery();
    oaviewobjectimpl.setQuery(strQuery+" AND MtlCategoriesKfv.CONCATENATED_SEGMENTS = '"+strCategory+"'");
    oaviewobjectimpl.setWhereClauseParams(null);
    oaviewobjectimpl.setWhereClauseParam(0, oapagecontext.getCurrentLanguage());
    if(oapagecontext.isLoggingEnabled(1))
    oapagecontext.writeDiagnostics(this, "oaviewobjectimpl.getQuery() "+oaviewobjectimpl.getQuery(), 1);
    oaviewobjectimpl.executeQuery();
    oaviewobjectimpl.last();
    if(oapagecontext.isLoggingEnabled(1))
    oapagecontext.writeDiagnostics(this, "oaviewobjectimpl.getFetchedRowCount() "+oaviewobjectimpl.getFetchedRowCount(), 1);
    ReqCategoryVORowImpl reqcategoryvorowimpl= (ReqCategoryVORowImpl)oaviewobjectimpl.first();
    Number categoryId = reqcategoryvorowimpl.getCategoryId();

    user610276 ,
    Y don't u make a custom VO, as you are doing set query, i expect ur changing entire query of seeded VO, better to use custom VO here and attach it to required beans progrmatically.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Pictures and Music on SD is not showing in Music or Pictures applications

    I just transferred my 32GB microSD from my 9900 to my Z30, non of my existing music or pictures are showing up in respective apps. They are available through file browser app in BB10, but do not show up in player apps. Also when I put the SD card in,

  • Firefox runs in background (appear in Task Manager Processes Tab) only and does not appear on Desktop

    I have been using Firefox on my Desktop PC with Windows XP for a long time. However, today possibly due to some virus (I attached an infected flash drive to my PC) a suspicious change in homepage (www.delta-homes.com) of my firefox occurred. Simultan

  • My software will not let me "cut" selected audio

    I am running windows 8...Lenovo computer...plenty of disk space etc. I used the following activation code to install Adobe Audio 3.0 on this computer. -------------------- [removed] Installation process went fine...but when I open up a file to edit,.

  • ICal Server running but not Running

    I'm trying to get iCal server working. It looks as if it is running from within ServerAdmin but when I try to log in to iCal from Safari I keep getting the error Unable to Access calendar, because the calendar server is not running. Any help would be

  • Touchsmart IQ500uk

    Hi, Im looking for some help. My touchsmart keep hanging every now and then and i have to push the power button to restart the pc. So far I have restored back to factory settings twice in the last two day, but that does not seem to make mch differenc