Filter expressions on hidden fields

I have 11 (eleven) different columns in a Report Builder 3.0 report. There can be multiple rows to this report depending on the date range selected. In those columns/rows, some data is hidden at times depending on another filter expression. The last column
on the right is a field that will sum up all numbers in the columns to the left. Is there a way to sum up only the columns that have data visible? Currently, the sum is based on all rows to the left even if the data is hidden.

Hi jim_JNCIP,
As you mentioned that the totals are still not correct. Some of the lines do not total at all and others total all fields even if hidden. This can be caused by the relationship between Hidden expression  and the SUM expression. Did you used total 
10 IIF function in the SUM expression? If so, that is the problem.
You have provided an hidden expression last time as below and I would like to know If you have just add this hidden expression to the column2(Part_2_Total_Amt) ,right? and is there any other hidden expression to other column? also check the expression is
correct:
=IIF(Fields!Acct_Class_Code_Part_2.Value = "RES" AND Fields!Supplier_2.Value = "Certain Text", false, true)
Note: This hidden expression means when Fields!Acct_Class_Code_Part_2.Value = "RES" AND Fields!Supplier_2.Value = "BURNER SYSTEMS INTL De M" the related amount will show(True is for hide and false is for display)
Please check below to make sure you have using the right IIF function in the SUM:
If the expression just added in the fields [Part_2_Total_Amt] (right click the fields and select the Texbox Properties and select the visibility to add the expression), then the expression will just hide some of the value of the column2(Part_2_Total_Amt),
So you don’t need to use the IIF function in the sum of the other column. Only the column which you have added the hidden expression will add the IIF function to get the sum Corresponding.
=Sum(Fields!Part_1_Total_Amt.Value)+ Sum(IIF(Fields!Acct_Class_Code_Part_2.Value = "RES" AND Fields!Supplier_2.Value = "BURNER SYSTEMS INTL De M",0, Fields!Part_2_Total_Amt.Value))+ Sum(Fields!Part_3_Total_Amt.Value)…
If all the Columns(total 10 ) both need to show the fields base on this conditions:  Fields!Acct_Class_Code_Part_N.Value = "RES" AND Fields!Supplier_N.Value = "BURNER SYSTEMS INTL De M" you will need to add hidden expression on
both columns(Part_N_Total_Amt)( right click the fields and select the Texbox Properties and select the visibility to add the expression):Sum expression add 10 IIF functions:
= Sum(IIF(Fields!Acct_Class_Code_Part_1.Value = "RES" AND Fields!Supplier_1.Value = "BURNER SYSTEMS INTL De M",0, Fields!Part_1_Total_Amt.Value))+Sum(IIF(Fields!Acct_Class_Code_Part_2.Value = "RES" AND Fields!Supplier_2.Value
= "BURNER SYSTEMS INTL De M",0, Fields!Part_2_Total_Amt.Value))+ … +Sum(IIF(Fields!Acct_Class_Code_Part_10.Value = "RES" AND Fields!Supplier_10.Value = "BURNER SYSTEMS INTL De M",0, Fields!Part_10_Total_Amt.Value))
If I have some misunderstanding ,please provide me more details about where you want to using the hidden expression.
If you still have any question, please feel free to ask.
Regards
Vicky Liu

