Get all records in multi selected master child tables

Hi,
I am using JDeveloper 11.1.1.4 version and using ADF-BC in my project.
I have a simple master child[one to many] relationship in my project.
In my view page,I display this master child [Ex: EmpVo1--->DeptVo2] as tables.
I have multi-slection enabled for master table.
My requirement is that,on multi selecting the rows in master tables,I want to get all the child records in my backing bean.
that is if a master row has 3 child records and another master row has 4 child records and on multiple selection of these two records in master table,I should get all the child records in my backing bean.
I need this to implement cascade delete functionality.
Following is sample piece of code
1) called on selecting the rows in master table
public void onRSCGrpSelect(SelectionEvent selectionEvent) {
// Add event code here...
ADFUtil.invokeEL("#{bindings.RscGroupVO1.collectionModel.makeCurrent}",
new Class[] { SelectionEvent.class },
new Object[] { selectionEvent });
RowKeySet rowKeySet = (RowKeySet)tblRSCGrp.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)tblRSCGrp.getValue();
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData =
(JUCtrlHierNodeBinding)cm.getRowData();
Row row = rowData.getRow();
System.out.println("\n" +
row.getAttribute(0) + " :: " + row.getAttribute(1) +
" :: " + row.getAttribute(2));
System.out.println("Displaying Child Records");
displayChildRecords(row.getAttribute(0));
2. private void displayChildRecords(Object rscGrp) {
ViewObject rscMapVo = getRscMapViewObj();
RowSetIterator rsI = rscMapVo.createRowSetIterator(null);
while (rsI.hasNext()) {
Row row = rsI.next();
System.out.println("\n" +
row.getAttribute(0) + " :: " + row.getAttribute(1) +
" :: " + row.getAttribute(2));
rsI.closeRowSetIterator();
But the problem is that ,it is always giving me the last selected rows child record details
Please suggest the error I am doing.
Thanks,
Praveen

Your problem is that you use makecurrent, which should not be used on a multi select table. Next if you have master detail relationship you should have a view link between them. In this case you can expose a method in you master to get the related child row. No need to get the VO itself as you can use the child iterator accessors to get the child record.
public void onRSCGrpSelect(SelectionEvent selectionEvent) {
// Add event code here...
RowKeySet rowKeySet = (RowKeySet)tblRSCGrp.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)tblRSCGrp.getValue();
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData =
(JUCtrlHierNodeBinding)cm.getRowData();
Row row = rowData.getRow();
//cast to the right row class
EmpEmpVoRow empRow = (EmpEmpVoRow) row;
// now you cann access the child row iterator
RowSetIterator it = empRow.getDepVO();
//now you cna iterate over the child rows
System.out.println("\n" +
row.getAttribute(0) + " :: " + row.getAttribute(1) +
" :: " + row.getAttribute(2));
System.out.println("Displaying Child Records");
//use hte child rows here
}Not sure if the code compiles out of the box (doing this on the train :-)
Timo

Similar Messages

  • Get all values from multi select in a servlet

    Hello,
    I have a multi <select> element in a HTML form and I need to retrieve the values of ALL selected options of this <select> element in a servlet.
    HTML code snippet
    <select name="elName" id="elName" multiple="multiple">
    Servlet code snippet
    response.setContentType("text/html");
    PrintWriter out = null;
    out = response.getWriter();
    String output = "";
    String[] str = request.getParameterValues("elName");
    for(String s : str) {
    output += s + ":";
    output = output.substring(0, output.length()-1); // cut off last deliminator
    out.println(output);But even when selecting multiple options, the returned text only ever contains the value of the first selected option in the <select>
    What am I doing wrong? I'm fairly new to servlets
    Edited by: Irish_Fred on Feb 4, 2010 12:43 PM
    Edited by: Irish_Fred on Feb 4, 2010 12:44 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:14 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:26 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:26 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:32 PM

    I am using AJAX.
    I will show you how I'm submitting the <select> values by showing you the flow of code:
    This is the HTML code for the <select> tag and the button that sends the form data:
    <form name="formMain" id="formMain" method="POST">
         <input type="button" id="addOpts" name="addOpts" value="Add Options" style="width:auto; visibility:hidden" onClick="jsObj.addOptions('servletName', document.getElementById('elName'))">
         <br>
         <select name="elName" id="elName" multiple="multiple" size="1" onChange="jsObj.checkSelected()">
              <option value="0"> - - - - - - - - - - - - - - - - </option>
         </select>
    </form>Note that the "visibility:hidden" part of the button style is set to "visible" when at least one option is selected
    Note that "jsObj" relates to a java script object that has been created when the web app starts ( The .js file is included in the .jsp <head> tag )
    The following code is taken from the file: "jsObj.js"
    jsObj = new jsObj();
    function jsObj() {
    //=================================================
         this.addOptions = function(url, elName) {
              var theForm = document.getElementById('formMain');          
              if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
                   xmlhttp=new XMLHttpRequest();
              } else { // code for IE6, IE5
                   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              url += this.buildQueryString(theForm.name);
              xmlhttp.open("POST",url,true);
              xmlhttp.send(null);
              xmlhttp.onreadystatechange=function() {
                   if(xmlhttp.readyState==4) { // 4 = The request is complete
                        alert(xmlhttp.responseText);
    //=================================================
    this.buildQueryString = function(formName) {
              var theForm = document.forms[formName];
              var qs = '';
              for (var i=0; i<theForm.elements.length; i++) {
                   if (theForm.elements.name!='') {
                        qs+=(qs=='')? '?' : '&';
                        qs+=theForm.elements[i].name+'='+escape(theForm.elements[i].value);
              return qs;
         //=================================================
    }And this is a code snippet from the "servletName" servlet:public synchronized void doGet(HttpServletRequest request,
              HttpServletResponse response) throws ServletException,IOException {
              PrintWriter out = null;
              try {
                   response.setContentType("text/html");
                   out = response.getWriter();
                   String output = "";
                   String[] values = request.getParameterValues("elName");
                   for(String s : values) {
                        output += s + ":";
                   output = output.substring(0, output.length()-1); // cut off last delimitor
                   out.println(output);
                   } catch (Exception e) {
         }So anyway, everthing compiles / works, except for the fact that I'm only getting back the first selected <option> in the 'elName' <select> tag whenever I select multiple options
    Edited by: Irish_Fred on Feb 7, 2010 10:53 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get all the index of "selected rows" in table control?

    Hi Gurus,
    I have a table control, wherein I need to get selected row so that I can get its respective TABIX.
    I know that the event for capturing selected row is in PAI.
    I also ensure that the w/ selColumn name in my screenpainter is exactly the same as my declaration in ABAP.
    TOP INCLUDE
    YPES: BEGIN OF Y_ZQID_CHECK,
            IDNUM           TYPE ZQID_CHECK-IDNUM,
            WERKS           TYPE ZQID_CHECK-WERKS,
            MATNR           TYPE ZQID_CHECK-MATNR,
            LICHA           TYPE ZQID_CHECK-LICHA,
            LIFNR           TYPE ZQID_CHECK-LIFNR,
            ECOA_S          TYPE ZQID_CHECK-ECOA_S,
            ID_STAT         TYPE ZQID_CHECK-ID_STAT,
            ID_DATE         TYPE ZQID_CHECK-ID_DATE,
            FLAG_MAILCOA(1) TYPE C,
            MARK(1)         TYPE C, "Name of w/ SelColumn in ScreenPainter: T_ZQIDCHECK_DISCH-MARK
           END   OF Y_ZQID_CHECK.
    DATA: T_ZQIDCHECK_DISCH TYPE STANDARD TABLE OF Y_ZQID_CHECK WITH HEADER LINE.
    PAI
    PROCESS AFTER INPUT.
    * MODULE USER_COMMAND_9004.
    LOOP AT T_ZQIDCHECK_DISCH.
      MODULE READ_TC_DISCH .
    ENDLOOP.
    module READ_TC_DISCH input.
      DATA: W_LINE_SEL TYPE SY-STEPL,
                  W_TABIX    LIKE SY-TABIX.
      GET CURSOR LINE W_LINE_SEL.
      W_TABIX = TC_ID_ONLY-TOP_LINE + w_LINE_SEL - 1.
      MODIFY T_ZQIDCHECK_DISCH INDEX TC_ID_ONLY-current_line.
    If I am selecting single row, I can properly get the selected index via debug.
    BUG:
    When I'm selecting multiple rows in table control, only the last row is always being read inside the loop of my table control.
    Please see the screenshot.
    [url]http://img268.imageshack.us/img268/5739/tcselectedrows.jpg[url]
    Notice in the debug screenshot, even if it's just in the 1st loop of table control, it automatically gets the 4th table control index, instead of the 2nd one.
    Helpful inputs will be appreciated.
    Thanks.
    Jaime
    Edited by: Jaime Cabanban on Dec 9, 2009 3:16 PM

    Hi,
    Are you sure that you have selected multiple line for tablecontrol in the property window of the tablecontrol.
    Flowlogic.
    LOOP WITH CONTROL TC_01.
         Module Get_Marked.
    ENDLOOP.
    Module Pool
    Module Get_Marked.
    read the data from the internal table where mark  = 'X'.
    this should give you only selected records.
    Endmodule.
    Kindly check the tablecontrol property.
    Regards,
    Ranjith Nambiar

  • How get all record from master and matching record from detail

    hi master
    sir i have master detail table
    i have many record in master table but some record in detail table how i get
    all record from master and matching record from detail
    such as
    select m.accid,m.title,d.dr,d.cr from master m, detail d where m.accid=d.accid
    this query not work that get only related record i need all record from master
    please give me idea
    thanking you
    aamir

    hi master
    sir i have master detail table
    i have many record in master table but some record in
    detail table how i get
    all record from master and matching record from
    detail
    such as
    select m.accid,m.title,d.dr,d.cr from master m,
    detail d where m.accid=d.accid
    this query not work that get only related record i
    need all record from master
    please give me idea
    thanking you
    aamir
    select m.accid,m.title,d.dr,d.cr
    from master m, detail d
    where m.accid=d.accid (+)The outer join operator (+) will get you all the details from master and any details from the detail if they exist, but the master details will still be got even if there are not details.
    Note: Oracle 10g now supports ANSI standard outer joins as in:
    select m.accid,m.title,d.dr,d.cr
    from master m LEFT OUTER JOIN detail d on m.accid=d.accid

  • Not getting all records in pagination

    I am also have a problem getting all records in the report as the post on Apr. 21,2004. My reports pagination stops at 500. When I set the 'max row count' to 100000. The pagination at the bottom of my page disapears. When I leave 'max row count' empty, it only goes from 1-500. No way to view records past the 500th record.
    I see there was a post on Apr. 21, 2004 about the same thing but it did not specify a fix or work around or if I'm missing a setting. (also tried the log off/on but did not help).
    *My pagination Scheme is 'Row Ranges 1-15 16-30 in select list(wiht pagination)'
    *My report has 1000+ records.
    Thanks, Paula

    The actual number of rows supported by the select list depends on how many rows you show on each page. If you go with the default of 15 rows, you would be able to use the select list with close to 5000 rows. If you increase the number of rows per page, the select list will work with even more rows.
    If the select list can't be used, it may make sense to consider using the "row ranges with set pagination" style. Set pagination lets you navigate from one set to the next instead of one page to the next, so you can navigate through your result set a lot quicker.
    However the best option for reports with that many rows would be "row ranges x-y", without showing the total number of rows. The reason is that the report renders a lot faster if you don't have the total number of rows calculated. In order to better be able to find certain records, I would recommend a search field on your report page that lets you filter the result set.
    Hope this helps,
    Marc

  • Unable to getting all records

    hi
    i  am new to bo 4.1 and i am having  source system (orcial)
    in sours level i have a table  in  6 lake record.when i use same table in webi i am unable to getting all record.i don't have any filters in report and object level.my table contain all dimensions only
    i changed in universe level no of records display and report level as well..
    s.s(6 lakes) = target report level( 6 lakes)?
    i am using sap bo 4.1 version
    pls do need ul help

    Hi Sandeep Mishra,
    thanks for your response, actually its executing successfully,but when i am set no of display records for example-5000 to 10000 ...it showing in report level..but when i want all record around 6 lakhs records..it taking time but out put showing empty..
    see the below my objects
    i need all objects at a time....this objects have table in source level 6 lakh ..i want same records in report level like 6 lakhs..
    i changed query properties in display of no of records as well as univer level..
    let me know in case of any clarty..
    thanks

  • Master Child tables how to get the latest rows from both

    Hi,
    Need some help with the sql. I have two tables Master & Child. In my Master table I have multiple rows for the same record and in the child table also multiple rows for the same master row how can I get the latest one's from both.
    For example Data in my Master table looks like
    CONT_ID                  SEQ_NUM        DESCRIPTION
    1                         189             Update 2
    1                         188             Update 1
    1                         187              NewNow in the child table for the same CONT_ID I may have the following rows
    CONT_ID                   UPDATED_DATE                                     STATUS
    1                        3/16/2010 2:19:01.552700 PM                          P
    1                        3/16/2010 12:29:01.552700 PM                         A
    1                        3/16/2010 12:29:01.552700 PM                         P
    1                        3/16/2010 12:19:01.552700 PM                         NIn my final query how can I get the row with seq_num 189 as it's the latest in Master table and from child table the row with status of P as it's the latest one based on the time. Here is the query i have but it returns the latest row from the child table only and basically repeats the master table rows as opposed to one row that is latest from both:
    Thanks

    Hi,
    You can use the analytic ROW_NUMKBER function to find the latest row for each cont_id in each table:
    WITH     got_m_rnum     AS
         SELECT     cont_id,     seq_num,     description
         ,     ROW_NUMBER () OVER ( PARTITION BY  cont_id
                                   ORDER BY          seq_num     DESC
                           ) AS m_rnum
         FROM    master_table
    --     WHERE     ...     -- any filtering goes here
    ,     got_c_rnum     AS
         SELECT     cont_id, updated_date,     status
         ,     ROW_NUMBER () OVER ( PARTITION BY  cont_id
                                   ORDER BY          updated_date     DESC
                           ) AS c_rnum
         FROM    child_table
    --     WHERE     ...     -- any filtering goes here
    SELECT     m.cont_id,     m.seq_num,     m.description
    ,     c.updated_date,     c.status
    FROM     got_m_rnum     m
    JOIN     got_c_rnum     c     ON     m.cont_id     = c.cont_id
                        AND     m.m_rnum     = c.c_rnum
                        AND     m.m_rnum     = 1
    ;If you'd like to post CREATE TABLE and INSERT statements for the sample data, then I could test this.
    If there happens to be a tie for the latest row (say, there are only two rows in the child_table with a certain cont_id, and both have exactly the same updated_date), then this query will arbitrarily choose one of them as the latest.

  • How to get all records created this month?

    Ok I'm trying to write a query that would get records that were created this month or later but not in the past.
    So today is Nov 16th 2009
    I need to look for all records created from 11/2009 and onward (>11/2009)
    Any ideas?

    Do you have any field like "create_date" on that table ? Here is simple qry
    with t as ( select 1 as id,to_date('01-OCT-2009','DD-MON-YYYY') as create_date from dual
    UNION
    select 2,to_date('11-OCT-2009','DD-MON-YYYY') from dual
    UNION
    select 3, to_date('02-NOV-2009','DD-MON-YYYY') from dual
    UNION
    select 4, to_date('01-NOV-2009','DD-MON-YYYY') from dual
    UNION
    select 5, to_date('13-DEC-2009','DD-MON-YYYY') from dual)
    select * From t
    where CREATE_DATE >= trunc(sysdate,'MON')Edited by: rkolli on Nov 16, 2009 1:23 PM

  • Not all records shown for selection - CR 2008

    I have a crystal report that has dynamic record selection. The selections are set to allow multiple, allow discreet, allow ranges.
    When I run the report I am not shown all records on the file to choose from.
    The file has approx 6000 records. Does anyone know of any limitations? The file I am writnig report for is from Item Master in SAP.  Thanks.

    There is a registry entry that limits the number of records shown in a list of values (LOV).  The default value is 1000.  The registry key is Crystal reports version specific.  You should be able to find the key by searching the forum for LOV 1000 or similar...
    HTH,
    Carl
    Moderators:  This question comes up once a week, it seems.  Maybe we should "pin" the answer to the top of the forum board?

  • CUBE Not getting All records from DSO

    Hi Experts ,
    We have a situation where we have to load data from a DSO to a Cube . The DSO contains only 9 records and while we r loading the data into cube , the cube is only getting 2 records . Thus 7 records are missing. Also The Cube contains more Fields  than DSO. in the transformations , for the extra fields we have written end routine and those extra fields will get data by reading master data .. Any pointers how to get the missing records or what is the error ...
    Sam

    Why multiple threads ????

  • Display all records from 4 select list

    Hi,
    trying to associate 4 select list where i could display all records from a list linked to an other list.
    1./ Created an item for each select list
    P1_employee_name
    P1_departments
    P1_employee_type
    P1_locations
    2./Set both null and default values to '-1' for each item
    3./Associated these items to source columns in the Region:
    where employee_name=:P1_employee_name
    or :P1_employee_name ='-1'
    and departments=:P1_departments
    or :P1_departments ='-1'
    and ......
    When running the report, couldn't display all records from a given list associated to an other list.
    e.g: Display all emp and type of emp for sales dept in Paris.
    Thks for your help

    I believe the issue is that you need to group your predicates such as:
    where (employee_name=:P1_employee_name
    or :P1_employee_name ='-1')
    and
    (departments=:P1_departments
    or :P1_departments ='-1')
    Also, if you are not already using the "select list with submit" type items, these work great for this case as the page will be submitted when the user changes the value of employeenam and the report will then reflect this change.

  • Get all Persons via Database select

    Hello all,
    if you ever need to get all Persons and its string values in an easy way directly from your database such as the xpath select
    " Select * from /Person" use following Database select against your FimService Database:
    --determine dynamically the columns for pivot
    DECLARE @cols AS NVARCHAR(MAX),
    @query  AS NVARCHAR(MAX)
    select @cols = STUFF((SELECT ',' + QUOTENAME(Name)
                        FROM [fim].[ObjectValueString] AS [o]
                        INNER JOIN [fim].[AttributeInternal] AS [ai]
                        ON [ai].[Key] = [o].[AttributeKey]
                        WHERE            
                        [o].[ObjectTypeKey] = 24   
                        group by Name FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'),1,1,'')
    set @query = N'SELECT ' + @cols + N' from
                 (SELECT        
                    [ai].[Name],
                    CAST ([o].[ValueString] AS NVARCHAR(MAX)) as Value,
                    ROW_NUMBER() over(partition by [ai].Name order by [o].[ValueString]) rn
                    FROM [fim].[ObjectValueString] AS [o]
                    INNER JOIN [fim].[AttributeInternal] AS [ai]
                    ON [ai].[Key] = [o].[AttributeKey]
                    WHERE       
                    [o].[ObjectTypeKey] = 24 --Type for Persons
                 ) x
                 pivot
                    Max(Value)
                    for Name in (' + @cols + N')
                 ) p '
    exec sp_executesql @query;

    You could create new stored procedures which do not use the additional search criteria.
    For example: sp_get_all_room_names()
    or: sp_get_all_room_numbers()
    Alternately, when searching by ints, your stored procedure could accept a max and a min value. Your Java class which calls this stored proc could intelligently search for one value (both min/max the same) or all values (pick decent min/max values).
    For example: sp_get_room_numbers(min, max)
    I hope this gives you a few ideas to run with.

  • How to get all records using Invoke-webrequest?/Why Invoke-webrequest returns only first 2000 Records?

    invoke-webrequest content returning only 2000 records though it has around 4000 records in web api.
    The same url if I give in excel oData Data feed I am getting all the records.
    See the below script
    Script:
    $QueryResult= (Invoke-WebRequest -Uri $ODataURI -UseDefaultCredentials)
    [xml]$xmlResult=$QueryResult.content
    foreach($obj in $xmlResult.feed.entry.content.properties)
    $Name=$obj.Name;
    $IsAvail=$obj.isAvail.'#text';
    $PGroup=$obj.PGroup
    I am exporting the above result as a CSV file and my CSV file contains only 2000 records. 
    But,  $xmlResult.feed.Count --> it Shows 4000 Records.
    The same Odata url if I give in excel oData Data feed I am getting all the 4000 records.
    So Please help me how can I get all the records using power shell.
    Thanks
    A Pathfinder..
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Hi Jo Swa(K.P.Elayaraja)-MCP,
    Would you please also post code which is used to export the records?
    In addition, to use the cmdlet invoke-RestMethod to work on ODate feeds, please refer to this article:
    Interacting with TechEd NA 2012 Schedule using PowerShell v3
    I hope this helps.

  • Database forLoop to get all records into cmbBox (servlets)

    Is it possible because i have not yet find the easiest way to retrieve all record from a specific field from database into a comboBox.
    eg: TABLE tableTest
    Fields Names (text) has about lets say 5 records
    How do i load all those records into a comboBox using servlets??
    I am just wondering how this could be done in the easiest and quickest form. Thanks

    OK here i have managed to load data into a comboBox its just that it doesent recognise the values ...
    ex: First doctor should have a value of 1 from select, so that i could query it.
    try {
            String query = "SELECT * FROM Doctor";
            ResultSet rs = statement.executeQuery(query);
            output.println("<FORM ACTION='AdminAssignServlet' METHOD='POST'>");
            output.println("<TR>");
                               output.println("<TD>     Select Doctors Name");
                               output.println("</TD>");
                               output.println("<output>");
                               output.println("<SELECT name='doctor'>");
                               output.println("<OPTION value='0'>Select Doctor</OPTION>");
                               while (rs.next())
                                            doctorId = rs.getString(2);
                                            String tempDocname = rs.getString(1);
                                    output.println("<OPTION value="+doctorId+">"+tempDocname+"</OPTION>");
                                    output.println("</SELECT>    ");
                                    rs.close();
                                    output.println("</TD>");
            output.println("</TR>");
          catch ( SQLException sqlException ) {
              sqlException.printStackTrace();
              sqlException.printStackTrace(output);
              output.println( "</table>" );
              output.println( "<title>Error</title>" );
              output.println( "</head>" );
              output.println( "<body><p>Database error occurred. " );
              output.println( "Try again later.</p></body></html>" );
              output.close();
          // List Doctors appointments button
          // List button
              output.println("<TR>");
                   output.println("<TD>");
                   output.println("<INPUT type=SUBMIT Value='List'>");
                                     output.println("</TD>");
                   output.println("</FORM>");
                   output.println("</TD>");
                   output.println("<TD>");
              output.println("<TR>");
              output.println("</TABLE>");
            //doctor = req.getParameter("doctor");
            try {
              String query = "SELECT * FROM [Consultation], [Procedure] WHERE Consultation.procedureId = Procedure.procedureId AND Consultation.procedureId <> 0 AND Consultation.doctorId = "+doctorId+"";// AND Consultation.surgRequired = 1 ORDER BY date";;
              ResultSet resultRS = statement.executeQuery(query);
              output.println("<table border='1' bordercolor= '#00386E' style='border: Black;'>");
              output.println("<tr>");
              output.println("<td bgcolor='yellow' height='30'><b><font color='blue'> "+doctorName+"'s SCHEDULED PATIENT APPOINTMENTS</font></b>     ");
              output.println("</tr>");
              output.println("</TABLE>");
              output.println("<table border='1' bordercolor= '#00386E' style='border: Black;'>");
                output.println("<THEAD>");
                output.println("<TR bgcolor ='alicegreen'>");
                output.println("<TH>Doctor ID</TH>");
                output.println("<TH>Patient ID</TH>");
                output.println("<TH>Procedure</TH>");
                output.println("<TH>Date</TH>");
                output.println("<TH>Time</TH>");
                output.println("</TR>");
                output.println("</THEAD>");
                while( resultRS.next() ) {
                  output.println("<TR>          <TD bgcolor='aliceblue'>" +resultRS.getInt( 2 )+"</TD>"+
                                            "<TD bgcolor='WHITE'><a href='myPatientAppServlet?consid="+resultRS.getString( 1 )+"'>Load me!</a></TD>"+
                                            "<TD bgcolor='alicegreen'>" +resultRS.getString( 15 )+"</TD>"+
                                            "<TD bgcolor='alicegrey'>"+resultRS.getString( 10 )+"</TD>"+
                                            "<TD bgcolor='alicegrey'>"+resultRS.getString( 11 )+"</TD>"+
                                "</TR>");
                  output.println("</TR></TD>");
                resultRS.close();

  • Query to get all records were AMNT1 AMNT2

    Hi,
    I have two fields Field1,Field2 and two Key figures-AMNT1,AMNT2. I want to get all the records for which AMNT1 > AMNT2.
    Any clues or solutions will be appreciated.
    Thanks
    Simmi

    Hi simmi
    You can put condition for this requirement in the query designer.
    When you are in the query designed have a formula with Boolean operation statement "is greater than", as shown.
    AMNT1>AMNT2
    now go to condition button and add one condition for this formula. the condition can be 'key figure'= formula name, Operator = 'Equal to' and value = '1'.
    Aply this condition and execute query with this condition active.
    regards
    rahul

Maybe you are looking for

  • Deleting master data after loading transactional data using flat file

    Dear All, I have loaded transaction data  into an infocube using a flat file . While loading DTP i have checked the  option "load  transactional data with out master data exists" . So transactional data is loaded even if no master data is there in BW

  • Iweb server problems

    I am getting the following when attempting to Publish Error *Couldn't reach the MobileMe configuration server. Try publishing again later.* Is there a problem

  • Unable to view two different image files at once in PS CS4

    For some reason I am unable to open two separate image files and view them both on my screen in Photoshop CS 4.  My goal is to combine two versions of the same raw file in order to expand the tonal range.  I want to stack the 2 images and then use a

  • Mail not using my Address Book on new iMac 10.6.2 - not autofilling ...

    I have recently switched to a new iMac with a fresh install of 10.6.2. My Apple Mail app is not grabbing address book contacts automatically even though I have checked the box to auto-complete addresses. This always used to work on my old machine. An

  • Macbookpro won't turn on, why is it not charging?

    MacBook Pro would not turn on, replaced battery. Worked upon installation, tried to recharged battery. Computer won't turn on. Charged light on power cord is on, but computer won't turn on.