How to put detail records in fixed formÉ

Hi,
I am trying to build a crystal report based on an existing printed form. The form includes elements that look like the following:
Activity
Hot Oiler - 4 mbtu     7mbtu
Pressure Pumping - 5K   10K   15K
Travel - 5K   10K   15K
Standby - 5K   10K   15K
Each Activity also has a quantity, a rate, and a total (quantity * rate) associated with it.
The user used to circle the applicable value on the paper form (for example, if it was a 4 mbtu hot oiler vs. a 7 mbtu hot oiler).
In the application and database the user will enter line items in the work order that specify if it is a Hot Oiler  4 mbtu or a Hot Oiler 7mbtu.  Similarly, the user will create a record that is either Pressure Pumping 5k or Pressure Pumping 10K or Pressure Pumping 15K. And so on.
The application is capturing all of this information.  I want the crystal report to still display each of these elements as they are laid out on the current paper form however because these are detailed records I do not know how to place them in the report properly. If we take the first line in the form, I created the formula:
+if {field_tickets_has_resources.resources_id} in [150, 151] then
"Hot Oiler - " & "4 mbtu" else
if {field_tickets_has_resources.resources_id} = 163 then
"Hot Oiler - " & "7 mbtu" else
"Hot Oiler - "+
I created another formula for the second line in the form:
+if {field_tickets_has_resources.resource_roles_id} = 15 then
"Pressure Pumping - 5K" else
if {field_tickets_has_resources.resource_roles_id} = 18 then
"Pressure Pumping - 10K" else
if {field_tickets_has_resources.resource_roles_id} in [22, 24] then
"Pressure Pumping - 15K" else
"Pressure Pumping -"+
And so on.  However, I cannot place each of these formula beside each other in a details line because it places the values horizontally rather than vertically in the report.  I cannot place these in a header because they are actually detailed records.
I hope this makes sense. Any help, as always, is appreciated!
Mark

Hi Mark, 
I recommend a similar apporach but the first formula will be created so we can group the records by the Activity type.  For example all the Hot Oilers then Pressure Pumping, etc. 
We group on this formula then a second formula will build a list of the quantities. 
One final formula in the Group Footer will display everything on a single line.  We can then hide the Group Header and Detail section because we only want to see one line per actvity type. 
Create a group on this formula:
@ActivityGroup
If {field_tickets_has_resources.resources_id} <> 0 Then
   "Hot Oiler"
Else If {field_tickets_has_resources.resource_roles_id} <> 0 Then
         "Pressure Pumping";
This formula will define and reinitialize a string variable for each group.  This goes into the Group Header and can be suppressed. 
@Initialize        
WhilePrintingRecords;
StringVar myQuantity := "";
This formula goes into the Detail section.  Based on your first formula I'm guessing the Activity Type is based on which field is populated.  I assume only one field per record can have a value that isn't 0. 
@Quantity        
WhilePrintingRecords;
StringVar myQuantity;
If {field_tickets_has_resources.resources_id} <> 0 Then
   (Select {field_tickets_has_resources.resources_id}
      Case 150  :myQuantity := myQuantity & "4 mbtu "
      Case 151  :myQuantity := myQuantity & "4 mbtu "
      Case 163  :myQuantity := myQuantity & "7 mbtu ";)
Else If {field_tickets_has_resources.resource_roles_id} <> 0 Then
   (Select {field_tickets_has_resources.resource_roles_id}
      Case 15   :myQuantity := myQuantity & "5K "
      Case 18   :myQuantity := myQuantity & "10 "
      Case 22   :myQuantity := myQuantity & "15K "
      Case 24   :myQuantity := myQuantity & "15K ";)
This formula goes into the Group Footer and builds your string. 
@Display     
WhilePrintingRecords;
StringVar myQuantity;
{@ActivityGroup} & "-" & myQuantity;
All the sections except for the Group Footer can be formatted to hide. 
Hope this helps,
Brian

