Conditional enabling of report fields

Hi,
I have a report region with 2 editable fields (based on DB columns). Lets call them A and B.
I want to enable editing A, only if B is empty, and enable editing B, only if A is empty.
If both are empty, then both should be editable, until the user enters a value to one of them, what will automatically disable the other one.
So how do I do it?
Thanks.
Anat :o)

Hello Anat,
"I want to enable editing A, only if B is empty, and enable editing B, only if A is empty."As the default state of the tabular form is that all columns are enabled, we need to reverse your logic to use the disable terminology. Therefore, if I'm not mistaken, the new logic is this:
- Disable cell in column A if cell in column B is not empty;
- Disable cell in column B if cell in column A is not empty.
This solution is base on two features of the tabular form columns. All the cells in a specific column have the same name. The name derived from the location of the column in the tabular form – The first column is f01, the second is f02 and so on. Every cell in the column has a unique id, derived from the column name and the row serial number. The first cell in the second column will have the id of "f02_0001" and the 4th cell in the same column will have the id of "f02_0004".
First, we will deal with the situation right after loading the tabular form. We are gathering all the cells from columns A and B and evaluate them. For the purpose of this example I'm assuming that column A is 4th, and column B is 6th. In the Region Footer of the report you should place something like the following code:
<script language="JavaScript" type="text/javascript">
<!-- Hide
var colA = document.getElementsByName('f04');
var colB = document.getElementsByName('f06');
for (var i=0; i<colA.length; i++) {
  if (colA.value.length > 0) {
colB[i].readOnly=true;
if (colB[i].value.length > 0) {
colA[i].readOnly=true;
// End Hide -->
</script>
Now we need to deal with the situation where both cells are empty, and the user change one of them. In the report attribute tab, you need to edit the specific columns attributes. In the "Element Attributes" of column A add onchange="setColBtoRO(this);", and for column B add onchange="setColAtoRO(this);"
The corresponding functions will be:
function setColBtoRO(pId)
   elmId = $x(pId).id;
   newElmId = elmId.replace(/f04/,'f06');
   $x(newElmId).readOnly=true;
function setColAtoRO(pId)
   elmId = $x(pId).id;
   newElmId = elmId.replace(/f06/,'f04');
   $x(newElmId).readOnly=true;
}You should add these functions before the closing </script> tag in the report footer.
JS is case sensitive. Please pay attention to that.
Hope this helps,
Arie.

Similar Messages

  • Dynamic enabling of input fields via radio btn in report selection screen?

    Hi there!
    I was wondering whether one can dynamically enable/disable input fields on a selection screen of a report-program.
    Or is this only possible for selection screens in dynpro-programs?
    If possible for reports - could you give an example?
    Thanx a lot.
    Andreas

    Hi,
    yes..You can dynamically disable and enable inputs fields in the selection screen..
    Check this ex..If you press the first radio button..The second input will be disabled...And vice versa..
    PARAMETERS: p_r1 RADIOBUTTON GROUP g1 USER-COMMAND usr DEFAULT 'X',
    p_r2 RADIOBUTTON GROUP g1.
    PARAMETERS: p_input1 TYPE matnr MODIF ID m1,
    p_input2 TYPE matnr MODIF ID m2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_r1 = 'X'.
    IF screen-group1 = 'M2'.
    screen-input = '0'.
    ENDIF.
    ELSE.
    IF screen-group1 = 'M1'.
    screen-input = '0'.
    ENDIF.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    Thanks,
    Naren

  • Report field condition

    In a report region.
    I can change the template to form region. Then the data shows as:
    Field1: data
    Field2:
    Field3: data
    Field1: data2
    Field2: data2
    Field3: data2
    Is it possible to set a condition that hides the field that is null:
    Field1: data
    Field3: data
    Field1: data2
    Field2: data2
    Field3: data2
    I've tried conditions that work on items, but can't get it to work on a report, is it possible.

    Hello.
    can you please elaborate on option 2
    Restrict your query based on period and create variant on this time characteristic so that no user input is required.
    I thought of a config table with
    Process chain    month  date
    For each PC user will fill a month and corresponding date, at the decision box in the process chain last step, we compare that with the system date and if matches we Broadcast to people.
    Is this a bad option ...please suggest.
    Regards
    Krishna

  • Dynamic Actions in Report Fields

    Hello,
    i am upgrading my apps with dyn. actions.
    so my question.
    I want to enable or disable Fields in my report based on the value of a field in my report.
    example
    report shows:
    checkbox_|__name__|__ value
    ____ X __|__Mark__| <enable field>
    ________|__petetr__| <disable field>
    ________|__maria__| <disable field>
    ____X___|__mike__| <enable field>
    if the checkbox for mark and mike is checked the value field for mark and mike should be enabled for the other should be disabled
    How can i do that with dyn. actions??
    regards
    volker strasser

    Hi,
    Somewhat complicated JS stuff required for this.
    Each field/cell in the tabular form has a HTML name like f01, f02,... and an HTML ID which is like f01_001, f01_002,..
    So, to access the cells you have you use HTML DOM object or JQuery selector , say DOM Object = ID and Condition = Javascript Expression. In JS Expression use Regular Expression to "evaluate" to "True" when the ID is like f01_%. ( I am lazy so I have not really written out the entire code).
    Then come the next part where you use the f01_nnnn to get the fmm_nnnn (target cell) to write back into....
    For such complicated stuff I still prefer the old fashioned way of using Apex_item and using the HTML Attributes to make calls to JS Functions using this , e.g. onchange="myfunc(this)".
    Regards,

  • Can You Use A Report Field Value In A Hyperlink?

    <p>I have a report field that I would like to be a link to another application. Making a report field a hyperlink to a web page was nice and simple.  However, I was expecting to be able to use the value of the field in the hyperlink something like...</p><p><a href="http://mywebsite/controller?action=servlets.ReportAlertDetailListAction&key={AlertSearch.ALERT_KEY">http://mywebsite/controller?action=servlets.ReportAlertDetailListAction&key={AlertSearch.ALERT_KEY</a>}</p><p>...where AlertSearch is the table name and ALERT_KEY is the field name.  Is there a way to use a report field in a hyperlink?  Would using a formula allow it to be dynamic?  The goal is to have each row of the report link to a URL with a different parameter.  I can see eventually redoing it as a drill down feature but the detail I need already exists in a separate application.</p><p>Thanks,</p><p>Ed</p>

    Hi Ed.
    I believe the conditional formula that you would use (don't just type in the text box - press the button for the formula first).
    "[http://mywebsite/controller?action=servlets.ReportAlertDetailListAction&key | http://mywebsite/controller?action=servlets.ReportAlertDetailListAction&key]=" + {AlertSearch.ALERT_KEY}
    The key is to use the conditional formula feature of the hyperlink feature.Â
    Enjoy!Â
         - Kathryn Webster (Report Design Consultant)
               Kat&#39;s News: http://diamond.businessobjects.com/blog/279

  • Multiple report fields from single physical column.

    Hi Experts,
    I have a physical table like below. Multiple records for a single customer id. The no of Address_type may increase in future.
    Customer_id     Address_Type         Address
    101                  Primary                   abcdefgh
    101                  Secondary               234oij3mb4
    101                  Billing                      mdmnweoij4
    102................etc.
    My Requirement on OBIEE is to display report as below.
    Customer_ID, Primary_Address, Secondary_Address, Billing_Address.
    101                 abcdefgh            234oij3mb4               mdmnweoij4
    Multiple report fields ( Primary_Address, Secondary_Address, Billing_Address ) are derived from same physical column ADDRESS.
    I tried to duplicate the Address column on the report thrice and added conditions like Address_Type = Primary/Secondary/Billing for those three fields respectively.
    But only of the field is getting correct data and rest of duplicate columns are null.
    Tried FILTER function on OBI Answers, but the function fails saying it should be used only on measures.
    Thought the alternative would be to define multiple logical columns at BMM layer. Created multiple alias for same table at physical layer and correspondingly created LTS for each on a single logical table. Defined Fragmentation/Where conditions.
    LTS1 - Address_Type = PRIMARY
    LTS2 - Address_Type - SECONDARY
    LTS3 - Address_Type - BILLING
    Created multiple logical columns from each LTS like Primary_Address, Secondary_Address, Billing_Address from LTS1, LTS2, LTS3 respectively.
    This time, am getting data for all the fields on the report but getting cartesian result.
    Can someone guide me whether my approach is correct or any other alternate best approach to achieve the desired result.
    Note: I have the data Address on multiple physical rows for a customer, rather Not in a single row. which is causing me problem.
    Thanks...
    Ramchand.

    Hi Srini VEERAVALLI,
    I have lot many other fields in the same report coming from other tables.
    Does the Pivot table option for above mentioned Address fields affect other columns?
    If Yes, Can there be any other alternative? Am thinking of Opaque View at Physical layer to bring all Addresses on a single row.
    Thanks...
    Ramchand.

  • Condition type wise report

    can we have condition type wise report of all billing documents executed
    thanks
    srinivasan

    See u r prices are in KONV & Billing Tables are VBRK & VBRP
    VBRK is Header Table
    VBRP is Detail table
    Now enter billing document number in VBELN field of VBRK & extract KNUMV i.e Document Condition.
    Also enter billing document number in VBELN field and material number in field of MATNR & extract Item Number POSNR,
    So now u are having Document condition & item number
    Put this two things in KNUMV & KPOSN fields of KONV & u will get all values in KWERT according to Condition Type.
    I hope this will help u.
    Regards
    SWAPNIL

  • How Make the Report Fields Read only

    Hi I have drop down selection in a Report field.After selecting a particular value and submiting it the field should become readonly.

    Hi SanjayBala!
    Create a conditional branch that will be executed if your select list submits (the branch must be conditional. The conditiontype is request = e1 and e1 is the name of your select list). This Branch ought to have a request (lets say select_list_ro). Create a read only condition for your select list (request = e1) that comes to use if the current request is select_list_ro.
    Hope that helps!
    yours sincerely
    Edited by: Florian W. on 03.02.2009 14:04

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • Enabling BW reports for a specific port

    Hi All,
    How to enable BW reports for a specific prot?.
    Our requirement is Report should run FIRST, if I type the URL manually with the port we configure in SICF.
    Thanks in Advance.
    Regards,
    Ravi Chelikani.

    Ravi,
    the port is configured per protocol (HTTP, HTTPS, etc) in transaction SMICM.
    Regards,
    Marc
    SAP NetWeaver RIG, US BI

  • Condition Value in a Field of Service Request

    my problem is this:
    I want to insert a condition Value to a field(Long text) called "Recapito per il ricontatto".
    Condition is this: I have another field called "Canale di Ricontatto" (Picklist) that have 4 choices: Telephone,*E-mail*,*Fax*,*P.E.C*
    Now the condition value of "Recapito per il ricontatto"(Long Text) is this:
    IF "Canale di Ricontatto" (Picklist) IS DIFFERENT Telephone(one choices of Picklist) THEN length least 7 characters
    IF "Canale di Ricontatto" (Picklist) IS Telephone THEN no length least.
    NOW in a FIELD "Recapito per il ricontatto"(Long text)field where I must insert the validation field,I put the Default value 'a' and i check the option Default value back and after i write in a validation field:
    IIf([<plCanale_di_Ricontatto_ITAG>] < > LookupValue("OCC_CUST_LOV_SR_3", "Telefono"),Len([<ltRecapito_per_il_ricontatto_ITAG>])>6,Len([<ltRecapito_per_il_ricontatto_ITAG>])>=1)
    But when i choose Telephone and i don't write nothing in a Long Text field("Recapito per il ricontatto") the allert goes out and when i choose another choice and i put for example 'aaaaaaaaaa'(10 characters) the allert goes out again. The allert goes out always.
    Please HElp Me
    Tank you,
    Vale

    I have resolved in this way:
    Default value field (codice ASCII 255) and Ceck default back
    And condition
    [<plCanale_di_Contatto_ITAG>]<>LookupValue("OCC_CUST_LOV_SR_3", "Telefono")AND Len([<ltRecapito_per_il_ricontatto_ITAG>])>6 OR [<plCanale_di_Contatto_ITAG>]=LookupValue("OCC_CUST_LOV_SR_3", "Telefono")AND Len([<ltRecapito_per_il_ricontatto_ITAG>])>=1

  • Code for reports field

    Hello,
    In Administration -> Setup -> Business Partners -> Countries there is a field called 'Code for Reports'.  Does anyone know what this field is for?  I thought it was for possibly putting in a different variation of the country code, e.g UK instead of GB to be displayed on printouts however it is not being displayed when i print preview/print.
    Any advice is appreciated.
    Many thanks,
    Kate

    Hi Gordon,
    I've tried displaying code on the print layout too but this does not get pulled through either.  I would like to use the 'code for reports' field to display 'UAE' instead of 'AE'. 'AE' is the default country code for United Arab Emirates which cannot be changed however the users would like to see 'UAE' instead.
    Kind regards,
    Kate

  • Crystal Reports Field Explorer not showing

    Hi,
         I am using Visual Studio 2003 with the bundled version of Crystal Reports.  It has always worked fine until recently the Field Explorer tool bar does not show up anymore when I open a Crystal Report for development.  I have uninstalled the entire Visual Studio and reinstalled the Visual Studio but it still will not show the Crystal Reports Field Explorer.  However, if I install the Visual Studio on a completely different computer it works fine.  Anyone have any idea what could be causing this problem on my main computer?  Could it be a setting somewhere in the Visual Studio?  I cannot find any information on this problem.
    Thanks,
    Razzle

    Ok, I figured out what the problem was.  It was something wrong in my Windows profile.  So I deleted my Windows profile and created a new one and it is working now.
    Razzle

  • Condition in the report!!! URGENT

    Hi Gurus,
              I am filtering a charectaristic in the report by A, B, C and D. If the characteristic type is A or B, then, the key figure has to be negative.How to achieve this using conditions in the report????
    I already tried using conditions in the query, but it doesnt work. Is there any possibilities using Formula variable or replacement path variable???if so, how can I do that???
    Any Help appreciated with points.
    Regards,
    PNK
    Edited by: pnk on Mar 27, 2008 6:17 PM

    Hi PNK,
    Create a restricted key figure based on your key figure restricting the characteristics tO A and B.
    Hide this restricted key figure in display properties.
    Based on this restricted key figure create a formula multiplying the same by (-1).
    Hope this helps,
    Ajay

  • Dynamically set report field value

    In my old classic VB project, I was able to set a report field value using the following simple line of code.
    someReport.SomeField.SetText u201Cabcu201D
    This was nice and simple, now with crystal reports .Net I do the following:
    ((TextObject)someReport.SectionX.ReportObjects["SomeField"]).Text = u201Cabcu201D;
    Itu2019s simple enough but seems too elaborated compared to the good old VB6.
    Not that is a big deal but is there a simpler way (Classic VB6 style) to set a field on a report without me having to create my own utility method to u201Csimplifyu201D things?
    Thanks.

    Perhaps using a formula?
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    Other than that, InProc RAS, but if the solution you have is complicated, you ain't seen nothing yet
    - Ludek

Maybe you are looking for

  • How do I zoom in and out on my iPad videos

    How do I zoom in and out using my ipad video?

  • How to Get a list of pending deferred tasks

    Hi all there is a bunch of unfinished threads here asking how to get a list/report of deferred tasks that are associated with user objects and scheduled for future execution. I need this list and I can't find out how to get it anyway. I don't care if

  • Buttons not working in Flash 9 Player

    I recently created a header bar in Flash 8. All of the menu buttons were working perfectly in Flash 8 but do not in Flash 9. Did some rules change? The buttons all call getURL functions to load pages.

  • Is it possible to use "c/c++" developed library in java?

    hello all i have a convertor. which convert wav to mp3 and it is developed using "c". now i want to use that in java. is it possible? if possible then how? i am working in a project where the project (convertor) will be in server and client will acce

  • Express HD and 720P File Formats

    Hey everyone, I've got a question. I purchased a new flash based camcorder, it's an Insignia NS-DV1080P, cheap yes, but it gets the job done. I shot a bunch of footage in 720P in a QuickTime MOV format thinking that since I have a Mac that this would