Namedquery using same table field multiple times with the use of a label

Hi all,
i'm having some trouble with a namedquery. I'm trying to
use the following namedquery in Toplink to retrive some
data out of a database.
select proj.id
, proj.code
, proj.name
, proj.budget
, proj.status
, proj.startdate
, proj.enddate
, proj.mdr_id projleader_id
, med_leader.name projleader
, proj.mdr_id_valt_onder promanager_id
, med_promanager.name promanager
, proj.mdr_id_is_account_from accmanager_id
, med_accmanager.name accmanager
from uur_projecten proj
, uur_medewerkers med_leader
, uur_medewerkers med_promanager
, uur_medewerkers med_accmanager
where ( #p_name is not null or #p_search_string is not null )
and med_leader.id = proj.mdr_id
and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
and (( #p_status is not null
and substr( proj.status, 1, 1 ) = upper( #p_status ))
or ( #p_status is null ))
and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
and med_promanager.id = proj.mdr_id_valt_onder
and med_accmanager.id = proj.mdr_id_is_account_van
order by decode( substr( proj.status, 1, 1 )
, 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
As you all can see the table ‘uur_medewerkers’ is been used trice to
determine the name for the corresponding ID. I have a Java class with
the fields for the results and created a Toplink descriptor to map
the fields to the database fields.
The problem is that for the 'projleader', 'promanager' and 'accmanager'
fields the results are null. The reason is probably that Toplink doesn't
recognize the fields because of the label for the tables.
Is there a way to make this work?
Greets, René

Post Author: quafto
CA Forum: .NET
Your query is not too clear so I'll do my best to answer it broadly.
You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
Hopefully my comments have given you a few ideas.

Similar Messages

  • Bapi_po_create1 is giving same system messages  multiple time in the joblog

    Hi Experts,
    Bapi_po_create1 is giving same system messages multiple times in the job log when we ran the program in the background
    can u plz suggest how to prevent these multiple appearances of same messages.
    I am pasting the code below whn i ran this program in backgorund job log is having the messages.
    Date       Time     Message text                                                                 Message class Message no. Message type
    08/06/2009 08:11:53 Job started                                                                       00           516          S
    08/06/2009 08:11:53 Step 001 started (program ZZZTEST, variant &0000000000008, user ID BREDDY)        00           550          S
    08/06/2009 08:11:54 Commitment plan contains no account assignment data                              MECP          020          S
    08/06/2009 08:11:54 Commitment plan contains no account assignment data                              MECP          020          S
    08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:54 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:54 Source not included in list despite source list requirement                       06           722          E
    08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained                          VH           777          S
    08/06/2009 08:11:55 Pricing/euro: Attention: Euro Customizing not maintained                          VH           777          S
    08/06/2009 08:11:55 Status "Initial Block" of material 20111 does not allow external procurement      ME           053          E
    08/06/2009 08:11:55 Purchase order still contains faulty items                                       MEPO          000          E
    08/06/2009 08:11:55 Job finished                                                                      00           517          S
    Edited by: bhavani prasad kotharu on Aug 6, 2009 3:09 PM

    HERE IS THE CODE OF THE PROGRAM, WE R JUST PASSING SOME PO DATA TO THE BAPI_PO_CREATE1,ON RUNNING THIS PROGRAM IN BACKGROUND SAME SYSTEM MESSAGES ARE APPEARED MULTIPLE TIMES,----
    REPORT zzztest.
    DATA :    lwa_bapimepoheader TYPE bapimepoheader
             ,lwa_bapimepoheaderx TYPE bapimepoheaderx
             ,li_bapimepoitem TYPE STANDARD TABLE OF bapimepoitem
             ,lwa_bapimepoitem TYPE  bapimepoitem
             ,li_bapimepoitemx TYPE STANDARD TABLE OF bapimepoitemx
             ,lwa_bapimepoitemx TYPE bapimepoitemx
             ,li_conditions TYPE STANDARD TABLE OF komv
             ,li_return TYPE STANDARD TABLE OF bapiret2
             , n TYPE c
    PARAMETERS: p1 TYPE c AS CHECKBOX.
    IF p1 = 'X'.
      lwa_bapimepoheader-doc_type = 'NB'.
      lwa_bapimepoheader-purch_org = 'NA00'.
      lwa_bapimepoheader-pur_group = 'C02'.
      lwa_bapimepoheaderx-doc_type = 'X'.
      lwa_bapimepoheaderx-purch_org = 'X'.
      lwa_bapimepoheaderx-pur_group = 'X'.
      lwa_bapimepoitem-po_item = '10'.
      lwa_bapimepoitem-material = '000000000000020111'.
      lwa_bapimepoitem-plant = 'CA01'.
      lwa_bapimepoitem-vend_mat = '1000'.
      lwa_bapimepoitem-quantity = '10'.
      lwa_bapimepoitem-orderpr_un = 'M'.
      lwa_bapimepoitem-no_more_gr = 'K'.
      lwa_bapimepoitem-agreement = '4600000095'.
      lwa_bapimepoitem-agmt_item = '10'.
      lwa_bapimepoitem-pricedate = 'X'.
      lwa_bapimepoitem-price_date = '20071030'.
      lwa_bapimepoitem-no_rounding = 'X'.
      APPEND lwa_bapimepoitem TO li_bapimepoitem.
      lwa_bapimepoitemx-po_item = '10'.
      lwa_bapimepoitemx-po_itemx = 'X'.
      lwa_bapimepoitemx-po_itemx = 'X'.
      lwa_bapimepoitemx-material = 'X'.
      lwa_bapimepoitemx-plant = 'X'.
      lwa_bapimepoitemx-quantity = 'X'.
      lwa_bapimepoitemx-po_unit = 'X'.
      lwa_bapimepoitemx-orderpr_un = 'X'.
      lwa_bapimepoitemx-acctasscat = 'X'.
      lwa_bapimepoitemx-agreement = 'X'.
      lwa_bapimepoitemx-agmt_item = 'X'.
      lwa_bapimepoitemx-pricedate = 'X'.
      lwa_bapimepoitemx-price_date = 'X'.
      lwa_bapimepoitemx-preq_no = 'X'.
      lwa_bapimepoitemx-preq_item = 'X'.
      lwa_bapimepoitemx-no_rounding = 'X'.
      APPEND lwa_bapimepoitemx TO li_bapimepoitemx.
    DATA: lo_msg_handler  TYPE REF TO cl_message_handler_mm.
      CALL METHOD cl_message_handler_mm=>get_handler
        IMPORTING
          ex_handler = lo_msg_handler.
      lo_msg_handler->remove_all( ).
      lo_msg_handler->cleanup( ).
      CALL FUNCTION 'BAPI_PO_CREATE1' "in background task
           EXPORTING
             poheader   = lwa_bapimepoheader
             poheaderx  = lwa_bapimepoheaderx
             testrun    = 'X'
           NO_MESSAGING = c_x
           NO_MESSAGE_REQ = c_x
             no_authority = 'X'
           IMPORTING
             expheader  = lwa_bapimepoheader
           TABLES
             return     = li_return
             poitem     = li_bapimepoitem
             poitemx    = li_bapimepoitemx
             conditions = li_conditions.
    ENDIF.
    Edited by: bhavani prasad kotharu on Aug 6, 2009 3:38 PM

  • How can I have use the same div ID multiple times on the same page?

    Okay so a problem I encounter a lot is that often times I want to use the same div ID several times on the same page. An example of this is when I'm creating table like designs.
    Let's say for instance I create a div ID called 'product-container'. I want to use 'product-container' multiple times on the same page but if I do this it is improper XHTML and will throw errors in any XHTML validator (you are only allowed to use a div ID once on any XHTML page in order for it to be standards compliant).
    Now the first option is that I could define 'product-container' in my CSS style sheet multiple times by doing something like this...
    #product-container {
         width: 300px;
    #product-container-2 {
         width: 300px;
    #product-container-3 {
         width: 300px;
    #product-container-4 {
         width: 300px;
    What you will see there however is that it seems pointless to define the same ID numerous times over (just adding a number on the end) when each ID is the exact same thing and has the exact same attributes.
    Now what I have noticed is that there are some sites out there who manage to have the same ID appear several times in the code but add a number to it just like above. The difference is that they only have one definition for 'product-cointainer' in their CSS document but in their actual XHTML code they have IDs for 'product-container' but with numbers on the end like 2,3,4,5, etc. It's almost as if JavaScript or some other code is automatically appending a number on the end of the ID so the validator won't consider the markup to be invalid, but yet it knows that it's using the same 'product-container' style that is contained in the CSS style sheet.
    I hope I explained this correctly. I'm just hoping to find a way that I can put the same div ID on a page multiple times without having to define it over and over again in my CSS.
    Any help is much appreciated!

    Because it seems like by using a class you can't make this position as 
    well as you can by using an ID. Am I wrong?
    An ID name can be used only one time per page.  A class name can be used multiple times per page.
    .product {
    width: 300px;
    text-align:left;
    color: #FF0000
    border: 2px solid #666;
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • TS2755 keep receiving the same text message multiple times, at the same time of the night. How can I stop this?Thabnks

    Hi
    I keep on receiving the same text message multiple times and at around the same time each night. Any idea how I can stop this happening? The text messages are originating from to separate Saudi Arabian mobile numbers. Both these people are listed in my contacts so do you think if I delete their names it might stop the texts coming htrough each night?
    Cheers

    Deleting the people from your contacts will not stop the messages. Have you tried talking to the people and finding out if they're sending you messages? You could try contacting your carrier and finding out what blocking services they offer. However, theat would block all messages from those people.

  • How to use same dynamic text, multiple times in a Movie

    FLASH CS5.5
    How can a dynamic text field be used multiple times, on any
    frame, in any new layer during a Movie?
    ~~
    A number of unique dynamic text fields are being used.
    The intent is to use them each, many times during a Movie.
    (i.e. a users first name)
    They are successfully being "ExternalInterfaced" from a PDF form field.
    (the SWF is displayed within the PDF as a RMA)
    This all works well, IF I only use one instance of the dynamic text field.
    (one use of each unique text field)
    If I try and use that same dynamic text field, again, in a new layer, later in the SWF,
    all of that said, duplicate dynamic text fields do not display.
    ~~
    Stumped!!!
    Thanks in advance for your advice / comments!
    D-

    Thanks Ned,
    I always welcome learning something new.
    I did not know creating a new keyframe,
    creates a new instance.
    Yes, I had used the same dynamic text field instance name in
    numerous, new layers (great observation).
    With the objective to display the User's name throughout
    the timeline (on and off)...
    I'll attempt to paraphrase your solution;
    Use a single layer to display the dynamic text field.
    Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
    Help with this one ??
    Set the visible properties to true or false as need through out the timeline.
    ( Does require an AS3 ? )
    I'll give that a try.....
    ~~
    Side of effect of using the above solution;
    The SWF in it's attempted state, uses the dynamic text field instance, in
    different places, different text sizes, on the stage, throughout the Movie.
    (i.e. the User's first name appears in different sentences...)
    Per the solution above,
    I believe I will be limited to One location, one format setting.
    Is this assumption correct?
    I can make this work from a display / Movie point of view.
    However, your first VAR concept, noted above, might be
    worth exploring should more flexibility be required.
    Thanks for making the time to coach...
    D-

  • Is it possible to use Adobe Illustrator in multiple computers with the same account?

    Hi guys,
    So our company is a small designing tile company,
    we wanted to purchase the Adobe Illustrator and was wondering if it was possible to use it in multiple computers with one account, as we have two computers that are frequently use for designing, or do we have to buy two separated Adobes Illustrators for each computer?
    Thanks

    From the End User License Agreement (EULA):
    2.1.3 Portable or Home Computer Use. Subject to the restrictions set forth in Section 2.1.4, the primary user of the Computer on which the Software is installed under Section 2.1 (“Primary User”) may install a second copy of the Software for his or her exclusive use on either a portable Computer or a Computer located at his or her home, provided that the Software on the portable or home Computer is not used at the same time as the Software on the primary Computer.
    So, while it CAN be installed on more than one computer, they may not both be in use at the same time.
    --OB

  • Using same bind variable multiple times in Dynamic sql

    Hi;
    I have a query which uses same variable multiple times, is there a way I could use only one time that variable and it will take multiple times.
    Query is;
    execute immediate 'SELECT count(*) FROM x WHERE MONTH_ID = :VOMNTH_ID
    UNION
    SELECT count(*) FROM Y WHERE MONTH_ID = :VOMNTH_ID
    union
    SELECT count(*) FROM z WHERE MONTH_ID = :VOMNTH_ID ' using month1,month1,month1
    What I want Just supply month1 only once.
    Your help is appreciated.
    VKM

    the way suggested by Nigel worksI'm not sure what you intend to use the resultset for but remember that UNION will remove duplicates from the result set and could possibly sort it too. Even if that were not the case (for example if you used UNION ALL) Oracle does not specifically guarantee the order of resultsets.
    If you are expecting the first row to contain the first count (and so on) then you might not get the answer you are expecting.
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> SELECT 3 n
      2  FROM   dual
      3  UNION
      4  SELECT 2 n
      5  FROM   dual
      6  UNION
      7  SELECT 1 n
      8  FROM   dual;
             N
             1
             2
             3
    SQL> SELECT 1 n
      2  FROM   dual
      3  UNION
      4  SELECT 2 n
      5  FROM   dual
      6  UNION
      7  SELECT 2 n
      8  FROM   dual;
             N
             1
             2
    SQL>

  • How to populate a set of fields multiple time in the page ?

    Hi All,
    JDev Ver : 11.1.1.5
    I have a requirement as follows,
    My page contains 1. Add Button
    2. Five fields.(one input text and four select one choice)
    The fields are like one input text and remaining select one choice. And also these fields contains validations.
    Actions
    On click of add button , I have to show the fields , similarly I have to add one more set of fields in the page below the first set when I click the add button, Like this I will add as many as I need.
    How to achieve this requirement,
    1. Do I need to generate the view objects dynamically from managed bean ?
    2. Do I need to create a custom component ?
    For Time being , I have added 3 set of fields pages and showing one by one. I want to do this dynamically.
    Please let me know the suggestion for this Requirement.
    Thanks,
    Gopinath

    Hi,
    to do this:
    1. reate a managed bean that exposes a HashMap property. The HashMap is of type e.g. Map<Person>
    2. To create a new set of fields, add a new entry to the HashMap and refresh the af:form. The af:form contains and af:forEach that you use
    to iterate as often as you have entries in the HashMap. Each text field you bind to #{bean.HashMapProperty['key'].attribute}, for example
    #{bean.HashMapProperty['key'].FirstName}
    #{bean.HashMapProperty['key'].LastName}
    #{bean.HashMapProperty['key'].EmployeeId}
    3. When the user updates a field, the HashMap is updated based on the "key"
    4. The managed bean should be in viewScope and referenced from the field's value property
    Frank

  • Reusing the same jsp include multiple times on the same page

    If someone knows a way out of this
    I'd like to print out 2 records of the same data type I have a JSP include which does that.
    Now my issue is how to use the same include twice on the same page
    Ideally I would like to do the following:
    <%
    request.setAttribute("person", person1);
    %>
    <jsp:include page="./person.jsp"/>
    <%
    request.setAttribute("person", person2);
    %>
    <jsp:include page="./person.jsp"/>
    And in person.jsp
    I could have
    <h:inputText name=#{person.name}/>
    This fails in the updateModel phase - And I realize why it's failing. There really is no person managed bean.
    It's just that I am at a kind of loss as to what I need to do now -
    Am missing something or is it just impossible to use jsp:includes the way Ive tried to?

    I do not understand, have you created a backing bean named person? Have you defined it in your config file?
    Please copy/paster your backing bean code and config file.
    Normally, you can set directly the value of the bean by using some java code in your jsp instead of setting the request attribute.

  • Embed same SWF file multiple times in Flash file

    I want to include the same SWF file multiple times in the same flash file. I have a plain box that is clear, that becomes visible when clicked. I want to create a grid of them (about 50+). If I copy the layers and actions, they interfere with each other so I want to embed multiple SWF files into one file and then save it to embed in an interactive PDF. If I save one square and embed it into the PDF multiple times, the file becomes too big to work. How can I embed interactive SWF files over and over into 1 SWF file? I don't have a ton of knowledge with Flash....

    you edit your html file to embed multiple copies of your swf.
    it's generally easier to control the layout if you use swfobject (but you can just copy the code published by flash pro) to embed the swf.

  • Does QueueSender send same object multiple times to the Queue

    Hi ,
    Does the QueueSender sends the same message object multiple times to the queue ?If so then the same will be send multiple times right. why do the client retain same object for long time if the expiry time is 0, Please some one help on this .
    Thanks
    Maruti

    Little_Pale_Face wrote:
    Michel,
    Just to clarify, I can drag duplicates to an album but it only appears once - so it's not actually adding to the album. The question, as I understand it, is that PSE doesn't warn you whereas it use to in PSE 3..
    Ok, that clear now.
    If I remember correctly, the format of the database for PSE was changed around version 4. So the error message that Beachcomber was seeing may have been generated by the old database system.
    Version 4 used Microsoft Access as the database engine, not sure about version 5. Anyway I am sure that from version 6, the sqlite database engine was used.

  • Artist listing appears 4 times with the same info

    I have the same artist listed 4 times on my ipod with the exact same information under each listing. I deleted all the songs from itunes, synced my ipod, reloaded them, and synced again... and again got the same artist listed 4 times with the exact same menu under each listing. It all appears correctly in itunes. Anyone help me?

    Hi DavidTPerrett!
    I have an article for you that will help you troubleshoot this issue:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • Can I view the same pdf on multiple iPads at the same time with 1 iPad operating as the master (controlling page turns etc)?

    Would like to use 4nr iPads as an autocue system. Can I view the same pdf on multiple iPads at the same time with 1 iPad operating as the master (controlling page turns etc) and the others operating as slaves? Can this be done without the use of 3G or a remote Wifi hub? I would appreciate your input.................

    Open the document in Acrobat Reader and use the menu Window > New Window.

  • Using multiple timer in the same SessionBean

    Hello,
    Is it possible to use multiple timer in the same Stateless Session Bean. In my application a user can schedule some task to execute. To do so I was thinking of creating a Session Bean which would create calendar timer on user request and, when one of the timer expires, retrieve the task to execute thanks to the information stored in the timer.
    When I tried the solution explained above, it seems that the @timeout method is synchronized on 1 timer. For example if I create a timer that will be executed every 10 seconds and another one executed every 30 seconds, the timeout callback is called every 30 seconds but 4 times.
    My code looks like that :
    @Stateless
    @LocalBean
    public class TimeManager {
        public void onUserRequest(ScheduleExpression expression) {
            Timer timer = timerService.createCalendarTimer(expression, timerCfg);
        @Timeout
        void timeout(Timer timer) {
            logger.log(Level.INFO, (String) timer.getInfo());
    }Is there a way to do what I want?
    Thank you

    This doesn't make any sense to me. If i were to write a bunch of schemas for a particular applicaion, would
    I have them all in the same namespace? You would normally have one schema that describes the information model associated with the one namespace that the different documents in your application use.
    If so, why can't I load more than one in the same name space?The parser chooses the schema based on the namespace alone. There is no other information used to decide which schema to use, so you can only have one schema for the namespace.
    They all have different root elements.You can have different root elements in the one schema.
    I don't even need the namespaces, but I can't
    figure out how to get rid of them (the schema isn't valid with out them according to XML Spy). You can set the schema explicitily before parsing, but not (AFAIK) set after parsing has begun, except by using the mapping of namespace to schema location.
    I have also tried to use the external-noNameSpaceSchemaLocationproperty, but it doesn't seem like you can pass in an array of schemas to that one. It only expects a
    String as the Object you pass in to setProperty. Yes, you can only validate a document against the one schema.
    So, how can I load all my schemas so I don't have to reference them in the XML documents? Either combine your schemas so you have one schema for your namespace that validates elements which are defined in that namespace (the formal/correct way of doing it), or construct a filter that inserts a PI to point to the schema once the root element is opened (the pragmatic/bit of a hack way of doing it).
    Pete

  • Running the same code multiple times with different paramters automatica​lly

    Hi guys,
    I want to run the same code multiple times with different paramters automatically. Actually, I am doing some sample scans which takes around 2 hours n then I have to be there to change the paramters and run it again. Mostly I do use folowing paramters only
    X_Intial, X_Final, X-StepSize
    Y_Intial, Y_Final, Y-StepSize
       Thanks,
    Dushyant

    All you have to di is put all of the parameters for each run into a cluster array. Surround your main program with a for loop and wire the cluster array through the for loop. A for loop will autoindex an input array so inside the for loop you just have to unbundle the cluster to get the parameters for each run.
    Message Edited by Dennis Knutson on 07-13-2006 07:50 AM
    Attachments:
    Cluster Array.JPG ‏9 KB

Maybe you are looking for