Similar Messages

  • Can't set a hidden field value from onClick event with a runtime expression

    Hi,
    I need to set a hidden field in an onClick event of button but it's not working.
    <html:submit styleClass="btnLink" onclick="document.empForm.hidden.value='<%= empID%>'">
    <%= empID%>
    </html:submit>
    Althought the second expression is evaluated and written successfully "the button value"
    I heard that this is because you can't mix the value of an attribute of a custom tag with both string literal and run time expressions.
    Is there any work around to solve that?
    I can't use EL as I'm using old JSP version

    I guess, it should work; instead of html:submit, try with button.

  • How to use the prompted value in the filter expression

    Hi
    Is it possible to use the prompted value in the filter expression?
    My requirement is that user will be prompted for a date field and I need to filter the records such that the records are displayed for the last 5 weeks from the date entered by the user.
    If somehow I know how to use the prompted value in the filter expression then this requirement is easy to be done. If this is possible, please guide me?
    If there are other ways to acheive the desired results then please suggest.
    Thanks
    -Jaz

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • SSRS dataset filter expression using OR

    I have a dataset that I need to set a filter for. What I need the filter to do is check 3 different fields to see if either one of them are in a parameter. The parameter is multi-value. So, I have a parameter set to 1, 2, 3. I need the dataset to return
    records where either Field A, B, or C are IN 1, 2, 3.
    Anyone know how to do this? I tried to have the filter expression = Fields!A.Value or Fields!B.Value or Fields!C.Value then the dataset filter operator "IN" and the dataset filter value = Parameter, but I just get an error on the dataset filter
    (cannot evaluate filter expression error)

    Hello,
    Mulitple expressions added to SSRS dataset filter are evaluated as AND (Expr1 AND Expr1 AND Expr3). If you are looking for a OR like Expr1 Or Expr2 Or Expr3 then you can use this solution explained below.
    Dataset Query used for this test:
    select *
    from (values ('Row1',1,1,4),('Row2',2,1,3),('Row3',3,1,2),('Row4',3,2,2),('Row5',5,3,2),('Row6',5,6,7),('Row7',2,6,7)) x(DataRow,A,B,C)
    Report Parameter :
    Defined a multi select report parameter named "Parameter1" with string datatype and added values 1, 2, 3.
    Dataset Filter Expression:
    =Filter(Parameters!Parameter1.Value,CStr(Fields!A.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!B.Value)).Length + Filter(Parameters!Parameter1.Value,CStr(Fields!C.Value)).Length
    The expression above uses the Filter function in SSRS to check if the field A\B\C has any match in the parameter1 mutli select parameter. If yes the length property will return a value > 0. Repeat the expression for all the other fields and add the Values
    for length property.
    Use > operator in the filter dialogue box
    and value as 0 as shown in the snapshot below.
    The output is shown below. Row 6 is missing as Field A, B or C doesnt have 1, 2,3 as values. If this is the output you are looking for this solution should work for you.
    --sIbu

  • Adding dynamic filter expressions

    I am working on a ESB flow and I wanted to write a filter expression that can dynamically fetch database values and accordingly route the flow.
    Since it didnt work, I thought of assigning this to a xsl variable and compare this variable value in the next Routing Service node Filter Expression.
    So I tried as follows: filterVar" variable holds the value of what I am looking for.
    <xsl:template match="/">
    <inp1:CommitmentRequest>
    <xsl:variable name="filterVar" select='orcl:lookup-table("accounts","dest",/imp1:AccountsRequest/imp1:Code/imp1:SITEID,"acc_code","DSname")' />
    and in the next Routing Service I have an expression written as:
    $filterVar = 'ACC1'
    Is it the correct way of doing? By approaching this variable assignment, I will be adding a Routing Service un necessarily. Still, if this is the way it is going to work and if there is no straight forward way, I will have to use this approach.
    Please note that "/imp1:AccountsRequest/imp1:Code/imp1:SITEID" is the correct tree structure as I can assign this value directly in XSL mapping to a new field of target XML. I didnt want to assign this way as I dont want to create a new variable in XML as it will never be used as data in successive stages.
    Thanks,

    Thanks Dave.
    Certainly the namespace issue was there. But, even with that issue fixed, message is not passing the filter stage.
    I mapped this expression to a target element of target xml and it assigned a value of 'ACC1' to it.
    orcl:lookup-table("accounts","dest",/inp1:AccountsRequest/inp1:Code/inp1:SITEID,"acc_code","DSname")
    The strange thing I noticed id that in none of the cases as montioned below, the message doesnt pass the filter stage.
    $filterVar = 'ACC1'
    $filterVar != 'ACC1'
    Any idea why?
    Instead of using variable assignment method, do you have any other idea that lets me retrieve database values on the fly and make decisions?
    I tried lookup-table() in filter expression directly, that didnt work either. Ideally, I wanted this approach to work.
    I have also tried data enrichment as suggested by Allan Galsgow. Didnt have any luck either.
    Thanks,
    Note: The varaible assignment is done as follows in the xsl mapping:
    <xsl:variable name="filterVar" select='orcl:lookup-table("accounts","dest",/inp1:AccountsRequest/inp1:Code/inp1:SITEID,"acc_code","DSname")' />
    Message was edited by:
    user582595
    Message was edited by:
    user582595

  • How to set hidden field value in form?

    I've encountered a problem while developing a forum using JSF. See this code:
    <h:form id="commmentForm" formName="commentForm" >
         <h:input_hidden id="pageId" valueRef="CommentBean.pageId" value="${article.id}"/>
         <h:input_text id="userName" valueRef="CommentBean.userName"/>
         <h:input_text id="userEmail" valueRef="CommentBean.userEmail"/>
         <h:input_text id="userURL" valueRef="CommentBean.userURL"/>
         <h:input_textarea id="content" valueRef="CommentBean.content"/>
         <h:command_button id="submit" label="Leave A Comment" commandName="submit" actionRef="CommentBean.createAction" />
    </h:form>
    I was trying to specify a hidden field that represents the unique ID number of the current article using <h:input_hidden> tag above. But RI complains that runtime expression is not permitted in 'value' attribute. So I set the attribute 'value' to arbitrary number such as '2', but it seems that CommentBean.pageId is still null.
    So the question is:
    1. Why can't I use EL in JSF tags attributes?
    2. How can I resolve my problem mentioned above?
    Thanks very much in advance!

    To solve the problem, you have to use two hiddenfields, say:
    <h:input_hidden id="pageId"valueRef="CommentBean.pageId" />
    <h:input_hidden id="articleId" valueRef="article.id"/>
    I want to set the value of CommentBean.pageId to
    ${article.id} (article is not a managed bean) and to
    let CommentBean.createAction insert a database row
    whose page_id column is ${article.id}, so I think the
    tags you suggested won't work for me.Why can't you interrogate your ComponentBean for its pageId property during your invoke() method? By the time your invoke() method is called, the value from the hidden field will have been pushed to the model, so this should be no problem. You could do Application.getValueBinding("ComponentBean.pageId").getValue() to do so.
    Ed

  • Pass Hidden Field (Rep ID) as Parameter when user logs into site

    I have set-up user validation to my site based on a userID and password, but I want to also pass a hidden field/parameter (RepID) to the rest of the site pages so that I can filter my record sets on those pages based on that RepID parameter.
    I have coded everything the way I thought it should be, but I'm getting the following error when I test it and from what I can see it is defined...
    Element PSWD is undefined in FORM.
    Here is the form coding, as well as the CF coding for the user validation...
    <form id="login" name="login" method="POST" action="<cfoutput>#MM_loginAction#</cfoutput>">
                    <table border="0" cellspacing="0" cellpadding="5">
                      <tr>
                        <td height="35" class="text_bold">Email</td>
                        <td height="35"><label for="email"></label>
                          <input type="text" name="email" id="email" /></td>
                      </tr>
                      <tr>
                        <td height="35" class="text_bold">Password</td>
                        <td height="35"><label for="pswd"></label>
                          <input name="pswd" type="password" id="pswd"  value="<cfoutput>#rsWeblogin#</cfoutput>" /></td>
                      </tr>
                      <tr>
                        <td height="35" class="text_bold"><input  name="salesman_id" type="hidden" id="salesman_id"  value="<cfoutput>#rsWeblogin.SALESMAN_ID#</cfoutput>"  /></td>
                        <td height="35"><input type="submit" name="submit" id="submit" value="Submit" /></td>
                      </tr>
                    </table>
                  </form>
    <cfparam name="FORM.email" default="1">
    <cfquery name="rsWeblogin" datasource="INSORB">
    SELECT *
    FROM dbo.WEBLOGIN
    WHERE E_MAIL = <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64">
    </cfquery>
    <cfif IsDefined("FORM.email")>
        <cfset MM_redirectLoginSuccess="index.cfm">
        <cfset MM_redirectLoginFailed="login.cfm">
        <cfquery  name="MM_rsUser" datasource="INSORB">
        SELECT E_MAIL,PSWD FROM dbo.WEBLOGIN WHERE E_MAIL=<cfqueryparam  value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64"> AND  PSWD=<cfqueryparam value="#FORM.pswd#" cfsqltype="cf_sql_clob"  maxlength="15">
        </cfquery>
        <cfif MM_rsUser.RecordCount NEQ 0>
          <cftry>
            <cflock scope="Session" timeout="30" type="Exclusive">
              <cfset Session.MM_Username=FORM.email>
              <cfset Session.MM_UserAuthorization="">
            </cflock>
            <cfif IsDefined("URL.accessdenied") AND true>
              <cfset MM_redirectLoginSuccess=URL.accessdenied>
            </cfif>
            <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
            <cfcatch type="Lock">
              <!--- code for handling timeout of cflock --->
            </cfcatch>
          </cftry>
        </cfif>
        <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
        <cfelse>
        <cfset MM_LoginAction=CGI.SCRIPT_NAME>
        <cfif CGI.QUERY_STRING NEQ "">
          <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
        </cfif>
    </cfif>
    Any help would be greatly appreciated!

    I don't have anything definitive to offer other than a couple of questions based on what I see on your login form:
    1. What is rsWeblogin that you are using to initialize the password field PSWD on the form? I would have expected the password field to be left empty in generating the form...
    2. The use of "#rsWeblogin#" to initialize the PSWD field, coupled with the use of "#rsWeblogin.salesman_ID#" to initialize the hidden field strike me as odd; that second one would lead me to believe rsWeblogin is a structure of some sort, and I'm not sure what you would be getting crunched into the password field as a result...
    Maybe one of those might give you some sort of clue?
    In addition, if the password field is left empty on the form itself, you may well not be getting a FORM.pswd variable coming through the submittal. You may need to either check that it is defined (probably best) or cfparam it to a known value that would never be used for a "real" password (problematic for all sorts of reasons) before using it in the authentication logic.
    /ron

  • Pass Hidden Field (Rep ID) as Parameter when user logs into site (CFusion)

    I have set-up user validation to my site based on a userID and password, but I want to also pass a hidden field/parameter (RepID) to the rest of the site pages so that I can filter my record sets on those pages based on that RepID parameter.
    I have coded everything the way I thought it should be, but I'm getting the following error when I test it and from what I can see it is defined...
    Element PSWD is undefined in FORM.
    Here is the form coding, as well as the CF coding for the user validation...
    <form id="login" name="login" method="POST" action="<cfoutput>#MM_loginAction#</cfoutput>">
                   <table border="0" cellspacing="0" cellpadding="5">
                     <tr>
                       <td height="35" class="text_bold">Email</td>
                       <td height="35"><label for="email"></label>
                         <input type="text" name="email" id="email" /></td>
                     </tr>
                     <tr>
                       <td height="35" class="text_bold">Password</td>
                       <td height="35"><label for="pswd"></label>
                         <input name="pswd" type="password" id="pswd"  value="<cfoutput>#rsWeblogin#</cfoutput>" /></td>
                     </tr>
                     <tr>
                       <td height="35" class="text_bold"><input  name="salesman_id" type="hidden" id="salesman_id"  value="<cfoutput>#rsWeblogin.SALESMAN_ID#</cfoutput>"  /></td>
                       <td height="35"><input type="submit" name="submit" id="submit" value="Submit" /></td>
                     </tr>
                   </table>
                 </form>
    <cfparam name="FORM.email" default="1">
    <cfquery name="rsWeblogin" datasource="INSORB">
    SELECT *
    FROM dbo.WEBLOGIN
    WHERE E_MAIL = <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64">
    </cfquery>
    <cfif IsDefined("FORM.email")>
       <cfset MM_redirectLoginSuccess="index.cfm">
       <cfset MM_redirectLoginFailed="login.cfm">
       <cfquery  name="MM_rsUser" datasource="INSORB">
       SELECT E_MAIL,PSWD FROM dbo.WEBLOGIN WHERE E_MAIL=<cfqueryparam  value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64"> AND  PSWD=<cfqueryparam value="#FORM.pswd#" cfsqltype="cf_sql_clob"  maxlength="15">
       </cfquery>
       <cfif MM_rsUser.RecordCount NEQ 0>
         <cftry>
           <cflock scope="Session" timeout="30" type="Exclusive">
             <cfset Session.MM_Username=FORM.email>
             <cfset Session.MM_UserAuthorization="">
           </cflock>
           <cfif IsDefined("URL.accessdenied") AND true>
             <cfset MM_redirectLoginSuccess=URL.accessdenied>
           </cfif>
           <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
           <cfcatch type="Lock">
             <!--- code for handling timeout of cflock --->
           </cfcatch>
         </cftry>
       </cfif>
       <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
       <cfelse>
       <cfset MM_LoginAction=CGI.SCRIPT_NAME>
       <cfif CGI.QUERY_STRING NEQ "">
         <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
       </cfif>
    </cfif>
    Any help would be greatly appreciated!

    The userID and the repID are both unique to the user, but are used for different identification purposes. Both fields are in the same user login table...
    I was able to solve the problem by adding <cfset Session.RepID=MM_rsUser.SALESMAN_ID> and adding the SALESMAN_ID field to the <cfquery>
    Now it works great!
    Thank you for your response!

  • The filter expression is on external data and could not be validated.

    The filter expression is on external data and could not be validated. It may not be supported in Web browser forms.
    I am reciveing this error in my infopath 2010 browser form when I am trying to filter a drop down list from sharepoint.
    I thought filters were available on infopath 2010 browser forms or are they only available from values inside the form?
    I did have a look around the forums but only could find this error occuring during beta stage.
    Thanks

    Ok, so you shouldn't be filtering in the form, because that means it downloads the entire list first and then filters out the items.  That's client-side filtering.  What you want to do is server-side filtering by doing a parameterized query.
    Set the data connection NOT to automatically download
    Add Form Load rules that do the following:
    First, "Set a Field's Value" and set the position query node of the data connection to the value of "manager" (whatever the exact syntax is)
    Then query the data connection
    Doind this should make it ONLY download items where position=manager instead of downloading all items and filtering.  This is a much better practice and was not even available in 2007, so you should make full use of it in 2010.  Even so, what you
    were doing should have worked anyway, so I'm not sure what's going on there.
    When you do the filtered dropdown, your Source field should be the repeating group of the data connection, not the property itself.  The property should only be selected in Value and DisplayName.  The group should be in the Source field, and THAT'S
    where you apply the filter.
    SharePoint Architect || Microsoft MVP ||
    My Blog
    Planet Technologies ||
    SharePoint Task Force

  • How to not make a report NOT print hidden fields

    I have a report were i have alot of hidden fields under my real report. My report uses calculations from the hidden fields.
    My problem is that when i run the report and export it to for example PDF. It generates 4 pages. 3 of them are empty and the first one is the one i only want to use.
    I think this is because i have so meny hidden fields. So can i do something so that the pages with hidden fields do not get exportet?
    Systemdeveloper @ 4film

    Hi Edvard,
    According to your description, when exporting the report, you don't want to have the hidden fields exported. Right?
    In Reporting Services, when we export a report, all the parts in this will be exported including all the hidden report parts. In this scenario, even you cancel the page break and make it together on one page, those hidden fields will still be exported
    as blank space in your report. And if there are too many hidden parts, it will exceed the page size and still have blank page in your report. So for your requirement, we suggest you use some function like Lookup(), LookupSet() in expression to do calculation
    for other data fields instead of using a lot of hidden fields.
    Reference:
    Lookup Function (Report Builder and SSRS)
    LookupSet Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou 
    Correct, i don't want them exported. when i generate the report all my required data fits on one page. And then i get three blanks.
    Systemdeveloper @ 4film

  • Pivot Table - Calculate Variance - Hidden Fields?

    I need some help adding a target value field inside a pivot table in excel.
    Here is what my current pivot table looks like.
    Regions                  1 year - Actual              1 year - Target??               
    Difference
                       (April 2013 to MArch 2014)                                          
     (Target - Actual)?     
    Region1                $6,355,696.75
    Region2                $6,775,309.87
    Region3                $2,230,424.76
    Regions expand into managers which in turn expand to consultants.
    What I want to do is add a column for target values of the 3 different regions and then create another calculated field that will show the difference between the target and actual values.
    Can this be done without writing any stored procedures in SQL? I want to do this in excel itself.
    The target values are not calculated so can we store them in hidden fields or something in the pivot or excel?

    1. Click anywhere in Pivot and go to Options tab > Formulas > Calculated Field.
    2. Create a calculated field called Target (whatever name your choose). If your target is say 7000000, put this value in Formula field. You may put it with or without =
    3. Now after this, you can once again create a new Calculated Field. Let's say this is Variance. If you variance is Target - Actual, put this as =Target-Actual in Calculated Field.
    4. Your pivot will have whatever you wanted.

  • How to pass hidden field values on a click of a table row

    hi all,
    href = "bookAndNonBook.do"
    I am very new to struts. I have created a table using displaytable tag which displays results in a tabular format. In addtion, i have a hidden field (prodType), the table rows are getting highlighted when i get my mouse on a particular row.
    Following is the code from the results.jsp file
    <body
    onload="addRowHandlers('row', 'rowMouseOver')"
    bgcolor="#FFFFFF" text="#000000" leftmargin="100" topmargin="50"
    marginwidth="" marginheight="" rightmargin="30">
    <html:form action="/bookAndNonBook" method="post">
    <display:table name="sessionScope.productSearchList" id="row"
    sort="list" export="true" defaultsort="1" defaultorder="ascending"
    pagesize="15" decorator="org.displaytag.decorator.TotalTableDecorator"
    class="dataTable">
    <display:column property="prodType" title="ProdType" class="prodType"
    headerClass="prodType" media="html" />
    <display:column title="Title" property="titleName" sortable="true"
    class="title" headerClass="title" />
    </display:table>
    </html:form>
    </BODY>
    I am calling a funtion addRowHandlers which passes the table id (which is row) and the rowMouseover for highlighting the rows on mouse over.
    the code for function addRowHandlers is
    function addRowHandlers(tableId, rowClassName) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
    rows.onmouseover = function () {
    previousClass = this.className;
    this.className = this.className + " " + rowClassName ;
    this.style.cursor="hand";
    rows.onmouseout = function () {
    this.className = previousClass;
    this.style.cursor='';
    rows.onclick = function (){
    var cell = this.getElementsByTagName("td")[0];
    var ProdType = cell.innerHTML;
    alert("value of prodType = " + ProdType);
    when i run the above code and click on a particular row it returns me the value in the hidden field i.e. prodType for that particular row
    Now where i am having problem is i want that on the basis of prodType my jsp file should call different actions for different prodType as returned....somwhat a function like this
    function submitProduct(prodType) {
    if(prodType == "BK")
    resultsForm.action = "/bookProduct.do";
    else if(prodType == "NB")
    resultsForm.action = "/nonbookProduct.do";
    but i am unable to figure out that how do i this..
    Any help will be really appreciated
    Thanks
    Sam

    can you please suggest some good struts forums where i can post my question
    thanks in advance
    Sam

  • Hidden field in form returns null value

    Hi all - I searched for this but found nothing that fit my problem although various other problems came up.
    I have a Login jsp, with a simple form for username and password:
    <form name="login" method="post" action="servlet/ControlServlet"
    onSubmit="return validateForm()"><table width="180" border="0"
    cellspacing="0" cellpadding="0">
                <tr>
                  <td width="96" class="logintext">Username</td>
                  <td width="84"> </td>
                </tr>
                <tr>
                  <td><input name="username" type="text" size="15"
    maxlength="15"></td>
                  <td><input type="submit" name="Submit" value="Login"></td>
                </tr>
                <tr>
                  <td class="logintext">Password</td>
                  <td> </td>
                </tr>
                <tr>
                  <td class="logintext"><input name="password" type="password"
    size="15" maxlength="15"></td>
                  <td><input name="actionCode" type="hidden" value="0"></td>
                </tr>
                <tr>
                  <td> </td>
                  <td><div align="center"><a href
    ="Register.jsp"><i>Register</i></a></div></td>
                </tr>
              </table>
              </form>Nothing complex in that form. my hidden field is actionCode and it should pass a 0 to my ControlServlet servlet.
    Here is a snippet from my servlet:
    import java.io.* ;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ControlServlet extends HttpServlet {
      public void doPost(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
        response.setContentType("text/html");
                //get the printwriter to output for debugging
                PrintWriter out = response.getWriter();
                //read in form variables
            //String formUsername = request.getParameter("username");
            //String formPassword = request.getParameter("password");
            String action = request.getParameter("actionCode");
            //convert String to int for action
            //int actionInt = Integer.parseInt(action);
            //add action variable to request
            request.setAttribute("aktion", action);
                //debug point 1
                //use requestDispatcher to forward session info to JSP
               RequestDispatcher dispatcher =
               request.getRequestDispatcher("/mvcoutput.jsp");
               dispatcher.forward(request, response);I have commented out a bit for debugging purposes, but basically, the form variables are read in, the username and password don't give me any problems, but the actionCode does. Upon forwarding to a basic jsp for testing my output displays value "null" when using the command:
    request.getAttribute("aktion")Any reason why the hidden field is playing silly buggers ??
    cheers

    Anyone ???
    If I have a field in an html form which is hidden, do I retrieve it in the SAME WAY that I retrieve the non hidden form fields i.e. using the request.getParameter() method ??
    Cheers.

  • Add hidden fields in ALV

    Hi all,
       I wanna add a new field in ALV field catalog, so that when user choose function Change Layout to decide which fields are showed, they can choose the new field.
    In orginal source, the ALV uses field catalog from structure<b> LIPOV.</b> And the field I wanna add is just a normal text field (char15, for example) and its data will be extracted from a select statement.
    So, Here is the logic of report:
    data: ls_fieldcat type slis_fieldcat_alv.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
            exporting
              i_internal_tabname     = 'itab_data1'
              i_structure_name       = 'LIPOV'
              i_client_never_display = 'X'
            changing
              ct_fieldcat            = ct_fieldcat[]
            exceptions
              inconsistent_interface = 1
              program_error          = 2
              others                 = 3.
    After this call, i add new field
        ls_fieldcat-col_pos = 110. " above function will retrieve a field catalog with 109 records
        ls_fieldcat-fieldname = 'new_text_field'.
        ls_fieldcat-tabname = 'itab_data1'.
        ls_fieldcat-seltext_l = 'NEW'.
        ls_fieldcat-no_out = 'X'.
        APPEND ls_fieldcat to ct_fieldcat .
        clear ls_fieldcat.
    Here, I copy all data from<b> itab_data</b> to <b>itab_data1</b>
    Display:
       call function 'REUSE_ALV_LIST_DISPLAY'
          exporting
            i_buffer_active          = 'X'
            i_callback_pf_status_set = gf_status
            i_callback_user_command  = gf_user_command
            i_structure_name         = 'LIPOV'
            is_layout                = gs_layout
            it_fieldcat              = ct_fieldcat
            it_events                = lt_events             
            it_sort                  = gt_sort
            is_variant               = gs_variant
          tables
            t_outtab                 = <b>itab_data1</b>
          exceptions
            program_error            = 1
            others                   = 2.
    Please note that there are something special here:
    Originally, ALV displayed with internal table itab_data.
    The new filed is a part of internal table itab_data1.
    <b>And the problem is:</b>
      When I choose Change Layour (Ctrl F8) to select the new field to display, It does not appear in HIDDEN FIELD.
    Any suggestion, plz.
    Thank you very much.

    Clemens Li,
    Thanks for your advice.
    I have a new problem. Now, the new field appears in Selection. However, displaying the new  field is impossible. My problem is:
    - In default, 8 fields will display. Then, I use CHANGE LAYOUT to choose the new field which will be at 9th position. -> <b>I got a dump</b>... It informs that a Field Symbol is not assigned.
    - Now, with the 8 fields above, I replace 8th position by the new field => It does not give me a dump but New field shows value of 8th field. I mean, if at first, 8th field is Quantity with value 10. Then I replace 8th field by my new field. When displaying again, it also gets 10 as its value.
    - It is so strange. Because in function 'REUSE_ALV_LIST_DISPLAY', I used itab_data1, which consists of all field of itab_data and an addition field (NEW). I dont know why it does not show value of the new field while all old fields have right values. (before using that function, I copied all contents of itab_data to itab_data1)
    So, everybody can help me this? Thanks

  • Filter expression producing different results after upgrade to 11.1.1.7

    Hello,
    We recently did an upgrade and noticed that on a number of reports where we're using the FILTER expression that the numbers are very inflated. Where we are not using the FILTER expression the numbers are as expected. In the example below we ran the 'Bookings' report in 10g and came up with one number and ran the same report in 11g (11.1.1.7.0) after the upgrade and got two different results. The data source is the same database for each envrionment. Also, in running the physical SQL generated by the 10g and 11g version of the report we get different the inflated numbers from the 11g SQL. Any ideas on what might be happening or causing the issue?
    10g report: 2016-Q3......Bookings..........72,017
    11g report: 2016-Q3......Bookings..........239,659
    This is the simple FILTER expression that is being used in the column formula on the report itself for this particular scenario which produces different results in 10g and 11g.
    FILTER("Fact - Opportunities"."Won Opportunity Amount" USING ("Opportunity Attributes"."Business Type" = 'New Business'))
    -------------- Physical SQL created by 10g report -------- results as expected --------------------------------------------
    WITH
    SAWITH0 AS (select sum(case when T33142.OPPORTUNITY_STATUS = 'Won-closed' then T33231.USD_LINE_AMOUNT else 0 end ) as c1,
    T28761.QUARTER_YEAR_NAME as c2,
    T28761.QUARTER_RANK as c3
    from
    XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ,
    XXFI.XXFI_OSM_OPPTY_HEADER_ACCUM T33142 /* Fact_Opportunity_Headers(CloseDate) */ ,
    XXFI.XXFI_OSM_OPPTY_LINE_ACCUM T33231 /* Fact_Opportunity_Lines(CloseDate) */
    where ( T28761.PERIOD_NAME = T33142.CLOSE_PERIOD_NAME and T28761.QUARTER_YEAR_NAME = '2012-Q3' and T33142.LEAD_ID = T33231.LEAD_ID and T33231.LINES_BUSINESS_TYPE = 'New Business' and T33142.OPPORTUNITY_STATUS <> 'Duplicate' )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK)
    select distinct SAWITH0.c2 as c1,
    'Bookings10g' as c2,
    SAWITH0.c1 as c3,
    SAWITH0.c3 as c5,
    SAWITH0.c1 as c7
    from
    SAWITH0
    order by c1, c5
    -------------- Physical SQL created by the same report as above but in 11g (11.1.1.7.0) -------- results much higher --------------------------------------------
    WITH
    SAWITH0 AS (select sum(case when T33142.OPPORTUNITY_STATUS = 'Won-closed' then T33142.TOTAL_OPPORTUNITY_AMOUNT_USD else 0 end ) as c1,
    T28761.QUARTER_YEAR_NAME as c2,
    T28761.QUARTER_RANK as c3
    from
    XXFI.XXFI_GL_FISCAL_MONTHS_V T28761 /* Dim_Periods */ ,
    XXFI.XXFI_OSM_OPPTY_HEADER_ACCUM T33142 /* Fact_Opportunity_Headers(CloseDate) */ ,
    XXFI.XXFI_OSM_OPPTY_LINE_ACCUM T33231 /* Fact_Opportunity_Lines(CloseDate) */
    where ( T28761.PERIOD_NAME = T33142.CLOSE_PERIOD_NAME and T28761.QUARTER_YEAR_NAME = '2012-Q3' and T33142.LEAD_ID = T33231.LEAD_ID and T33231.LINES_BUSINESS_TYPE = 'New Business' and T33142.OPPORTUNITY_STATUS <> 'Duplicate' )
    group by T28761.QUARTER_YEAR_NAME, T28761.QUARTER_RANK),
    SAWITH1 AS (select distinct 0 as c1,
    D1.c2 as c2,
    'Bookings2' as c3,
    D1.c3 as c4,
    D1.c1 as c5
    from
    SAWITH0 D1),
    SAWITH2 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    sum(D1.c5) as c6
    from
    SAWITH1 D1
    group by D1.c1, D1.c2, D1.c3, D1.c4, D1.c5)
    select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3, D1.c4 as c4, D1.c5 as c5, D1.c6 as c6 from ( select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    sum(D1.c6) over () as c6
    from
    SAWITH2 D1
    order by c1, c4, c3 ) D1 where rownum <= 2000001
    Thank you,
    Mike
    Edited by: Mike Jelen on Jun 7, 2013 2:05 PM

    Thank you for the info. They are definitely different values since ones on the header and the other is on the lines. As the "Won Opportunity" logical column is mapped to multiple LTS it appears the OBI 11 uses a different alogorthim to determine the most efficient table to use in the query generation vs 10g. I'll need to spend some time researching the impact to adding a 'sort' to the LTS. I'm hoping that there's a way to get OBI to use similar logic relative to 10g in how it generated the table priority.
    Thx again,
    Mike

Maybe you are looking for

  • Appropriate Datasource or the extractor for the respective fields

    Hi All, We need to do KPI reporting for accounts payable data.The report layout includes invoice header data and invoice lineitem data.Could somebody help me in finding the datasource to accomplish the same.I have checked the datasource 0FI_AP_04 and

  • How to change the column order in OVS - NOT USING Enhancement Pack 1

    Hi Guys, we are currently using NWDS 7.1. I cannot seem to chang the order of the columns when the OVS pops up.  We have tried to change the order of the fileds of the custom SAP BAPI that is used for this OVS but no success. Please advise on possibl

  • Unable to connect

    Hi. I have a Oracle 10g client on my PC and Visual Studio 2005 and saw the free download of the Oracle Developer Tools (ODTwithODAC10202.exe). After installing the package I get an error when I try and connect to my Oracle database server (which is N

  • PreparedStatement parameter binding

    Hello, I am new to JDBC and java technology. I have experience with SQL, PL/SQL and I am quite shocked, that binding parameters using PreparedStatement class is based on parameter index instead of the parameter name. It is quite common in PL/SQL to u

  • WebAS 6.40 SP10 and JDI (SP09) out of sync

    Hallo all, my JDI installation (SP09) is out of sync with the WebAS on which it is running (SP10). What do I have to do in order to lift the JDI on SP10? Can I go ahead and apply JDI SP10 or is there another way of getting WebAS and JDI into sync aga