Display all SAXExceptions during parsing

How can I display all SAXExceptions generated when a SAXParser validates a XML document against a schema? I want the parser to continue until the end of the document and display all parse errors by an errorhandler. Currently, the parser halts at the first error encountered.
Setting the feature did not help:
parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
Any ideas? Thanks

Now, I can display all SAXExceptions: warnings, errors and fatal errors when parsing the entire XML document. I have created a contenthandler (XMLFileParser) and an error handler (XMLFileParserErrorHandler). However, if I were to set the content handler, the parser halts upon detecting the first SAXException. If I do not set the content handler, the program cannot extract XML values from the document.
Any explanations or guidance to resolve this problem?
the following is how the contenthandler XMLFileParser is implemented:
XMLReader parser = XMLReaderFactory.createXMLReader();          
// Set validation of XML document, this will use the schema specified in XML document to validate document.
parser.setFeature(SET_VALIDATION, true);
parser.setFeature(SET_VALIDATION_SCHEMA, true);
parser.setFeature(SET_CONTINUE, true);
// register the error handler for all SAXExceptions
parser.setErrorHandler(new XMLFileParserErrorHandler());
// set the content handler, without this line, all the SAXExceptions are displayed by the error handler
parser.setContentHandler(this);code implementation of error handler:
class XMLFileParserErrorHandler implements ErrorHandler {
    public void warning(SAXParseException e) {
        String errmsg = "Parsing Warning: " + " Line: " + e.getLineNumber() +
                        " Message: " + e.getMessage();       
        this.cleanup(errmsg);
    public void error(SAXParseException e) {
        String errmsg = "Parsing Error: " + "Line: " + e.getLineNumber() +
                        " Message: " + e.getMessage();      
        this.cleanup(errmsg);
    public void fatalError(SAXParseException e) {
        String errmsg = "Parsing Fatal Error: " + "Line: " + e.getLineNumber() +
                        " Message: " + e.getMessage();
        this.cleanup(errmsg);
   private void cleanup(String errmsg) {
        Syslog.error(this, errmsg);
   }// end of cleanup()
}// end of XMLFileParserErrorHandler

Similar Messages

  • Not displaying all items during MIGO

    Hi All,
    When I try to do the goods issue for process order thro MIGO, the system is not showing all the line items. When I select the process order and do the Adopt in the overview, it is showing all the line items. Is there any settings to be done to show all the line items when I entered the process order.
    Regards,
    Sureshbabu G.

    It's possible that these missing items are flagged as backflushed components
    Check if they are in the production order material list

  • How to display all rows in the report in one page in Oracle APEX 3.2

    Friends -
    We are using Oracle Applications Express 3.2 on oracle database 10.2.0.5 on solaris environment.
    One of our report contains total no of rows 50000. when we ran report by default it is showing 15 and i can go search and change display no of rows to different numbers and click go.
    My question is it possible to display all 50000 rows during first time report launching without going to change rows. Is there any option that we can set how many number of rows that we can display during report design.
    Please advise
    VSH

    Hello VSH,
    >> My question is it possible to display all 50000 rows during first time report launching without going to change rows
    As vee pointed out it is possible, however the question you need to ask yourself is is it wise?
    Bear in mind that displaying 50,000 rows on a single HTML page means a lot of code that must be loaded by the client browser all at once. What it will do to your page loading time? Browser memory? Network bandwidth? Also, do you really believe that it is effective to let an end user look for a specific row among 50,000 rows?
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • Error during parsing of SOAP header

    Hi all,
    I have configured the j-meter to send an http request to inegration engine of PI.
    The request xml that I am sending is as follows:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    <SOAP:Main xmlns:SAP="http://sap.com/xi/XI/Message/30"
    versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1">
    </SOAP:Main>
    </SOAP:Header>
    <SOAP:Body>
    <ns1:UnitOfMeasure xmlns:ns1="urn:sapappl:mdm:cp:eame:masterdata:uom:620">
    <Record>
    <FinishedMaterialCode>000000000000000233</FinishedMaterialCode>
    <BaseUOM>KG</BaseUOM>
    <AlternateUOM>GEB</AlternateUOM>
    <UnitsInAlternateUOM>100</UnitsInAlternateUOM>
    <UnitsInBaseUOM>2268</UnitsInBaseUOM>
    <Active_Deleted></Active_Deleted>
    </Record>
    </ns1:UnitOfMeasure>
    </SOAP:Body>
    </SOAP:Envelope>
    I am getting the following response from the XI:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    </SOAP:Header>
    <SOAP:Body>
    <SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP:Client</faultcode><faultstring>Error during parsing of SOAP header</faultstring><faultactor>http://sap.com/xi/XI/Message/30</faultactor><detail><SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIProtocol</SAP:Category><SAP:Code area="PARSER"/><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText/><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>System error in parser
    </SAP:Stack></SAP:Error></detail></SOAP:Fault>
    </SOAP:Body>
    </SOAP:Envelope>
    Any idea as to why PI is not able to parse the request header?
    Thanks,
    Amit

    Hi,
    Better to take WSDL from PI(ID window) and try.

  • XI SOAP adapter : Error during parsing the SOAP part

    Hello experts,
    We have several scenarios SOAP to IDocs.
    We are on XI 3.0 SP19, and since 9/6/09 around 4:00 PM GMT, our SOAP channels used to communicate with a specific 3rd party all stoped accepting incoming SOAP requests. All the messages are stucked on third party side, and we get the following error in the defaulttrace and application logs :
    #1.5#001125A5BCD00066000076850013109E00046BF6A963E479#1244607054865#/Applications/ExchangeInfrastructure/AdapterFramework/SAPLibraries/SAPXDK#sap.com/com.sap.aii.af.soapadapter#com.sap.aii.messaging.mo.Message.reparseRootDocument()#PIMSOAP#21217##pxaci_PXA_6443451#PIMSOAP#a71ebfa0556d11decc24001125a5bcd0#SAPEngine_Application_Thread[impl:3]_50##0#0#Error#1#com.sap.aii.messaging.mo.Message#Plain###Error during parsing the SOAP part --- java.lang.NullPointerException#
    It happened at the same time on all the environments for every interfaces using SOAP message from this sender to XI. That's the reason why we think it is a global issue, but we can not find anything concerning this error. Has anybody encountered this error or would have any clue of where it comes from ?
    Many thanks,
    Best regards,
    Guislain

    Hello Michal,
    Thanks a lot for your help. Actualy we have tested with SOAP UI yesterday and this is what came out of the tests :
    test 1 : we tried to call the XI service with the wsdl and put dummy data inside --> test OK
    test 2 : we loaded in SOAP UI one of the file from our partner and tried to call the service --> test NOT OK
    test 3 : we realized that there were some blank lines at the beginning of the file provided by the partner. we removed these blank lines --> test OK.
    So we first thought that the format of the file sent by the partner was wrong and this is why we were getting the parsing error, because of these blank line. The thing is that these blank lines have always been here ! We have checked with old successful messages and they contain also these lines and if we test them in SOAP UI we get an error also. so it does not seems to come from this.
    Moreover, as I said in my previous message, it happened on all the environments approximatly at the same time, so we are suspecting a global problem, but which one ? That's the million dollar question
    Would you have any other ideas ?
    Thanks a lot,
    Best regards,
    Guislain

  • HTTP response code 500 : Error during parsing of SOAP header

    Hi Experts,
    I have a MAIL to IDOC scenario.  An external third party emails invoices to our inbox - which we pick up and process the attachment.  All is well when I test the scenario internally, but when the third party emails it fails with (see ERROR MESSAGE below).
    When I look at the SOAP header of the failed message I see the values from the dump in this field:
      <sap:Record namespace="http://sap.com/xi/XI/System/Mail" name="SHeaderTHREAD-INDEX">AcarCeJmJKHuV6wZSxm2UMoUeAjS1gALPExABtze/PACiUJDcAGS0DCwAmOOELAJlOzP0AFiOo8gCK1pEZAF500SsAYW46lgBgX2bGALyieMQAXw2oKgBYXf0WAGeueD0AAAHnhwBamTSaAGIUE0kAYZSYTQBgY5OTADunN0gAE3t/sQAWScBXADTQvvEAD4yNhQATdkKiAFr7DBMAGIXTZQAP2xJFABZ0YfoAGHYAuAAKlaeaACJ9xtUAEjcvQAAV4L06ABZuwsAAK/f9vgAAF/GSAAAYmRYARIKwtQAV5R9SABMo5bsAGQQyvAAVqsjyABOh9uMAFXTa2QAWEjsfABaEvp4AFaL1NQAV5MnUABXiVbIAGc7LsQAYVN9SABLfYQIAEwF3nQAWSL2lABn5ZgIAEf/k8gAWeVgrAAJaSZIAAElM4gATZR0GA=</sap:Record>
    Can anyone tell me what SHeaderTHREAD-INDEX does?  Or what my problem is  (Our email is Outlook)
    ERROR MESSAGE.........
    SOAPFault received from Integration Server. ErrorCode/Category: XIProtocol/WRONG_VALUE; Params: SOAP:Envelope(1)SOAP:Header(1)sap:DynamicConfiguration(3)sap:Record(14), AcarCeJmJKHuV6wZSxm2UMoUeAjS1gALPExABtze/PACiUJDcAGS0DCwAmOOELAJlOzP0AFiOo8gCK1pEZAF500SsAYW46lgBgX2bGALyieMQAXw2oKgBYXf0WAGeueD0AAAHnhwBamTSaAGIUE0kAYZSYTQBgY5OTADunN0gAE3t/sQAWScBXADTQvvEAD4yNhQATdkKiAFr7DBMAGIXTZQAP2xJFABZ0YfoAGHYAuAAKlaeaACJ9xtUAEjcvQAAV4L06ABZuwsAAK/f9vgAAF/GSAAAYmRYARIKwtQAV5R9SABMo5bsAGQQyvAAVqsjyABOh9uMAFXTa2QAWEjsfABaEvp4AFaL1NQAV5MnUABXiVbIAGc7LsQAYVN9SABLfYQIAEwF3nQAWSL2lABn5ZgIAEf/k8gAWeVgrAAJaSZIAAElM4gATZR0GA=協彎䅍䔾ਉ़䥎噏䥃䕟乏㸸㌱ㄵㄹ㰯䥎噏䥃䕟乏㸊उ㱁䵏啎呟䕘䍌彖䅔㸷⸵〼⽁䵏啎呟䕘䍌彖䅔㸊उ㱃啒剅乃失㹅啒㰯䍕剒䕎䍙ㄾਉ़䅍何乔彖䅔㸱⸴㜼⽁ꯃ䅢坡汫, ST: ST_XM; AdditionalText: An error occurred when deserializing in the simple transformation program ST_XMS_MSGHDR30_DYNAMIC; ApplicationFaultMessage:  ; ErrorStack: XML tag SOAP:Envelope(1)SOAP:Header(1)sap:DynamicConfiguration(3)sap:Record(14) (or one of the attributes) has the incorrect value AcarCeJmJKHuV6wZSxm2UMoUeAjS1gALPExABtze/PACiUJDcAGS0DCwAmOOELAJlOzP0AFiOo8gCK1pEZAF500SsAYW46lgBgX2bGALyieMQAXw2oKgBYXf0WAGeueD0AAAHnhwBamTSaAGIUE0kAYZSYTQBgY5OTADunN0gAE3t/sQAWScBXADTQvvEAD4yNhQATdkKiAFr7DBMAGIXTZQAP2xJFABZ0YfoAGHYAuAAKlaeaACJ9xtUAEjcvQ An error occurred when deserializing in the simple transformation program ST_XMS_MSGHDR30_DYNAMIC Data loss occurred when converting AcarCeJmJKHuV6wZSxm2UMoUeAjS1gALPExABtze/PACiUJDcAGS0DCwAmOOELAJlOzP0AFiOo8gCK1p
    Transmitting the message to endpoint http://sdcxp1-ci.na.fmo.com:8000/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Error during parsing of SOAP header.

    We work with Microsoft Outlook, but I'm sure this could work with any email system.
    This error only came from external emails - what we did in the end is to get the third party to email a particular email (email1) in our company.  This is set up as a regular email account.  On this email put a forward rule to email2 for a particular sender/subject.  email2 is set up as POP3 so that XD1 can poll it - we also block any emails except from email1.
    Doing this accomplishes a couple of things:
    1)  We get around the error because XI polls email2 (which has adapter settings of IMAP4 so we can see MAIL adapter attributes ie. sender, subject etc...When we originally had as POP3 we were not able to see these - but setting as IMAP4 causes the error for external emailers)
    2) We have a SPAM filter - the XI email is clean from SPAM and the adapter will not have errors, as it only receives valid emails to process
    3) We have a central email (email1) which is used to archive all XI emails - we use this for all email scenarios (as we also save to folder and forward in the rule)
    Hope this helps your situation.

  • Displaying all the records in a tabular form on a single page

    Hello,
    After setting up a data entry page, I have hit an unexpected problem.
    The logic in my page requires that all the records in my tabular form should be displayed .
    The tabular form is based on a collection, and the user selects rows through a checkbox.
    Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load,
    based on the previous page.
    I need to display about 25 rows.
    I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen,
    i.e. 11 rows.
    Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way,
    as I expected APEX to display all rows if required.
    Some help will be much appreciated.
    Regards
    Leckraj

    leckj wrote:
    Hello,
    After setting up a data entry page, I have hit an unexpected problem.
    The logic in my page requires that all the records in my tabular form should be displayed .
    The tabular form is based on a collection, and the user selects rows through a checkbox.
    Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load,
    based on the previous page.
    I need to display about 25 rows.
    I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen,
    i.e. 11 rows.
    Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way,
    as I expected APEX to display all rows if required.Pagination settings are cached for the duration of the session. For this change to be instantly visible, either log out, restart the brower, and log in again, or manually re-request the page from the browser address bar, adding 'RP' in the ClearCache position in the URL.

  • SAXException while parsing a well formed XML

    Hi all,
    I am getting SAXException while parsing even though my XML is well formed.
    It is written in the API that SAXException can be thrown for both error and warning. Is there any way to ignore the warnings coming while parsing and hence no SAXException is thrown.
    One more weird behavior I am getting is that when I catch the SAXException, it executes the catch block and after that control goes to the next line from where the exception was thrown, and that line is in try block itself. I'll show this with code example:
    1.     Try {
    2.        DocumentBuilder docBuild = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    3.        Document document = docBuild.parse( inputSrc );      //SAXException is thrown on this line
    4.        //Some code�
    5.     �
    6.     } catch (Exception e) {
    7.        System.out.println(�Exception while parsing: �+e.getMessage);
    8.     }
    9.     //Some Code�Ideally when SAXException is thrown on line 3, control should go to the line 7 and the to line 9 after the catch block. But in current senario control is going to line 4 after line 7. It is something very strange happening. My guess is, is it because of some property of SAXException, when thrown for warning?
    Any suggetion/advice in this regard will be helpful.
    Thanks in advance

    First: if an exception is happening, then your XML isn't well-formed. Look at the exception text and see what it's complaining about.
    As for why you're not catching the exception: a DocumentBuilder uses an ErrorHandler to handle the different warnings and errors. You can set your own ErrorHandler when parsing. The default (as documented in the link above) simply writes warnings and non-fatal errors to the console, and throws an exception only for fatal errors.

  • Displaying all 24 Hours on X-axis

    I would like to display 24 hours on x-axis of a Chart.
    the times are not in HH:00 format. They are in MM/dd/yyyy  HH:MM.
    If i select for each hour selection option it displaying only some of the hours like 2:00am,3:00am,4:00am,10:00am,13:00pm,19:00pm etc..
    But i want to display all 24 hours from 00 to 23.
    For this i created consolidated table and inserted records from the main table.
    Is it possible to display without consolidating and inserting 24 hours in table?
    any suggestions!!!
    Regards,
    Parsa
    Note : sample data
    8/27/2008 0:00
    8/27/2008 0:00
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:01
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:02
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:03
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:04
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:05
    8/27/2008 0:06
    8/27/2008 0:06
    8/27/2008 0:06
    8/27/2008 0:06
    8/27/2008 23:56
    8/27/2008 23:57
    8/27/2008 23:57
    8/27/2008 23:58
    8/27/2008 23:58
    8/27/2008 23:59
    Edited by: Ramesh Parsa on Aug 29, 2008 11:53 AM
    Edited by: Ramesh Parsa on Aug 29, 2008 11:54 AM

    Hello, I have a similar problem. I would do it just the way Graham described... BUT... I have a barchart that should display values for every Month and creates 3 Bars (3 Years) for every Month. If I use numeric axis, I have the 3 bars for the years overlapping eachother in a specific month.
    Any idea for a solution? Thank you very much.
    H.F.

  • Display all connected user (application)

    Hi there,
    I'm searching for a solution how to display all currently connected users.
    In a session I can use :APP_USER to geht the actual user.
    Is there an array of APP_USERS or something like this?
    Greetz
    Florian

    Florian - With APEX, users are only "connected" for the duration of a page request during which period a database session is obtained and used to execute the page and return the results to the user's browser. This connection usually lasts less than one second. You may be wanting to know which users (with or without named accounts) who have issued requests "recently" actually plan to issue another request "soon". That criteria is pretty fuzzy. Search this forum for "active sessions" for other posts about this topic.
    Scott

  • XOQ-01703: error during parse of build process script: (clear, compile)", "

    Hi All ,
    I was just clearing the dimensions using the below in SQL commandline throwing below error . However this works fine with my another 5 dimensions .Any advice ?
    SQL> exec dbms_cube.build('POSITION using (clear, compile)');
    BEGIN dbms_cube.build('POSITION using (clear, compile)'); END;
    ERROR at line 1:
    ORA-37162: OLAP error
    XOQ-01703: error during parse of build process script: "BUILD POSITION using
    (clear, compile)", ""
    ORA-06512: at "SYS.DBMS_CUBE", line 236
    ORA-06512: at "SYS.DBMS_CUBE", line 280
    ORA-06512: at line 1
    Thanks,
    DxP

    I believe in this case the parser that is parsing the build process script is treating the dimension name "POSITION" as a keyword and not as an OLAP Cube Dimension name. You may wish to rename the dimension to a name other than "POSITION" or double quotes as specified previously.
    Edited by: user713408 on Aug 1, 2011 12:12 PM

  • How can I display all records as a end user?

    I am applying for jobs with the state and every week they publish a list of new positions that have just been posted on the following link: https://forms.spb.ca.gov/bulletins/weekly.cfm
    and also at http://jobs.spb.ca.gov/wvpos/search_p_ejv.cfm?classcode=5393&criteria=associate%20governme ntal
    It is a .cfm but only displays 15 records at a time, I was wondering if there is a tag or way to have it display all 300 something records at once?  My ultimate goal is to get just the full table into a excel spreadsheet while retaining the HTML formatting so the links still work.
    My thought is that the state has set it up this way to only display a set number of records at a time, the data is not private or protected, I am simply seeking a easier way to access it in aggregate.
    Thank you in advance for your suggestions and help!

    I think your best hope is to ask the author of the CFM whether they provide any web service that can get you that data when you call it.  like.
    https://forms.spb.ca.gov/webservice.cfc?method=getJobsPostings&key={key_goes_here}
    There's a chance they may be regulating performance on the resultset, and don't want to return that many records at a time, pagination or not.

  • Adobe Bridge CC Smart Collections are not displaying all images in the folder

    I'm having an issue with Bridge CC were I setup a smart collection to monitor my new photos. The folder contains over 300 photos, but is only displaying 160. The only condition I set is to have a minium file size of 10kb, so it should bring in all files since most are over 4mb. At first I thought it was a problem with the files themselves (permissions or something) but if I open the folder in bridge it easily displays all of the images easily. Any ideas?

    I'm having an issue with Bridge CC were I setup a smart collection to monitor my new photos.
    You might want to describe this workflow a bit more. Do you create this from an existing folder or are you adding new photo's?
    A Smart Collection does not refreshes it self automatically. You either have to use the edit icon top right of the content panel to save again or deselect and select the collection itself to let it refresh the content.

  • AL11 - Can't display all data in a file

    Hello,
    We have a custom folder at OS level and configured in the AL11. We are able to open the custom folder and browse all the files. We have a file of 8 KB in size and has around 21 fields. When we open the file in AL11, it doesn't display all the data, that is couple of fields from end. The physical file shows all data and looks fine.
    Anybody can help finding the problem?
    Appreciate your help
    Thanks,
    Kris

    Hi,
    I thing this is authorisation or permission issue pls chek in super user like sap* or equal of this.
    Anil

  • Display all records from 4 select list

    Hi,
    trying to associate 4 select list where i could display all records from a list linked to an other list.
    1./ Created an item for each select list
    P1_employee_name
    P1_departments
    P1_employee_type
    P1_locations
    2./Set both null and default values to '-1' for each item
    3./Associated these items to source columns in the Region:
    where employee_name=:P1_employee_name
    or :P1_employee_name ='-1'
    and departments=:P1_departments
    or :P1_departments ='-1'
    and ......
    When running the report, couldn't display all records from a given list associated to an other list.
    e.g: Display all emp and type of emp for sales dept in Paris.
    Thks for your help

    I believe the issue is that you need to group your predicates such as:
    where (employee_name=:P1_employee_name
    or :P1_employee_name ='-1')
    and
    (departments=:P1_departments
    or :P1_departments ='-1')
    Also, if you are not already using the "select list with submit" type items, these work great for this case as the page will be submitted when the user changes the value of employeenam and the report will then reflect this change.

Maybe you are looking for