The value for The value for the useBean invalid?

I get following error when I try to test application in iexplorer.
org.apache.jasper.JasperException: /guestBookLogin.jsp(12,0) The value for the useBean class attribute com.deitel.jhtp6.jsp.beans.GuestBean is invalid.
I got this code from a case study and I was testing it. I get
org.apache.jasper.JasperException: /guestBookLogin.jsp(12,0) The value for the useBean class attribute com.deitel.jhtp6.jsp.beans.GuestBean is invalid.
error
I believe this is becaus of version difference but here is my code
guestBookLogin.jsp
<!- <?xml version = "1.0"?> -->
<!-  DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" -->
<!-- Fig. 27.22: guestBookLogin.jsp -->
<%-- page settings --%>
<%@ page errorPage = "guestBookErrorPage.jsp" %>
<%-- beans used in this JSP --%>
<jsp:useBean id = "guest" scope = "page"
   class = "com.deitel.jhtp6.jsp.beans.GuestBean" />
<jsp:useBean id = "guestData" scope = "request"
   class = "com.deitel.jhtp6.jsp.beans.GuestDataBean" />
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
   <title>Guest Book Login</title>
   <style type = "text/css">
      body
         font-family: tahoma, helvetica, arial, sans-serif;
      table, tr, td
         font-size: .9em;
         border: 3px groove;
         padding: 5px;
         background-color: #dddddd;
      }`
   </style>
</head>
<body>
   <jsp:setProperty name = "guest" property = "*" />
   <% // start scriptlet
      if ( guest.getFirstName() == null ||
           guest.getLastName() == null ||
           guest.getEmail() == null )
   %> <%-- end scriptlet to insert fixed template data --%>
         <form method = "post" action = "guestBookLogin.jsp">
            <p>Enter your first name, last name and email
               address to register in our guest book.</p>
            <table>
               <tr>
                  <td>First name</td>
                  <td>
                     <input type = "text" name = "firstName" />
                  </td>
               </tr>
               <tr>
                  <td>Last name</td>
                  <td>
                     <input type = "text" name = "lastName" />
                  </td>
               </tr>
               <tr>
                  <td>Email</td>
                  <td>
                     <input type = "text" name = "email" />
                  </td>
               </tr>
               <tr>
                  <td colspan = "2">
                     <input type = "submit" value = "Submit" />
                  </td>
               </tr>
            </table>
         </form>
   <% // continue scriptlet
      }  // end if
      else
         guestData.addGuest( guest );
   %> <%-- end scriptlet to insert jsp:forward action --%>
         <%-- forward to display guest book contents --%>
         <jsp:forward page = "guestBookView.jsp" />
   <% // continue scriptlet
      }  // end else
   %> <%-- end scriptlet --%>
</body>
</html>GuestBean.java
* @(#)GuestBean.java
* @author:
* @Description: JavaBean to store data for a guest in the guest book.
* @version 1.00 2008/7/18
// JavaBean to store data for a guest in the guest book.
package com.deitel.jhtp6.jsp.beans;
public class GuestBean
   private String firstName;
   private String lastName;
   private String email;
   //Constructors
   public GuestBean(){
        public GuestBean(String firstname, String lastname, String email){
             this.firstName=firstname;
             this.lastName=lastName;
             this.email=email;
   // set the guest's first name
   public void setFirstName( String name )
      firstName = name; 
   } // end method setFirstName
   // get the guest's first name
   public String getFirstName()
      return firstName; 
   } // end method getFirstName
   // set the guest's last name
   public void setLastName( String name )
      lastName = name; 
   } // end method setLastName
   // get the guest's last name
   public String getLastName()
      return lastName; 
   } // end method getLastName
   // set the guest's email address
   public void setEmail( String address )
      email = address;
   } // end method setEmail
   // get the guest's email address
   public String getEmail()
      return email; 
   } // end method getEmail
} // end class GuestBeanGuestBeanData.java
* @(#)GuestDataBean.java
* @author
* @version 1.00 2008/7/18
// Fig. 27.21: GuestDataBean.java
// Class GuestDataBean makes a database connection and supports
// inserting and retrieving data from the database.
package com.deitel.jhtp6.jsp.beans;
import java.sql.SQLException;
import javax.sql.rowset.CachedRowSet;
import java.util.ArrayList;
import com.sun.rowset.CachedRowSetImpl; // CachedRowSet implementation
public class GuestDataBean
   private CachedRowSet rowSet;
   // construct TitlesBean object
   public GuestDataBean() throws Exception
      // load the MySQL driver
      Class.forName( "com.mysql.jdbc.Driver" );
      // specify properties of CachedRowSet
      rowSet = new CachedRowSetImpl(); 
      rowSet.setUrl( "jdbc:mysql://localhost/VirsarMedia" );
      rowSet.setUsername( "root" );
      rowSet.setPassword( "" );
       // obtain list of titles
      rowSet.setCommand(
         "SELECT firstName, lastName, email FROM guest" );
      rowSet.execute();
   } // end GuestDataBean constructor
   // return an ArrayList of GuestBeans
   public ArrayList< GuestBean > getGuestList() throws SQLException
      ArrayList< GuestBean > guestList = new ArrayList< GuestBean >();
      rowSet.beforeFirst(); // move cursor before the first row
      // get row data
      while ( rowSet.next() )
         GuestBean guest = new GuestBean();
         guest.setFirstName( rowSet.getString( 1 ) );
         guest.setLastName( rowSet.getString( 2 ) );
         guest.setEmail( rowSet.getString( 3 ) );
         guestList.add( guest );
      } // end while
      return guestList;
   } // end method getGuestList
   // insert a guest in guestbook database
   public void addGuest( GuestBean guest ) throws SQLException
      rowSet.moveToInsertRow(); // move cursor to the insert row
      // update the three columns of the insert row
      rowSet.updateString( 1, guest.getFirstName() );
      rowSet.updateString( 2, guest.getLastName() );
      rowSet.updateString( 3, guest.getEmail() );
      rowSet.insertRow(); // insert row to rowSet
      rowSet.moveToCurrentRow(); // move cursor to the current row
      rowSet.acceptChanges(); // propagate changes to database
   } // end method addGuest
} // end class GuestDataBeanguestBookErrorPage.jsp
<!-- <?xml version = "1.0"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Fig. 27.24: guestBookErrorPage.jsp -->
<%-- page settings --%>
<%@ page isErrorPage = "true" %>
<%@ page import = "java.util.*" %>
<%@ page import = "java.sql.*" %>
<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
      <title>Error!</title>
      <style type = "text/css">
         .bigRed
            font-size: 2em;
            color: red;
            font-weight: bold;
      </style>
   </head>
   <body>
      <p class = "bigRed">
      <% // scriptlet to determine exception type
         // and output beginning of error message
         if ( exception instanceof SQLException )
      %>
            A SQLException
      <%
         } // end if
           else if ( exception instanceof ClassNotFoundException )
      %>
            A ClassNotFoundException
      <%
         } // end else if
         else
      %>
            An exception
      <%
         } // end else
      %>
      <%-- end scriptlet to insert fixed template data --%>
         <%-- continue error message output --%>
         occurred while interacting with the guestbook database.
      </p>
      <p class = "bigRed">
         The error message was:<br />
         <%= exception.getMessage() %>
      </p>
      <p class = "bigRed">Please try again later</p>
   </body>
</html>
guestBookView.jsp
<!-- <?xml version = "1.0"?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Fig. 27.23: guestBookView.jsp -->
<%-- page settings --%>
<%@ page errorPage = "guestBookErrorPage.jsp" %>
<%@ page import = "java.util.*" %>
<%@ page import = "com.deitel.jhtp6.jsp.beans.*" %>
<%-- GuestDataBean to obtain guest list --%>
<jsp:useBean id = "guestData" scope = "request"
   class = "com.deitel.jhtp6.jsp.beans.GuestDataBean" />
<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
      <title>Guest List</title>
      <style type = "text/css">
         body
            font-family: tahoma, helvetica, arial, sans-serif;
         table, tr, td, th
            text-align: center;
            font-size: .9em;
            border: 3px groove;
            padding: 5px;
            background-color: #dddddd;
      </style>
   </head>
   <body>
      <p style = "font-size: 2em;">Guest List</p>
      <table>
         <thead>
            <tr>
               <th style = "width: 100px;">Last name</th>
               <th style = "width: 100px;">First name</th>
               <th style = "width: 200px;">Email</th>
            </tr>
         </thead>
         <tbody>
         <% // start scriptlet
            List guestList = guestData.getGuestList();
            Iterator guestListIterator = guestList.iterator();
            GuestBean guest;
            while ( guestListIterator.hasNext() )
               guest = ( GuestBean ) guestListIterator.next();
         %> <%-- end scriptlet; insert fixed template data --%>
               <tr>
                  <td><%= guest.getLastName() %></td>
                  <td><%= guest.getFirstName() %></td>
                  <td>
                     <a href = "mailto:<%= guest.getEmail() %>">
                        <%= guest.getEmail() %></a>
                  </td>
               </tr>
         <% // continue scriptlet
            } // end while
         %> <%-- end scriptlet --%>
         </tbody>
      </table>
   </body>
</html>Edited by: Areeba on Jul 19, 2008 10:34 PM

Thanks I got it working. The problem was my mistake (ofcourse) I had my class in this folder WEB_INF/com/..... I did had classes folder under WE-INF . I'll get rest working soon. Thanks for the help.
Edited by: Areeba on Jul 21, 2008 5:02 PM
=====================
I get this eror
javax.servlet.ServletException: Can't call commit when autocommit=true
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
     org.apache.jsp.guestBookLogin_jsp._jspService(org.apache.jsp.guestBookLogin_jsp:172)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.sql.rowset.spi.SyncProviderException: Can't call commit when autocommit=true
     com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:886)
     com.deitel.jhtp6.jsp.beans.GuestDataBean.addGuest(GuestDataBean.java:75)
     org.apache.jsp.guestBookLogin_jsp._jspService(org.apache.jsp.guestBookLogin_jsp:145)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)on here
  rowSet.acceptChanges(); // propagate changes to databaseit updated the database but with error.
Edited by: Areeba on Jul 21, 2008 5:23 PM
Edited by: Areeba on Jul 21, 2008 5:57 PM

Similar Messages

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Values not getting displayed in the selection screen for Hierarchies?

    Hi All,
      Our system was upgraded from BW 3.1 to 2004s. The quality system displayes values when query result is filtered for a hierarchy infoobject but the production system does not display any values and sometimes throws an error 'The operation failed because of a server error. See system logs.' There is no changes done for hierarchies in both the systems.
    Please let me know if anyone has had similar problems.
    Thanks,
    Krishna

    Hi All,
      Our system was upgraded from BW 3.1 to 2004s. The quality system displayes values when query result is filtered for a hierarchy infoobject but the production system does not display any values and sometimes throws an error 'The operation failed because of a server error. See system logs.' There is no changes done for hierarchies in both the systems.
    Please let me know if anyone has had similar problems.
    Thanks,
    Krishna

  • I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    This is most probably because the Periodicity input value has been configured as "Required" and no value has been input for it.
    Please enter a value and try to re-run Quick Pay.

  • Copy of Material Master charac. values to the batch classif. in GR for PO

    Dear gurus,
    Could you please help me with the following issue. I have a material managed in batches, and it has a classification type 023 in material master. I fill one chaacteristic of this classification with some value. Now I want this value to be copied to the batch classification during the creation of new batch while making GR to production order.
    Is it possible?

    Hi Nikolaj,
    What I am understand your requirement is like,
    You want to fetch the value of Characteristic maintain in Batch class in Material master to the Batches, correct?
    But my Friend if you maintain value of characteristic in Batch Class in material master then it will works as a validation.
    For Example,
    Suppose your Characteristic is Colour and in Material Master Batch classification view you have maintain value as Red.Then system will not allow you any other colour in Batches.You will find that value in Drop Down list.
    Regards,
    Dhaval

  • Help needed in SD VC Assigning Object Dep. for all values at the 1 time

    Dear, Gurus
    I am successful in achieving pricing in VC the long way example: If Characteristic is Car_Color and values Blue, Red. I assign
    $self.Z_CarPrice=u2019Redu2019 and it works. Z_CarPrice is basically the variant condition linkage with tables SDCOM and VKOND.
    My question is how can I achieve the above by assigning it to the header so that it automatically enters the code $self into all values without me having to go into it 1 by 1 and assigning the codes? Or what is the best way in achieving the results?
    If I have 3 characteristics ex: Car_Model, Car_Color, Car_Size? 100's of values?     4th characteristic is Z_CarPrice inside this I have entered all the Values from the 3 characteristics.
    Thanks in Advance

    Hi,
    Try these steps and hope will definitely resolve your issue
    Create one variant table VT_BASE_PRICE with combinations of the char Z_COLOR,Z_MODEL and Z_SIZE as key fields
    Table Structure
    Z_Color               
    Z_Model
    Z_Size
    Z_Car_Price
    Table Contents    
    Z_Color          Z_Model                         Z_Size          Z_Car_Price
    RED          Honda          Big          BP_RED_HONDA_BIG
    RED          Honda          Small          BP_RED_HONDA_SML
    Maintain the table values with all possible combinations and for each combination enter a unique key under Z_car_Price column. Remember the variant key length Max is 26  and you can use any unique value which should give a meaning by looking at
    Once maintained the table write a dependency
    Table VT_BASE_PRICE
    (Z_COLOR = Z_COLOR,
    Z_MODEL = Z_MODEL,
    Z_SIZE = Z_SIZE,
    Z_CAR_PRICE = $self.Z_CAR_PRICE)
    Thus for each combination no need to write the code to infer the variant key. It will automatically choose from table as per configuration values entered.For each variant key you need to maintain price in condition records for condition type.
    Regards,
    Brahmaji D

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • KE28 Top-down distribution for only part of the Value Field

    Hi Experts,
    We have a situation where we will make manual postings in CO-PA through KE21N. Part of this postings will be at the lowest detailed level and part will be for a more summarized level od characteristics. All the postings will flow to the same value field.
    We need to make a top-down distribution only for the postings that were made in a summarized level, because the other postings already have the details that we need.
    Is it possible?
    Kind Regards
    Mayumi Blak

    Hi Venkata,
    Please note that :-
    you can not distribute to a characteristic that already contains a
    value.  Please see note 77476.  If you want to distribute to eg.
    profit center, then the characteristic must be initial (in the data
    to be distributed).
    In the case where the log showed "number of receivers" but no line
    written is a common problem in transaction KE28 logged by customers.
    One example is that, if the amount of line items is 0.00 for all the
    receivers, no line item will be written.
    No values in reference data:
    If there are no values in reference data for some segments (see the
    log). No records are posted (segments which were distributed, but
    their value is zero i.e. there is no value to be distributed, are not
    posted).
    No initial values in the distribution level (ie. # - non assigned)
    in each of the characteristics in distribution level.
    Kind Regards,
    Abhisek Patnaik,

  • How to set/get the values thru Wedbynpro coding for User mapping fields

    Hi All
    In system object we have the user mapping fields like District,city,plant,Salesmanager.
    now we want to set/get the values of these usermapping fields of system object thru webdynpro coding...
    if anybody have sample codes of the same then it would be great help to me
    Thanks in advance
    Thanks
    Trisha Rani

    Hi Kavitha
    Thanks for your reply
    My requirement is exactly as follows.
    1) i have created one portal system object in system administration and also i created usermapping fields in the system object from the usermanagement  in system object.
    i created the user mapping fields like Plant,SalesManager,District etc.
    i also created the system alias name for the same system object
    2)  Now i came to persoanlize link and mapped the system object to the portal user.
    while mapping to the system object we need to enter Mapping userId, Password , once we enter these values and we can also enter the values of usermapping fields which we defined while creating the system object ( for example District,Salesmanager,Plant etc)
    once we enter all the values and click on save then these usermapping  values to be mapped to the portal user.
    3) Now my requirement is , i  want to control the usermapping field values thru webdynpro coding for setting/getting the values.
    I need sample code of the same.
    Please let me know if u need more details on the same.
    Thanks
    Trisha Rani

  • Table Names for the Contract Budget(PO value) and Invoiced Budget

    Hello Team,
    Can you please share your ides on the below two queries
    1. How can we Identify the Contract Budget from the P.O Number
    2. How can we know how much of it has been Invoiced
    Please provide the Table Names also if you know, where these values can be stored.
    These are required to create a BW report.
    Regards,
    gsnreddy.

    Hi Aleksey Tkachenko
    Thanks for the reply
    let me clear this a little bit about my query
    what i want is the total PO value
    i.e. for how much amount the PO was created and how much of that amount is converted in to invoice
    Where can i get this data?
    Is this data was saved in any of the SAP table?
    Regards,

  • Custom Report for the Stock and Stock value for a specific date

    Hi SAP Gurus,
    Is there any SAP standard t-code or any logic to get the transcations (additions (for example: Purchases) and subtractions (Sales) to the inventory) for a particular materials in a plant and with Total Stock and also Total Stock value when that particular transaction happened?
    Our system is R/3 4.7
    I looked at the MB5B, MBCE, MBCA, MC44, MB51 and some other standard T-codes but could not find the total stock value at the time of Transaction happened.
    The history tables MBEWH and MARDH  are updated after the month end closing procedures, right, which means I will have the inventory value changing every month if material has Price "S".
    Thank you,
    -Harter

    Hi Harter,
    Unfortunately, you cannot see in a single tcode the value of stock and stock quantity on a specific date. As you yourself have pointed out, we only have to make use of the history table MBEWH, MARDH for the month wise stock quantity and value. Along with that you should also make use of the table MBEW to take teh stock quantity and value. So the total value of stock on a particular date will be
    Stock qnty = MBEWH value until the previous month (for teh specific valuation class, period etc) + MBEW value for the present date.
    But this will nto work out if you want to find out teh stock quantity and stock value on a past date basis. For past data, only  m onthwise data is available. For this anyway you can refer to MC.1 and so on reports.

  • Lead time values are not appearing in the report for current year.

    Hi friends,
    Iam checking a report in production.  where lead time values are displayed as 0 for 1 key figure lead time3 (w/0 dim) . i found there is a formula for this it shows like NODIM ( 'Lead Time 3' ).and there is a value for cal.lead time
    how can i get values in the report.
    Thanks ,
    VRV.

    Hi,
    Although your question is not clear, I understood that the formula built on that KF is NODIM. Basically it means, units of measurement is not considered when calculating.
    Eg: 5 Minutes + 5 Kilograms = 10
    You please try to analyze your KF by the above logic. Then you would be able to figure out why the data is not appearing in the report..
    Assign if helps...
    Regards,
    Suman

  • Abort Could not determine a value for variable 0DAT from the authorizations

    Hi All,
    I encountered an error '/ Abort Could not determine a value for variable 0DAT from the authorizations\' when executing my query on a multiprovider in BW 3.5.
    Can anyone help me in finding a solutionn to this issue.
    Thanks,
    Kartik.

    Hi Kartik,
    I am sorry as that note is for NW2004s. Please check if 0DAT variable installed from a business content? if not then I think thats the cause of the problem.
    Hope this helps,
    Bye...

  • How to get the last inserted Autoincrement value in Java for Pervasive DB

    Hi, I need to get the last inserted auto incremented value after the record is inserted IN JAVA For ex. consider we have 4 columns for the myTable in the PERVASIVE DATABASE V10 autoid - identity column (auto increment column) userID userName pageID insertSqlExpression = insert into myTable (userID , userName, pageID) values( ? ,? ,?); prepareInsert = connection.prepareStatement(insertSqlExpression); prepareInsert .excuteUpdate; After inserting the new record how can I get the autoid value (last inserted value) in the Java. Please help me.
    Thanks in advance. Arthik

    JavaArthikBabu wrote:
    I dont have privileges to write new stored procedures in database.I need to do in the Java side only. In many databases that irrelevant. The same way you would do it in a proc can be done with the correctly conceived statement (singular.)
    For ex &#150; if we insert and then the select record's identity value as a single transaction and would this guarantee that what is returned by the select would not include inserts that another might have made?Please do not take that path unless you are absolutely certain that your database does not support any other way to do it.

  • Need to run the report for All Values when Null is passed in parameter

    Hi All,
    In my BIP report, I am using a parameter :asset with Type as Text, which means user will type the values for the parameter in the text box.
    Now, this parameter can take multiple comma separated values. I have a requirement to run the report for All Values when user doesn't enter any value in the parameter text box and if user enters any value(s) then the report will run for those values . The way, I tried to handle that in the query using couple of ways was :
    IMP : My Database is SQL Server
    where
    (table.asset = isnull((:asset), table.asset) or table.asset in (:asset))
    Now this works fine when I give a single asset number but when I give multiple values separated by comma like 123, 345 in the text box, then the statement fails saying 'encountered ,'
    I also tried simply
    table.asset in isnull((:asset),table.asset) -- but this doesn't work as it doesn't allow me to use in operater while using isnull and if i will use = operater then it won't work in case of multiple values
    Any suggestions on how can I handle this? Any help would be highly appreciated.
    Thanks,
    Ronny

    thanks for replying, but i tried this option too, it did not work for me, neither isnull nor coalesce. I mean, the solution work for single value but when i pass multiple values then separated by a comma then it doesn't work and shows me an error like "Incorrect Syntax ','". I am using SQL server as DB and bip is 10.1.3.4.1
    also please share the SR number, so i can also check the same.
    can there be any other work around to this?
    thanks,
    ronny

Maybe you are looking for