Similar Messages

  • How to control detail records displayed after requery

    I have a master/detail form. I did not like the behavior of the screen clearing after I did a save so I added code to requery the master/detail records. There is still one behavior which I need to fix -- after I requery the master and detail records, I always get the first set of detail records, not the set of records displayed on the screen when I did the save. So if I have detail rows 40-50 displayed on the screen and do a save, the master/detail rows are requeried but I see rows 1-10 on the screen, not 40-50. Any ideas how to code around this?

    This is due in part to the fact that detaching the detail object from its master and actually deleting the detail object are two different things. To work around this, add the following in your session bean, where Departments and Employees are your master/detail objects, respectively:
    public void removeNestedEmployee(Employees entity) {
    Departments owningDept = entity.getDepartment();
    owningDept.removeDepartment(entity);
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    uow.deepMergeClone(owningDept);
    Object empWorkingCopy = uow.readObject(entity);
    uow.deleteObject(empWorkingCopy);
    uow.commit();
    Re-generate the data control for this session bean and then drag and drop this method onto your JSF page. The argument you'll pass in is the data provider for the selected employee:
    ${bindings.departmentCollectionIterator.currentRow.dataProvider}
    This will both detach the record from the owning entity, delete the record, and force a refresh of both the master and detail iterators.
    Hope this helps,
    Lynn Munsinger
    Oracle JDeveloper and ADF Product Management

  • How to lock the record in the Form

    .How to lock the record
    That is In my customized form if user query the record in one of our Customized form and the system automatically should prevent by quering the same record by other user for the same form .The message to be displayed as locked by another user .
    For example in standard form the same option is available.
    Form Name:GMEBCHED.FMB
    Module:ORACLE PROCESS MANUFACTURING(OPM)
    Could you pls help us how to implement the same for our Customized form .
    Appricaiate your help .
    Regards,
    Radha krishnan

    Hi,
    I tried to put the code under Post-Query trigger. Since user can input the selection criteria in the form. After the form open, after I input the "Update user" ID (this is in the non-base table block), the oracle message prompt: FRM-40653: Record not reserved for update or delete. Try again later..
    So, is there any method to solve it?
    Thanks a lot.
    Regards.

  • How can I display records dynamically in forms?

    Hi Friends,
    I want to display the number of records in the form dynamically. Suppose the back-end table is having only 5 records means it should display 5 records. If any new records is inserted later then it should show 6 records. It should display 10 records at a time with a scroll bar in case if a table is having more records.
    The best example is Data Grid in VB. The same kind of mechanism I want to provide in my form. How can I do that?
    Any suggestion would be greatly appreciated.
    Thank You.
    Gopinath Kona
    null

    Why not have number or records displayed as the number that best fits the space and then if less come back the scrollbar is disabled, and if more come back the scrollbar is enabled?

  • How to put borders in the tabular form report

    Hi,
    I need to put borders in the tabular form report in the apex UI .I mean in the by default no boundary comes so I need vertical lines in the column .
    So how to do that.
    Thanks in advance.
    Edited by: Vivek on May 22, 2012 8:25 PM

    Edit the report page > Report Attributes > Change the report template for different look and feel
    You can also customize the report template or even create your own template
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/ui_templt.htm#HTMDB25707

  • How to commit each record in Oracle Form Personalization

    Hi,
    how to commit each record with out using save button in form...my requirement is when cursor goes to next record it vil automatically stored in database please give me your valuable suggestion...
    Actual Requirement:
    here we need to give the locators(it is  number) whenever the cursor goes to next record it vil automatically incremented by 1(i wrote query for incremetation) and previous one vil be stored in database.
    Here i am using WHEN NEW ITEM INSTANCE IS USED Trigger..
    Thank You,
    Regards,
    Putta

    Hi,
    The commit should be done by the form, or whatever raises the business event.
    The API fires the event in the same transaction (unless the subscription is deferred), and then the commit is issued. This commits the transaction, and all actions of the event subscription.
    If the subscription is deferred, then the concurrent request which processes the subscription will issue the commit on completion.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Can update detail record in browse form?

    I have a browse form ,it's record do not to create or insert but update,and update only a few column such as change is_disabled to true/false,since then I want change records by click radio group or check box,is this can do?
    I use Jdev9.03

    955268 wrote:
    I have a simple APEX form based on a table with 2 columns with one column being a primary key.
    When i create the APEX form based on my table it hides the primary key column. If I make it visible by changing it to a Text item from Hidden.
    I am unable to update or insert a new record in the form. It gives me a MRU error.
    I would like to know how can i create my APEX form with both the columns updateable and visible.You didn't provide any information about your apex version, so I assume the most current one (Apex. 4.1).
    There you can run the form wizard using the ROWID of your table. If you use that, then the PK column can be filled out manually, just as any other item.

  • How to delete a record in custom form

    Hi,
    I got a requirement,
    If a form has 'n' records with start & end dates, such that start date of new record should be last record end date + 1.
    Now if the user tries to delete a record between first and last record, it should allow him to delete but when he tries to save it should not allow.
    Only way he can delete is either he can create a new record with the same dates or he can adjust remaining record dates such that startdate of new record should be last record end date + 1.
    I'm running out of ideas, any suggestion is appreciated.

    Hi
    it should allow him to delete but when he tries to save it should not allow.Play with the KEY-COMMIT Trigger Which is the Best i can see to STOP or PROCESS any Validations during the saving process according to the conditions u specify using...
    RAISE FORM_TRIGGER_FAILURE;Prevents the user from Saving in KEY-COMMIT Trigger it's the yellow-black Floppy Disk u use for saving records in the Form's Tool Bar..
    Hope this helps...
    Regards,
    Amatu Allah

  • JSP and JavaScript! How to put session values into html form?

    I have a master form which goes to detail form to input data and back to master to Confirm submit operation. I want to put all the form data into request or session variable so it can be retrieved in both the forms. In master form i want to use it in the following way:
    MasterForm-onLoad(){
    check for form data Object in the session/request
    if the data exists
    populate the form fields (by getter methods of form data object)
    Show the input from detail form
    otherwise
    show empty form
    Now the problem is that it throws null pointer exception if the form data does not exist and i try to access it within an IF statement.
    I beleive this is coz the JSP code will be executed on the server before the html page is loaded. Can any one please tell me how to solve this problem.
    Thanks and Best Regards
    Gul

    thats exactly what i m doing but the session variable is not a simple variable or objct, its a serializable object with getters and setters which i will call to retrieve its values. its like this
    FormBean formData=(FormBean) session.getAttribute("formData");
    now in javaScript i will have to check if the formData is null and than perform the getters or setters.
    <script>
    function getValues(){
    if("<%formData%>"!="null"){
    form1.SID.value="<%=formData.getIDVal()%>"
    </script>
    thats what i was trying to do but the problem is all jsp code will be executed before the page is loaded so it will try to execute inside of the if statement even when the object is null so NullPointerException.
    The only way i have got it working so far is to retrieve all the values in the JSP scriptlet, and than use the individual variables as u also mentioned.... SO Far i havnt been successful in calling getter methods in JavaScript. you think it can be done?
    Thanks for the reply
    GUL

  • How to display multiple records in smart forms in new page for each record

    Hi,
              How to display the data from a internal table in a smart form.
    I want each record to be displayed in seperate page.
    please tell me with example.
    thank u,
    Sarath

    Do this ,
       in the main window - open a loop on your internal table ,
    within the loop open the text and give the output fields,
    after this text  use the Command node and in this set the next page as page1,
    so when the loop gets executed its first record will be on the first page and the second record will be on the next page and so on ..
    Reward to usefull answers.

  • Copying master detail records in oracle forms

    Hi,
    Have a master details block , using a copy button i copy the existing contents
    in both the blocks , than primary key and foreign key value of the both blocks are changed and i want to save it as a new record.
    Problem is when i do the above it goes to record status as update
    it is not doing insert with the values.and throwing an error wrt referential integrity
    pls help
    with thanks

    This forum focuses on EBS. For Form specific questions, you can try Forms

  • How to modify-detail record

    I have a master detail form
    i have three items in detail
    i want to delete one of them
    i wrote
    clear_record;
    commit;
    on when button pressed
    but it not works
    regards
    vikas Singhal

    you'll have to use the delete_record built-in to delete a record.
    Clear_record removes the record from the block, but does not delete it.

  • How to put detail level data in the header of my report

    I have this XML from PIR05.rdf
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Oracle Reports version 6.0.8.28.0 -->
    <PIR05>
    <LIST_G_ITEM_NO>
    <G_ITEM_NO>
    <PAGE_NO>0</PAGE_NO>
    <ITEM_NO>4242301</ITEM_NO>
    <ITEM_DESC1>13MM Aries Cell Assembly</ITEM_DESC1>
    <LOT_NO>562354</LOT_NO>
    <LOT_DESC>4242301</LOT_DESC>
    <SUBLOT_NO></SUBLOT_NO>
    <LOCATION>WOR RECV</LOCATION>
    <GRADE_CODE>NONE</GRADE_CODE>
    <ITEM_UM>Each</ITEM_UM>
    <ITEM_UM2></ITEM_UM2>
    <LINE_NO>603</LINE_NO>
    <COUNT_NO>603</COUNT_NO>
    <P_ITEMUM2LABEL> </P_ITEMUM2LABEL>
    <P_ITEMUM2DASH> </P_ITEMUM2DASH>
    <F_ITEMUM2>1</F_ITEMUM2>
    <P_CSITEMUM2_LABEL> </P_CSITEMUM2_LABEL>
    <P_CSITEMUM2_DASH> </P_CSITEMUM2_DASH>
    </G_ITEM_NO>
    </LIST_G_ITEM_NO>
    <WHSE_DESC>OPM INVENTORY ORG</WHSE_DESC>
    <CS_NODATA>617</CS_NODATA>
    <CYCLE_NO>000000014</CYCLE_NO>
    <WHSE_OUT>WOR</WHSE_OUT>
    <DATE_OUT>2010-11-23T16:12:13+00:00</DATE_OUT>
    </PIR05>
    I have a template where I have a header section and a lines section which breaks the page on the value of the LOCATION. I would like to put the value of the LOCATION in the HEADER of the report. How do I reference the current value of LOCATION, for example on page 30?
    The report looks like this:
    whse_out cycle_no
    location lot_no
    location lot_no
    New page
    whse_out cycle_no
    location lot_no
    location lot_no
    How can I get the value of LOCATION in my "HEADER" section and have it be the same value as the first location listed on the page?

    Hi,
    you need to create an automated section break, .. in your for loop, add @section to the syntax.. that will create a section break everytime the node enters a new location info.. in the header just put in the tag for the location, it will pick up the first location and display it there..
    -domnic
    p.s. if youre not able to do it, send me your template with a sample XML file, ill see what i can do.

  • How to use a record in a form

    I have a pl/sql function that returns a record. I want
    to call it from a form. What can I do to hold the
    record data in the form?
    I want to do something like:
    formRecord := functionThatReturnsRecord();
    :formField1 := formRecord.one;
    :formField2 := formRecord.two;
    etc.
    Thanks,
    Tim

    Declare the record type in the package specification and use this type in Form. For example:
    WHEN-BUTTON-PRESSED trigger:
    DECLARE
    r T.TRec;
    BEGIN
    r:=T.Func;
    :BLock1.one:=r.one;
    :Block1.two:=r.two;
    END;
    Package spec:
    PACKAGE t IS
    TYPE TRec IS RECORD ( one varchar2(100), two varchar2(100) );
    FUNCTION Func RETURN TRec;
    END;

  • How to delete a record from a form

    Hello!
    I'm trying to delete a record from a table called PETS. The pet name is in a textbox from a data block called DELETE_PET.
    So i wrote in the WHEN_BUTTON_PRESSED_TRIGGER of the Delete button:
    select PETNAME into p_name from pets where PETNAME = :DELETE_PET.PETNAME;
    DELETE from PETS where PETNAME = p_name;
    clear_block(NO_VALIDATE);
    alert_id := find_alert('PET_DELETED');
    choice := Show_ALert(alert_id);
    commit;
    exception
    when NO_DATA_FOUND then
         alert_id := find_alert('PET_NOT_FOUND');
         choice := Show_ALert(alert_id);
         clear_block(NO_VALIDATE);
    rollback;
    end;
    And it's not working!!!!! :( :( :(
    Any help would be greatly appreciated!
    Thank you.

    Hi ,
    Write your trigger as....
    begin
    begin
       select PETNAME into p_name from pets where PETNAME = :DELETE_PET.PETNAME;
      exception
        when no_data_found
          then
            alert_id := find_alert('PET_NOT_FOUND');
            choice := Show_ALert(alert_id);
            clear_block(NO_VALIDATE);
            return;
    end;
    DELETE from PETS where PETNAME = p_name;
    clear_block(NO_VALIDATE);
    alert_id := find_alert('PET_DELETED');
    choice := Show_ALert(alert_id);
    commit;
    end;Question: Does your select statement return a value 'as you expect'...????
    Try to run your form in debug mode , and you may discover the deletion is not taking place.....
    Regards,
    Simon

Maybe you are looking for

  • MobileMe grayed out when trying to make new album..

    Hi there, Seems after the iTunes, iPod, MobileMe update, I haven't been able to subscribe to a MobileMe web gallery through iPhoto. Also, the one web gallery that is still subscribed is not showing up in iTunes when my iPod touch is plugged in. Just

  • Error in CDS View

    In my program I am fetching a certain type of inbound IDOC which in 53 status and updating my custom table, for which I have written a select query which executes perfectly but gives me an error while executing as a DDL source. Select Query in Progra

  • SSIS 2012 Project Deploymeny Progressively Slower

    I've noticed a gradual increase in the amount of time it takes for me to deploy a project to the SSIS Catalog. First of all, is there a way to deploy only specific packages or do I need to deploy the project everytime a package is added or changed? I

  • Simple (?) JRE installation question

    Java / Control Panel states current version is 1.6.0 (build 1.6.0_03-b05). I am cleaning up the Norton Internet Security 2005 Program Control list (list of programs that access Internet and how Norton controls that access) in anticipation of re-insta

  • Collage design for sequential tennis pictures

    The picture below gives an idea of what I am trying to accomplish, but have not been successful yet with PSE6 and would like to get help. http://www.pixentral.com/show.php?picture=1RZYg69oGz3uA2tS1Ov1CAsOqcHa0 3 original photos were taken with my cam