Group data with multi tables in report.rdlc

I have a report.rdlc which contains 8 tables and every table reads from different dataset which also reads from different procedure, these tables finally view data for one employee, and this was working correctly. Now I need to view the same report but
for multi employees, I don't know how to make one group(employee number) for the 8 tables although they have different datasets and procedures
this is a Pressing problem
please help me

Hi nermo,
According to your description, you want to display 8 tables in detail rows group on employee number. So it will have 8 tables for each employee. Right?
In this scenario, we can create a dataset whick only return the employee number and put the employee number into a table. Put the 8 tables into 8 separated reports, then add these reports as subreports into detail row. It will display these data even they
are from 8 different dataset. If you want to filter the records in those tables based on the employee number. You need to have the Employee parameter in both main report and subreports and pass the parameter to run subreports. We have tested in this scenario
in our local environment. Here are screenshots for your reference:
Reference:
SSRS Subreport Parameter Passing Issue
If you have any question, please feel free to ask.
Best Regards,
Simon Hou

Similar Messages

  • Change crystal report data source dynamically failed with multi tables report

    hello all
    i have many reports created by someone else on his own machine using same database file i use
    my application use Visual studio 2013 win form with crystal report pack 9
    i use rpt files provided to me
    connect database use OLEDB
    to show form i use below code
    SQLstr = " select what ever  from  table "                      ' defined as Public
    reportName = rpt file path & report name
    showReport()
    public sub showReport()
    reportTable.clear()                                                       ' defined as Public
    DBAdapter = new oleDpdataAdapter(SQLstr,DBconnection)
    DBAdapter.fill(reportTable)
    dim rptDoc as new Crystaldesicin.crystalreports.Engine.ReportDocument
    rptDoc.load(reportName)
    rptDoc.setdatasource(reportTable)
    formRpt.RptViewer.reportsource = rptDoc
    formRpt.showdialog()
    now
    when i use one table report with (select from one table) >>>>> works perfectly
    but when i use report retrieve data from 2 tables and group   data like using
    SQLstr = " select 'table'.'coulumn', 'table2'.'column' ....... etc
    from 'table1'
    INNER JOIN 'table2' ON 'table'.'coulumn' = 'table2'.'column'
    it's not working and formrpt shown but asking for database login
    I noted that in database login window : server name refer to ORIGINAL DATABASE USED BY Report Creator not to my local database
    ================================================
    i tried to set
    rptDoc.datasourceconnection.item(0).setconnection("","databse file path and name", False)
    rptDoc.datasourceconnection.item(0).setlogin("admin","")
    but the same
    using dataset instead of reportTable the same error
    ================================================
    what i missed in this type of reports?
    ( apologize about long take and poor English )

    Hi
    Please have a look at the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • How to group data from two tables ?

    Hello,
    I have two tables and i want to group data from them but two table not linked.
    Table TEXT_IN : ID_IN (primary_key), DATE_IN
    Table TEXT_OUT : ID_OUT(primary_key),DATE_OUT
    Example :
    Result :Group Date and Order by IN,OUT
    And It seems a bit
    confusing because we do not link
    .You can give me solutions.
    Thank you.

    SELECT MAX(CASE WHEN Rn = 1 THEN [IN] END) AS [IN1],
    MAX(CASE WHEN Rn = 1 THEN [OUT] END) AS [OUT1],
    MAX(CASE WHEN Rn = 2 THEN [IN] END) AS [IN2],
    MAX(CASE WHEN Rn = 2 THEN [OUT] END) AS [OUT2],
    MAX(CASE WHEN Rn = 3 THEN [IN] END) AS [IN3],
    MAX(CASE WHEN Rn = 3 THEN [OUT] END) AS [OUT3],
    MAX(CASE WHEN Rn = 4 THEN [IN] END) AS [IN4],
    MAX(CASE WHEN Rn = 4 THEN [OUT] END) AS [OUT4],
    MAX(CASE WHEN Rn = 5 THEN [IN] END) AS [IN5],
    MAX(CASE WHEN Rn = 5 THEN [OUT] END) AS [OUT5],
    FROM
    SELECT COALESCE(m.DATE_IN,n.DATE_IN) AS DATE_IN,
    COALESCE(m.Seq,n.Seq) AS Seq,
    ID_IN AS [IN],
    ID_OUT AS [OUT],
    ROW_NUMBER() OVER (PARTITION BY Seq ORDER BY COALESCE(m.DATE_IN,n.DATE_IN)) AS Rn
    FROM
    SELECT ROW_NUMBER() OVER (PARTITION BY DATE_IN ORDER BY DATE_IN) AS Seq,*
    FROM TEXT_IN
    )m
    FULL OUTER JOIN
    SELECT ROW_NUMBER() OVER (PARTITION BY DATE_IN ORDER BY DATE_IN) AS Seq,*
    FROM TEXT_OUT
    )n
    ON n.Seq = m.Seq
    AND n.DATE_IN = m.DATE_IN
    )t
    GROUP BY Seq
    to make it dynamic see
    http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/dynamic-crosstab-with-multiple-pivot-columns.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help with multi-table mapping for one-to-many object inheritance

    Hi,
    I have posted on here before regarding this (Toplink mapping for one-to-many object inheritance but I am still having problems mapping my object model to my schema.
    Object model
    The Person and Organisation objects contain base information and have the primary keys person_id and organisation_id. It is important that there is no duplication of person and organisation records, no matter how many times they are saved in different roles.
    There are two types of licenceholder in the problem domain, and the ILicenceHolder interface defines information and methods that are common to both. The PersonalLicenceHolder object represents one of these types of licenceholder, and is always a person, so this class extends Person and implements ILicenceHolder.
    The additional information and methods that are required by the second type of licenceholder are defined in the interface IPremisesLicenceHolder, which extends ILicenceHolder. Premises licence holders can either be people or organisations, so I have two objects to represent these - PremisesLicenceHolderPerson which implements IPremisesLicenceHolder and extends Person, and PremisesLicenceHolderOrganisation which implements IPremisesLicenceHolder and extends Organisation.
    The model is further complicated by the fact that any single Person may be both a PersonalLicenceHolder and a PremisesLicenceHolderPerson, and may be so several times over. In this case, the same basic Person information needs to be linked to several different sets of licenceholder information. In the same way, any single Organisation may be a PremisesLicenceHolderOrganisation several times over.
    Sorry this is complicated!
    Schema
    I have Person and Organisation tables containing the basic information with the primary keys person_id and organisation_id.
    I have tried to follow Donald Smith's advice and have created a Role table to record the specialised information for the different types of licence holder. I want the foreign keys in this table to be licenceholder_id and licence_id. Licenceholder_id will reference either organisation_id or person_id, and licence_id will reference the primary key of the Licence table to link the licenceholder to the licence. Because I am struggling with the mapping, I have changed licenceholder_id to person_id in an attempt to get it working with the Person object before I try the Organisation.
    Then, when a new licenceholder is added, if the person/organisation is already in the database, a new record is created in the Role table linking the existing person/organisation to the existing licence rather than duplicating the person/organisation information.
    Mapping
    I am trying to use the toplink mapping workbench to map my PremisesLicenceHolderPerson object to my schema. I have mapped all inherited attributes to superclass (Person). The primary table that the attributes are mapped to is Person, and I have used the multi-table info tab to add Roles as an additional table and map the remaining attributes to that.
    I have created the references PERSON_ROLES which maps person.person_id to roles.person_id, ROLES_PERSON which maps roles.person_id to person.person_id and ROLES_LICENCE which maps roles.licence_id to licence.licence_id.
    I think I have put in all the relationships, but I cannot get rid of the error message "The following primary key fields are unmapped: PERSON_ID".
    Please can somebody tell me how to map this properly?
    Thank you.

    I'm not positive about your mappings, but it looks like the Person object should really have a 1:M or M:M mapping to the Licenceholder table. This then means that your object model should be similar, in that Person object could have many Licenses, instead of being LicenceHolders. From the looks of it, you have it set up from the LicenceHolder perspective. What could be done instead if a LicenceHolder could have a 1:1 reference to a person data object, rather than actually be a Person. This would allow the person data to be easily shared among licences.
    LicenceHolder1 has an entry in the LicenceHolder table and Person table. LicenceHolder2 also has entries in these tables, but uses the same entry in the Person table- essentially it is the same person/person_ID. If both are new objects, TopLink would try to insert the same person object into the Person table twice. I'm not sure how you have gotten around or are planning to get around this problem.
    Since you are using inheritance, it means that LicenceHolder needs a writable mapping to the person.person_id field- most commonly done through a direct to field mapping. From the description, it looks like roles.person_id is a foreign key in the multiple table mapping, meaning it would be set based on the value in the person.person_id field, but the person.person_id isn't actually mapped in the object. Check to make sure that the ID attribute LicenceHolder is inheriting from person hasn't been remapped in the LicenceHolder descriptor to a different field.
    Best Regards,
    Chris

  • Number of record  with multi-table insert

    Hi,
    I need to insert into 3 different tables from one big source table so I decided to use multi-table insert. I could use three inserts statements but the source table is an external table and I would prefer not reading it three times.
    I wonder if there is a way to get the exact number of records inserted in each one of the tables?
    I tried using rowcount but I all I get is the number of rows inserted in all three tables. Is there a way to get this info without having to execute a "select count" in each table afterward?
    Thanks
    INSERT /*+ APPEND */
    WHEN RES_ENS='PU' THEN
    INTO TABLE1
    VALUES(CD_ORGNS, NO_ORGNS, DT_DEB, SYSDATE)
    WHEN RES_ENS='PR' THEN
    INTO TABLE2
    VALUES(CD_ORGNS, UNO_ORGNS, DT_DEB, SYSDATE)
    ELSE
    INTO TABLE3
    VALUES(CD_ORGNS, NO_ORGNS, DT_DEB, SYSDATE)
    SELECT ES.CD_ORGNS CD_ORGNS, ES.RES_ENS RES_ENS, ES.DT_DEB DT_DEB, ES.NO_ORGNS NO_ORGNS
    FROM ETABL_ENSGN_SUP ES

    I have a large number of data to load in those three tables. I do not want to use PL/SQL (with loops and lines of codes) because I can do the insert directly from the source table and it saves a lot of time.
    INSERT /*+APPEND*/
    WHEN condition1 THEN
    INTO table1
    WHEN condition2 THEN
    INTO table2
    SELECT xx FROM my_table
    For example, if my_table has 750000000 rows, I only need to read it once and the INSERT..SELECT is a really fast way to load data.
    As I was saying, the only problem I've got, is that I cannot get the number of rows in each table. Do you know a way to get it?

  • Issue with Multiple Tables in Report

    Post Author: dwessell
    CA Forum: General
    Hi,
    I'm using Crystal Reports 2k8.
    I'm doing a report with three tables, CQ_HEADER, SO_HEADER and SALESPERSON. Both the CQ_HEADER and the SO_HEADER tables link to the SALESPERSON table via a SPN_AUTO_KEY field.
    However, I always receive duplicates in my result set, due to the joins made, and I don't receive results that are valid in one table, and empty in another (Such that it only counts a CQ, if there is a SO associated with it. Here's the query that's produced by CR.
      SELECT "CQ_HEADER"."CQ_NUMBER", "CQ_HEADER"."ENTRY_DATE", "CQ_HEADER"."TOTAL_PRICE", "SALESPERSON"."SALESPERSON_NAME", "SO_HEADER"."ENTRY_DATE", "SO_HEADER"."TOTAL_PRICE"
    FROM   "CQ_HEADER" "CQ_HEADER" INNER JOIN ("SO_HEADER" "SO_HEADER" INNER JOIN "SALESPERSON" "SALESPERSON" ON "SO_HEADER"."SPN_AUTO_KEY"="SALESPERSON"."SPN_AUTO_KEY") ON "CQ_HEADER"."SPN_AUTO_KEY"="SALESPERSON"."SPN_AUTO_KEY"
    WHERE  ("CQ_HEADER"."ENTRY_DATE">={ts '2007-12-01 00:00:00'} AND "CQ_HEADER"."ENTRY_DATE"<{ts '2007-12-18 00:00:00'}) AND ("SO_HEADER"."ENTRY_DATE">={ts '2007-12-01 00:00:00'} AND "SO_HEADER"."ENTRY_DATE"<{ts '2007-12-18 00:00:00'})
    ORDER BY "SALESPERSON"."SALESPERSON_NAME"
    There is no link between the SO_HEADER and the CQ_HEADER.  Can anyone make a suggestion as to how I could go about structuring this such that it doesn't return duplicate values?
    Thanks
    David     

    Hey,
    I understand you used Retainsameconnection property true for all the OLEDB connections you used in the package if not make sure its for all the connection including file connection as well.
    Additionally, you can try to set Delayvalidation property to true for all the dataflows and control flows in the connection and try running the package for 10MB file.
    I hope this will fix the intermittent failure issue you are facing with SSIS.
    (Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker)
    Thanks,
    Atul Gaikwad.

  • How to clone data with in Table with dynamic 'n' number of columns

    Hi All,
    I've a table with syntax,
    create table Temp (id number primary key, name varchar2(10), partner varchar2(10), info varchar2(20));
    And with data like
    insert itno temp values (sequence.nextval, 'test', 'p1', 'info for p1');
    insert into temp values (sequence.nextval, 'test', 'p2', 'info for p2');
    And now, i need to clone the data in TEMP table of name 'test' for new name 'test1' and here is my script,
    insert into Temp  select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test1';
    this query executed successfully and able to insert records.
    The PROBLEM is,
    if some new columns added in TEMP table, need to update this query.
    How to clone the data with in the table for *'n' number of columns and*
    some columns with dynamic data and remaining columns as source data.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 10:37 AM

    Hi,
    Thanks for the quick reply.
    My Scenario, is we have a Game Details table. When ever some Game get cloned, we need to add new records in to that Table for the new Game.
    As, the id will be primary key, this should populate from a Sequence (in our system, we used this) and Game Name will be new Game Name. And data for other columns should be same as Parent Game.
    when ever business needs changes, there will be some addition of new columns in Table.
    And with the existing query,
    insert into Temp (id, name, partner, info) select sequence.nextval id, 'test1' name, partner, info from TEMP where name='test'_
    will successfully add new rows but new added columns will have empty data.
    so, is there any way to do this, i mean, some columns with sequence values and other columns with existing values.
    One way, we can do is, get ResultSet MetaData (i'm using Java), and parse the columns. prepare a query in required format.
    I'm looking for alternative ways in query format in SQL.
    Thanks & Regards
    PavanPinnu.
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM
    Edited by: pavankumargupta on Apr 30, 2009 11:05 AM

  • Help with multi-table join

    Hello -
    HELP!!!!! I need to join the following tables so I can compare the totals of colVal1+colVal2+colVal3  in tblIMP with ColTOTAL_NVal in AnotherDB.dbo.BL
    Below are the important columns along with relationships from the tables.  Is this even possible?
    tblIMP
    PK IMP integer
    TNum
    colVal1
    colVal2
    colVal3
    colVal4
    tblSC
    PK IntCNum numeric(7,)
    FK ISN numeric(8,0)
    TNum
    tblSD
    PK IntSLNum  numeric(7,0)
    FK ISN
    tblSH
    PK ISN numeric(8,0)
    Sh_ID nvarchar(25)
    AnotherDB.dbo.BL
    PK BL_ID integer
    Sh_ID nvarchar(100)
    ColTOTAL_NVal
    TNum in tblIMP has duplicates (not for the row, but for TNum itself)
    TNum in tblSC has duplicates also (not for the row, but for TNum itself)
    tblSH has a one-to-many relationship with tblSC;
    tblSH has a one-to-many relationship with tblSD;
    tblSD has a one-to-many relationship with tblSC
    tblSC is a recursive table – think container with many TNum in it
    ANY HELP AT ALL WILL BE APPRECIATED!!!
    Juniormint

    Thanks for your response, Latheesh.
    I would have posted the DDL, sample data and desired output, but I'm on a contract job and am unable to divulge that information.  Is there anything that is not understandable with what I have posted?  If so, please let me know.
    Juniormint
    You need to atleast explain us with some INDICATIVE data how your tables hold information and how you want the output to appear. Otherwise its hard for us by just looking at some table structure alone as we cant see your system neither knows your rules.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Grouping Data with JSP or JSTL

    Hi All,
    I would like to ask a question about how I can group data in JSP. Essentially, I have a DataBean (extends ArrayList) that is being returned to my JSP. The ArrayList contains HashTables. Please note that the JSP assumes the data is returned in sorted order. This JSP is not responsible for sorting the data itself.
    [UPDATED EXAMPLE]
    For example, here is what the data might look like:
    Column A Column B Column C
    1 2 3
    1 15 20
    4 5 6
    4 99 66
    7 8 9
    10 11 12
    Here is how I would use my DataBean:
    String column1Name =bundle.getString(�columnA.title�);
    String column2Name =bundle.getString("columnB.title");
    String column3Name =bundle.getString("columnC.title");
    /* Loop through the bean. */
    for (int i=1;i<myDataBean.size();i++) {
    Hashtable reportRow=myDataBean.get(i);
    String column1Value=reportRow.get(Constants.COLUMNA);
    String column2Value=reportRow.get(Constants.COLUMNB);
    String column3Value=reportRow.get(Constants.COLUMNC);
    }Question
    If I want to change my layout/display to group by a particular column. How would I do that without changing the data structure that is running my current DataBean? Below is an example of grouping by the values in ColumnA.
    ColumnA: 1
    ColumnB ColumnC
    2 3
    15 20
    ColumnA: 4
    ColumnB ColumnC
    5 6
    99 66
    ColumnA: 7
    ColumnB ColumnC
    8 9
    ColumnA: 10
    ColumnB ColumnC
    11 12
    Your help is very much appreciated.
    Thanks!

    Just curious, do people find my question unclear? Can I help clarify any points?

  • Strange issue with Multi-Table LTS and report filters (10g)

    Hi,
    I am having some troubles with the following scenario:
    I have a large flattened table that is being used as both Fact and Dimension in the BMM layer. I also have another table that contains some supplementary measures needed by some reports.
    Logical Fact table has an LTS that consists of the 2 tables which are joined on 2 columns (eg, a.col1 = b.col1 and a.col2 = b.col2, etc). The columns used in the join also exist in the logical dimension which uses the same flattened table. I use these columns in my report filters.
    I have created some Fact measures, some from each source inside the LTS.
    What's happening is that when I am using this model in Answers, the query being generated is applying my filtering conditions to both tables, which seems unnecessary to me since they are joined on these columns.
    i.e.,
    select *
    from table1 a, table2 b
    where a.col1 = b.col1
    and a.col2 = b.col2
    and a.col1 = 'Value 1'
    and a.col2 = 'Value 2'
    and b.col1 = 'Value 1'
    and b.col1 = 'Value 2'
    The last two lines in the query above should not be happening. I have not mapped these columns anywhere in the BMM to table2 (other than physical layer join), only to table1.
    For clarification, it's not hurting the end results from what I've seen, but it is adding additional filtering to the query that can increase overall cost, which I'm trying to avoid.
    Any ideas/suggestions?
    Thanks
    Edited by: odinsride on Jan 31, 2012 5:03 PM

    Hi,
    I think this is a known issue. I think that the BI Server pulls in both the tables involved in the LTS for any query (Yes, even if the query has only one column from any of the tables in LTS) and so are the filters.
    In this case, what I would suggest you is to create 2 LTS (probably 3). One for each physical table (that are being joined in the LTS) and one for both of them joined (may be inner/left/right) etc.
    With this kind of setup, when there are reports for any particular column of this logical table, the BI Server can go and choose the corresponding LTS only. However, if there is a report with columns from both the tables, the BI Server would choose the LTS with the join.
    Hope this helps.
    Thank you,
    Dhar

  • Combining data from multiple tables into report

    I'll try my best to describe my issue accurately.
    I bring in two tables and link them together in my report. First table is a Location table.   I create a running total field to summarize the location details in order to to produce total square footage for each location.  Let's say the total square footage for Building A is 100,000 ft.².
    The second table is an Employee table. This table lists the details of each employee. Each employee record contains a location ID that allows me to link this table to the Location table.  Within the report I create a running total field to summarize the total number of employees for each location.  Let's say the total number of employees for building a is 12.
    Now, I have a group footer which contains the name of each location. Next to the location name I insert my first running total field which summarizes the location details and provides the total square footage.  In my example Building A = 100,000 square-foot.
    now I'm ready to insert my second running total field which summarizes the number of employees within each location. In my example, Building A =12 employees.  The moment I insert my second running total field, the square footage from the first running total field changes to 1,200,000 ft.². I can see the correlation between the number of employee records which is 12 and the change in square footage.
    Where am I going wrong??  Please help....
    THANKS

    Please post DDL+DML!
    DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
    can execute any query.
    How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
    DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
    sample data.
    If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps to identify issues,
    clarify terminology and prevent incorrect assumptions.  Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
    [Personal Site] [Blog] [Facebook]

  • Slow performance while integrating data with ODI while open report

    In ODI i have a schedulled package that runs every 4 hours, this package loads data from an DB table to BAM.
    Normally each execution loads about 4000 records and takes about 7 seconds to be completed.
    However, in some executions the same 4000 records take about 30 minutes to be loaded into BAM; normally this happens when a user has a BAM report open in the browser.
    Regards
    Hugo Calado
    Edited by: user12198856 on 23/Ago/2011 3:45

    Hi Manisha,
    When previewing a report, Report Designer need connect to the report data sources, run dataset queries, cache the data on the local computer, process the report to combine data and layout, and render the report. The report processor also runs all the queries
    for datasets in the report using the current parameter defaults, and saves the results as a local data cache (.rdl.data) file.
    The first time that previewing a report that relies on a server reference. In your scenario, you can try to improve preview performance through the link below:
    http://technet.microsoft.com/en-us/library/ee240846.aspx
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Combination of Data from Two Tables in Report

    Hi,
    I am currently building a financial report that pulls data from the activity table. Currently, it displays each activity record, i.e. a date field, a transaction source field, transaction source description and transaction amount. I have another file that pulls saved transactions not part of the activity table. I need to somehow list records from both of these tables together, sorted by date order in the detail section of my report.
    I am still relatively new to this, perhaps this is something obvious?  Is there some way of merging the records from the activity table and the saved transaction table via a formula field?
    Thanks,
    Dave

    ok...if i'm understanding this correctly, you have a date field in both tables and you want to sort by both these fields as if they were one?
    if thats the case, your best bet is probably to create a SQL select statement using the UNION command. In effect creating one table from the two. see http://www.w3schools.com/sql/sql_union.asp
    then, in database expert add a Command using your SQL statement.
    hope that's of use!
    regards,
    dom
    haha....i was beaten to it!
    Edited by: Dom Horton on Oct 29, 2009 2:21 PM

  • Performanc Issue with KNVV table in report

    Hi,
    There is a report doing querry on KNVV and taking 93% of the database time. It retreives around 3 lacs records form this table and sometimes give time out error also.
    All the primary keys are meeting and all required fields are getting selected from the table.
    Is there any way out to improve the performance in this case. Would it be a good idea to create a secondary index on this table.
    I would really appriciate if any one can help me out on this.
    Many thanks in Advance.
    Regards
    Ria

    Hi Ria,
    That looks to me about as efficient as you can make it.
    Try not to use into corresponding fields if you can help it. That should improve performance a bit.
    Maybe you can try the following:
    data: begin of t_reqd occurs 0,
            kunnr  like knvv-kunnr,
            bzirk  like knvv-bzirk,
          end of t_reqd.
    * Because we are selecting KUNNR and BZIRK and T_REQD has
    * KUNNR and BZIRK defined IN THAT ORDER we can just use
    * INTO TABLE. This will improve performance.
    select kunnr bzirk
           from knvv
           into table t_reqd
           where kunnr in s_kunnr and
                 vkorg eq w_vkorg and
                 vtweg eq w_vtweg and
                 spart eq w_spart.
    delete t_reqd where not bzirk in s_bzirk.
    Hope this helps.
    Cheers,
    Pat.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • HTML Client Entering/Editing Data With Multiple Tables

    Hi guys,
    I've been stumped on what seems to be a relatively simple problem for quite some time now. I have a bunch of Products - Dairy, Meat, Produce and Candy, for example. Each Product has multiple ProductConfigurations - say, Monday, Tuesday, Wednesday, Thursday,
    and Weekend. Each Product also has its own unique set of ProductAttributes; Meat may have Animal, ExpirationDate, CostPerPound, Kosher for example, while Candy may have Type, Manufacturer, Price, Distributor, and Dairy may have Source, ExpirationDate, UnitCost.
    These are just examples, but the point is each Product has unique ProductAttributes. 
    For each ProductConfiguration (which has a Product), I want to be able to go to this ProductConfiguration and see a list of all its ProductAttributes, and provide an option to edit the ProductAttributeValue (a separate table) for each ProductAttribute. A
    ProductAttributeValue has a Value, a ProductAttribute (ie, Manufacturer) and a ProductConfiguration (ie, Tuesday).
    The way I currently have it set up is with a clickable List of all ProductAttributes for a given Product (which I get by querying the filter 'ProductAttribute.ProductID = Screen.ProductID' from the ProductAttributes tables). When you click, it brings up
    an 'AddNewProductAttributeValue' screen, in which the ProductAttribute is already populated. However, this requires a looot of clicks for Product(Configurations) which have many ProductAttributes. I'd love to be able to configure all of the ProductAttributeValues
    for a given ProductConfiguration on one screen.
    Any ideas how I could do this?

    Matt, there are two bits to get the in-built table to play nicely.
    // This makes the input textbox focus work better
    myapp.AddEditProductConfiguration.created = function (screen) {
    var scr = screen;
    scr.ProductAttributeValues.addChangeListener("selectedItem", function (eventArgs) {
    if (scr.ProductAttributeValues.selectedItem != null) {
    var item = scr.ProductAttributeValues.selectedItem;
    setTimeout(function () {
    $("input", item.details.focusElement).focus();
    }, 100);
    myapp.AddEditProductConfiguration.Value_postRender = function (element, contentItem) {
    contentItem.details._details.focusElement = element;
    ... the maintenance screen is based on a standard 'AddEdit<entity>' screen tweaked and in msls-2.5.2.js (or earlier) ...
    case $.mobile.keyCode.TAB:
    //Xpert360: tab
    //updateSelectedHeader(table, table._headerRowElement[0]);
    break;
    ... to stop the keyup handler messing up tabbing between input textboxes.
    Some code similar to this could pre-populate (or verify) that a configuration has rows of ProductAttributeValues matching ProductAttributes ...
    scr.getProductAttributeValues().then(function (values) {
    if (scr.ProductAttributeValues.count <= 0) {
    scr.getProductAttributes().then(function (values) {
    if (scr.ProductAttributes.count > 0) {
    scr.ProductAttributes.data.forEach(function(attr, idx, obj){
    var attrvalue = scr.ProductAttributeValues.addNew();
    attrvalue.ProductAttribute = scr.ProductAttributes.data[idx];
    attrvalue.ProductConfiguration = scr.ProductConfiguration;
    attrvalue.Value = "";
    ... which could be used in a variety of places.
    I will look to uploading the sample application.
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

Maybe you are looking for

  • Reading contents of floppy in client pc and copying them into webserver

    hii, i am stuck with the following problem.I am developing an application in jsp which has a module that will check the entire contents of a floppy drive in the client pc if it is present and copy the contents into a folder in the web server.I am not

  • Last Evaluated Price

    Hi All, Any idea what is the last evaluated price? I have used this price for Inventory in Warehouse report under this price but some items appear with price but some is without. Hope some one is able to give example as well, thanks. Regards, MH

  • NB200 Windows 7 Fn key not working with ESC and F1 to F8 keys

    I recently bought a Toshiba NB200-136 and everything worked fine. Flash cards on top/bottom of the screen work with Space, ESC and F1 to F8 keys, the rest of function buttons work without showing the cards. Lately the cards stopped showing and I cann

  • OTV load-balancing

    Hi, I have 4 N7Ks (2 in each site A and B) which have OTV VDC. There are 2 WAN FO links between each pair of N7Ks like this: [OTV-A-1]-----[N7K-A-1]-----L3-----[N7K-B-1]-----[OTV-B-1]                           |                                 |     

  • Adobe Security Pop-up & Links Not Working

    Folks, Within my Captivate 4 project I have links going to several locations to access supporting information (e.g., job aids, LMS). When I click on the link from a published version of the project, I get a message from "Adobe Flash Player Security".