String limit

Is there a limit to the number of characters in a string?
I have a program that displays a string of text in a window.
When you double the number of characters in the string
you get odd results.
Odd meaning if this is a portlet on a page with tabs the tabs disappear.
Change the string back to the original number of charaters and the tabs reappear.
Any ideas? here is some code.
This is the small string:
789 bytes
public java.lang.String getTraffic() {
     return "<CENTER>" +
          "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"2\">" +
     "<TR>" +
     "<TD height=\"35\"><img src=\"https://eportal.llnl.gov/portal/images/dev/traffic/traffic.gif\"/ ALT=\"Image of car\"></TD>" +
     "<TD CLASS=\"PortletText1\" height=\"35\"><a href=\"http://traffic.yahoo.com/traffic/San_Francisco_Bay_Area/San_Francisco\" target=\"_blank\">Yahoo Traffic!!</a><br>" +
"<a href=\"http://www.kpix.com/traffic/ALL.html\" target=\"_blank\">KPIX Traffic!!</a>" +
     "</TD>" +
     "</TR>" +
     "<TR>" +
     "<TD CLASS=\"PortletText1\" colspan=\"2\"> Use the above links to check traffic!</TD>" +
     "</TR>" +
          "</TABLE>" +
          "</CENTER>" +
          "<CENTER>" +
          "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"2\">" +
     "<TR>" +
     "<TD height=\"35\"><img src=\"https://eportal.llnl.gov/pasdaasdasdfdfadasdfasdaal/images/dev/traffic/traffic.gif\"/ ALT=\"Image of car\"></TD>"+
     "<CENTER>" +
          "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"2\">" +
     "<TR>";      }
This is the bigger string:
1026 bytes
public java.lang.String getBenefits() {
     return "<TABLE CELLSPACING=\"2\" CELLPADDING=\"2\" WIDTH=\"100%\">" +
          "<TR VALIGN=\"top\" CLASS=\"PortletText1\">" +
          "<TD><A HREF=\"http://www.ucop.edu/bencom/forms/forms.html\" TARGET=\"_blank\">Bencom Forms</A></TD>" +
          "<TD><A HREF=\"http://www.calpers.ca.gov/retire/estimate/default.htm\" TARGET=\"_blank\">Calpers Calculator</A></TD>" +
          "</TR>" +
          "<TR VALIGN=\"top\" CLASS=\"PortletText1\">" +
          "<TD><A HREF=\"http://www.ucop.edu/bencom/oe/carrier.html\" TARGET=\"_blank\">Health Care Providers</A></TD>" +
          "<TD><A HREF=\"http://www.ucop.edu/bencom/oe/carrier.html\" TARGET=\"_blank\">Health Care Providers</A></TD>" +
          "</TR>" +
          "<TR VALIGN=\"top\" CLASS=\"PortletText1\">" +
          "<TD><A HREF=\"http://finwebsvr/ADS_payroll/\" TARGET=\"_blank\">Payroll</A></TD>" +
          "<TD><A HREF=\"http://www.ucop.edu/bencom/rs/ucrpcalc/estimator.html\" TARGET=\"_blank\">Retirement Estimator</A></TD>" +
          "</TR>" +
          "<TR VALIGN=\"top\" CLASS=\"PortletText1\">" +
          "<TD><A HREF=\"http://www.ucop.edu/bencom/\" TARGET=\"_blank\">UC Bencom</A></TD>" +
          "<TD><A HREF=\"http://www.llnl.gov/llnl/02employment/benefits/benefits.htm\" TARGET=\"_blank\">UC Benefits Office</A></TD>" +
          "</TR>" +
          "</TABLE>";
based on what button you push you get one or the other string:
public void renderPortletContents(PortletRenderRequest request) {
try {
PrintWriter out = request.getWriter("text/html");
String url = request.getPageURL();
String benefits = request.getParameter("Benefits");
String traffic = request.getParameter("Traffic");
String html = request.getParameter("pastedHtml");
String baseHtml = getBaseHtml();
baseHtml = insertUrlIntoBaseHtml(baseHtml, url);
//check to see if the Apply button or Cancel button from the form has been pressed
if ((benefits != null) | (traffic != null)) {
if (benefits != null) {
baseHtml = insertCurrentHtml(getBenefits());
baseHtml = insertNumberOfBytes(baseHtml, getNumberOfBytes(getBenefits()));
} else
if (traffic != null) {
baseHtml = insertCurrentHtml(getTraffic());
baseHtml = insertNumberOfBytes(baseHtml, getNumberOfBytes(getTraffic()));
baseHtml = insertUrlIntoBaseHtml(baseHtml, url);
out.print(baseHtml);
} catch (IOException e) {
e.printStackTrace();
Any ideas?
Thanks

To reproduce this problem you would have install it as a portlet
in Oracle Portal. Can you do that? If so
I can send you a library .jar file, java code of program, and provider.xml.
Then you would have to add it to a web page that has tabs.
I was hoping to find out some simple java issue, so if it isn't I'll have
to take this up with Oracle.
Let me know if you can test it.
Thanks

Similar Messages

  • String limit does not appear in result list

    Hello
    I have a sequence file with a sequence call "String limit test". After running the sequence from a process model, the "Limits" container does not appear in the result list of the main sequence. I have checkec the IncludeInReport flag for the Limits container, still I don't see it.
    Basically I need this information after calling the MainSequence in the client file, in order to create a report file. How to inclide the variable in the ResultList[]?
    Madottati

    Madottati,
    All the data from Step.Result will be copied to Locals.ResultList. Limits container for the step is outside Result container and hence is not copied to the ResultList. IncludeInReport flag affects only properties that are in a result list or that TestStand copies to a result list.
    http://www.ni.com/white-paper/8289/en/ contains more details about what properties gets added to the Result List.
    You can use Additional Results feature toa add Limits container to the ResultList.
    - Shashidhar

  • MaxL Perl Module Result String Limit

    I have a Perl script that uses the MaxL module to extract security filter rows to a text file. This script worked correctly under Essbase 6.2, but under 6.5, the strings returned my the MaxL module are limited to about 128 characters. I've tried increasing the 'MAX_COL' value in Essbase.xs and rebuilding the module, but the result is the same. Has anyone had this problem? Is there any way around this? Thanks.

    Good catch - you found a memory leak. Luckily the fix is very straightforward. Edit the file
    dbxml/src/perl/common.h
    and find this line
    #define newSVfromString(str) newSVpvn(str.c_str(), str.length())
    Change it to this
    #define newSVfromString(str) sv_2mortal(newSVpvn(str.c_str(), str.length()))
    and recompile the module.
    Paul

  • ExternalInterface.call URL string limit

    I am using ExternalInterface.call and i found out that
    recursive calling will not work .........and passing all the data
    in one call
    is also giving me a problem with string limits...........ANY
    IDEAS please?

    Yes. Make a function in JavaScript that uses the
    "GetVariable" method.
    (READ HERE:
    http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03. html
    ...and call it from the external interface. Put your 'string
    data content' in a variable and read it from JavaScript.

  • Crystal Reports XI String [255] limit with the File System Data driver...

    I was trying to create a Crystal Reports XI report to return security permissions of files and folders.  I have been able to successfully connect and return data using the File System Data driver as the Data Source; however the String limit on the ACL NT Security Field is 255 characters.  The full string of data to be returned can be much longer than the 255 limit and I cannot find how to manipulate that parameter. 
    I am currently on Crystals XI and Crystal XI R2 and have applied the latest service packs but still see the issue.  My Crystal Reports Database DLL for File System data ( crdb_FileSystem.dll ) is at Product Version 11.5.10.1263.
    Is it possible to change string limits when using the File System Data driver as the Data Source?  If so, how can that be accomplished.  If not, is there another method to retrieve information with the Windows File System Data being the Data Source?  Meaning, could I reach my end game objective of reporting on the Windows ACL's with Crystal through another method?

    Hello,
    This is a known issue. Early versions you could not create folder structures longer than 255 characters. With the updates to the various OS's this is now possible but CR did not allocate the same space required.
    It's been tracked as an enhancement - ADAPT01174519 but set for a future release.
    There are likely other ways of getting the info and then putting it into an Excel file format and using that as the data source.
    I did a Google search and found this option: http://www.tomshardware.com/forum/16772-45-display-explorer-folders-tree-structure-export-excel
    There are tools out there to do this kind of thing....
    Thank you
    Don
    Note the reference to msls.exe appears to be a trojan: http://www.greatis.com/appdata/d/m/msls.exe.htm so don't install it.
    Edited by: Don Williams on Mar 19, 2010 8:45 AM

  • What is the best method to have multiple string limits in a single test

    Hello All,
    I need a little advice I have two strings that need to be evaluated as a pass criteria for a single test test step (Numeric String limit test). What would be the best approach to this?
    The strings are "00000000 00000010" and  "00000000 00000000"

    A couple of ideas:
    1) Concatenate the strings. Both when storing them in the data source and in your limits for the values you expect.
    2) Use arrays for both the data source and limit and loop on the step requiring all iterations to pass and using the loop index variable in your expressions for your string limit test. For example, for the limit expression you would have:
    Locals.expectedValues[RunState.LoopIndex]
    and for the data source expression you would have:
    Locals.stringMeasurements[RunState.LoopIndex]
    Then you would set the loop options on the step to loop the required number of times. You can even use the expression function GetNumElements(Locals.expectedValue) in your loop while expression to set the number of iterations dynamically.
    Hope this helps,
    -Doug

  • 3K limit Bug in Report builder?

    All,
    Created a report based on the following query
    select ''&#0124; &#0124;first_name&#0124; &#0124;' '&#0124; &#0124;last_name&#0124; &#0124;'' as login_name, first_name, last_name
    from portal30.wwsec_person$
    where created_on >= '01-APR-2001' and created_on <= sysdate
    When I go to edit it, the sql query defaults to
    select * from scott.emp
    My colleagues tell me of a 3K query string limit bug of WebDB, which caused the same problem.
    any ideas why this might be happening?
    Portal: 3.0.7.6.2
    RDBMS : 8.1.6.2
    Windows NT
    Thanks
    Sanjay

    Trying to show the query correctly
    select htp://dss2/pls/portal30/portal30.self_reg_portlet.show_user_request?p_username='&#0124; &#0124;user_name&#0124; &#0124;'>' &#0124; &#0124;first_name&#0124; &#0124;' '&#0124; &#0124;last_name&#0124; &#0124;'</a>' as login_name, first_name, last_name
    from portal30.wwsec_person$
    where created_on >= '01-APR-2001' and created_on <= sysdate
    Btw, I can customize the report, change the
    parameters, get an output etc. I cannot edit
    it however. I am logged in as the Portal30 user.

  • How to get Int value from request.getParameter()?

    Hi all,
    I have a integer value which is passed from one page to another page.
    i am geting this value in the next page using
    request.getParameter().
    Eg.
    Suppose value of "i" in page1 is 32, i pass this as hidden variable to next page.
    <input type="hidden" Value="<%=i%>" NAME="limit">
    in page2, i fethch this value to a variable by name "limit"
    String limit=request.getParameter("limit");
    but, since value stored in limit is int, i can't assign it to string.
    i can't use request.getParameter for int values.
    How to solve my problem.
    I know it is simple,
    Pls. help me
    Regards
    ASh
    String limit=request.getParameter("limit");

      String limitSTR = request.getParameter("limit");
      int limit = -1;
      if (limitSTR != null) limit = Integer.parseInt(limitSTR);

  • XDB annotations on complex XML Schema

    I am currently testing this in 11gr2 Express, while I wait for our DBA to upgrade our main AIX dev instance to 11gr2 enterprise edition.
    I have a fairly complex xmlschema, provided by the IPTC and trying to annotate it to override some of the default sqltype mappings, but running into problems with how/where to annotate.
    From what I have learned so far, annotations to override the sqltype mappings can only be done on complexType and simpleTypes. ComplexTypes must map to a sql object type, and simpleTypes map to a basic atomic sqlType.
    How would you handle an instance where a complex type extends an xs:string.. but need to have this string map to a CLOB and not a varchar2(4000)?
    <xs:element name="inlineData">
                                                      <xs:annotation>
                                                           <xs:documentation>A rendition of the content using plain-text or encoded inline data</xs:documentation>
                                                      </xs:annotation>
                                                      <xs:complexType>
                                                           <xs:simpleContent>
                                                                <xs:extension base="xs:string">
                                                                     <xs:attributeGroup ref="newsContentAttributes" />
                                                                     <xs:attributeGroup ref="newsContentTypeAttributes" />
                                                                     <xs:attribute name="encoding" type="QCodeType">
                                                                          <xs:annotation>
                                                                               <xs:documentation>The encoding applied to the content before inclusion</xs:documentation>
                                                                          </xs:annotation>
                                                                     </xs:attribute>
                                                                     <xs:attributeGroup ref="newsContentCharacteristics" />
                                                                     <xs:attributeGroup ref="i18nAttributes" />
                                                                     <xs:anyAttribute namespace="##other" processContents="lax" />
                                                                </xs:extension>
                                                           </xs:simpleContent>
                                                      </xs:complexType>
                                                 </xs:element>Adding the xdb: mapUnboundedStringToLob annotation to element "inlineData" fails... not valid... and can't add it to the extension either.. so would a viable valid option in this case, be to create a simpleType, call it say "LargeStringToClob"..with a restriction of type xs:String... then annotate this simpleType to map it to a CLOB.
    Then change the inlineData element extension from xs:string to "LargeStringToClob" ? I plan to use an XMLType column with BinaryXML storage...
    I was hoping to not have to modify the xml schema too much, but I guess its to be expected when trying to map it into Oracle.
    I am faced with a similar issue when trying to annotate for Timestamp with time zone...
    some elements are declared as unions of other types. From what I have read, Oracle maps these to varchar2(4000)
    Example:
    <xs:simpleType name="DateOptTimeType">
              <xs:annotation>
                   <xs:documentation>The type of a date (required) and a time (optional).</xs:documentation>
              </xs:annotation>
              <xs:union memberTypes="xs:date xs:dateTime" />
         </xs:simpleType>Even though this is a simpleType... I cannot annotate it to map it to a TimeStamp with Timezone ... would I have to again... create simpleTypes for each of the memberTypes in the union, annotate each one to map to Timestampt with time zone.. then use these new simpleTypes in the union?
    Thanks for any tips or advice!

    odie_63 wrote:
    so if using Binary XML, you are stuck with what Oracle gives you? for instance, the inlineData element is an unbounded string in the schema... Oracle maps it to varchar2(4000).No, Binary XML stores data differently.
    Consider this simple example :
    SQL> begin
    2   dbms_xmlschema.registerSchema(
    3   schemaURL => 'test.xsd',
    4   schemaDoc => '<?xml version="1.0"?>
    5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
    6  <xs:element name="note" xdb:defaultTable="NOTES_TABLE">
    7    <xs:complexType>
    8      <xs:sequence>
    9        <xs:element name="content" type="xs:string"/>
    10        <xs:element name="dt" type="xs:dateTime"/>
    11      </xs:sequence>
    12    </xs:complexType>
    13  </xs:element>
    14  </xs:schema>',
    15   local => true,
    16   genTypes => false,
    17   genTables => false,
    18   enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE,
    19   options => dbms_xmlschema.REGISTER_BINARYXML
    20   );
    21  end;
    22  /
    PL/SQL procedure successfully completed
    SQL> CREATE TABLE notes_table OF XMLTYPE
    2  XMLTYPE STORE AS binary xml
    3  XMLSCHEMA "test.xsd"
    4  ELEMENT "note"
    5  ;
    Table created
    SQL> insert into notes_table values(xmltype(
    2  '<note>
    3  <content>'||lpad(to_clob('X'),8000,'X')||'</content>
    4  <dt>2011-11-16T11:56:23+01:00</dt>
    5  </note>'));
    1 row inserted
    SQL> select x.dt
    2       , x.content
    3       , length(x.content)
    4  from notes_table t
    5     , xmltable('/note' passing t.object_value
    6       columns dt      timestamp with time zone  path 'dt'
    7             , content clob                      path 'content'
    8       ) x
    9  ;
    DT                                CONTENT                                                                          LENGTH(X.CONTENT)
    16/11/11 11:56:23,000000 +01:00   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX              8000No issue in storing large strings.Very cool... that works... .. the string limit exceeded expcetion I got earlier was no fault to Binary XML.. but me pasting in too much text in SQLDeveloper insert statement.
    I think I may have been on this for too long... brain is getting fuzzy ;-)
    The approach you outline shows promise and I will go with BinaryXML storage option.
    I need to decide whether to use virtual columns or non-trivial columns at this point, to enforce integrity constraints and possibly some partitioning. We do have a few relational lookup tables to tie into this as well... and will also need to implement VPD.

  • Oracle 10g Database startup problem Please help

    i am trying to start database but getting error;
    SQL> startup
    ORACLE instance started.
    Total System Global Area 281018368 bytes
    Fixed Size 788776 bytes
    Variable Size 229373656 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 524288 bytes
    Database mounted.
    ORA-16038: log 2 sequence# 44103 cannot be archived
    ORA-19809: limit exceeded for recovery files
    ORA-00312: online log 2 thread 1: 'D:\ORADATA\ASDB\REDO02.LOG'
    Please guide and help
    Thanks,
    Waheed.

    The error stack is interpreted as follows:
    ORA-16038:     log string sequence# string cannot be archived
    Cause:     An attempt was made to archive the named file, but the file could not be archived. Examine the secondary error messages to determine the cause of the error.
    Action:     No action is required
    ORA-19809:     limit exceeded for recovery files
    Cause:     The limit for recovery files specified by the DB_RECOVERY_FILE_DEST_SIZE was exceeded.
    Action:     The error is accompanied by 19804. See message 19804 for further details.
    ORA-19804:     cannot reclaim string bytes disk space from string limit
    Cause:     Oracle cannot reclaim disk space of specified bytes from the DB_RECOVERY_FILE_DEST_SIZE limit.
    Action:     There are five possible solutions: 1) Take frequent backup of recovery area using RMAN. 2) Consider changing RMAN retention policy. 3) Consider changing RMAN archivelog deletion policy. 4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE. 5) Delete files from recovery area using RMAN.
    ORA-00312:     online log string thread string: 'string'
    Cause:     This message reports the filename for details of another message.
    Action:     Other messages will accompany this message. See the associated messages for the appropriate action to take.
    DB_RECOVERY_FILE_DEST_SIZE specifies (in bytes) the hard limit on the total space to be used by target database recovery files created in the flash recovery area. You should increase this value.
    On the other hand, out from the context I guessed it is a 10gRx database, but you should specify this on your thread, as well as specify os details.
    ~ Madrid

  • Running out of memory - where do I not free objects?

    Hello there,
    I am analyzing data on an Itanium with 1GB of memory using the JSDK 1.4 (Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)). I have a lot of memory troubles reading data as small as 120MB and processing it (using the Pattern class and ArrayList or static String array), so I wrote this little program to test the memory:
                   print("Starting memcheck - press key...");
                   int border= 100000;
                   int bCount = border;
                   int limit = 18000000;
                   String tst = new String("Hi, Tester!");
                   System.in.read();
                   print("Key for 1-String-Buffer...");
                   System.in.read();
                   StringBuffer checkSt = new StringBuffer(limit*tst.length());
                   print("1-String-Buffer created. Key for clearance...");
                   System.in.read();
                   checkSt = null;               
                   System.gc();
                   print("Key for Strings...");
                   System.in.read();
                   String [] checkS = new String[limit];
                   for (int i=0; i<limit; i++) {
                        checkS[i] = (new String(tst));
                        if (--bCount == 0) {
                             bCount = border;
                             print("Created: "+i+" strings!");
                   print("Strings created. Key for clearance...");
                   System.in.read();
                   checkS = null;               
                   System.gc();As I originally thought, this only uses about 800MB with the static String array, 471MB with the StringBuffer, and crashes (out of memory) when being permitted up to 1000MB with ArrayList.
    The odd thing is though, that when I put the part with the static String array after the StringBuffer part, it crashes too (out of memory). So I guess, that I have not fully understood how to free memory in java yet and that I am overlooking something here - can someone please help me? I have already tried for more than a week to fix this problem, but I must be overlooking the obvious...
    According to my math, if I read 100MB, it should at most use 2*100MB+overhead (2* because of Java's internal unicode representation). Where am I doing wrong?
    Thanks in advance!

    Double posted,
    http://forum.java.sun.com/thread.jsp?forum=31&thread=409677&tstart=0&trange=15

  • Vb code explanation

    ' Exclude capital construction expenditures
    sOut = sOut & "*UNION({[Fund].[Fund Type].&[CP]} * {[Fund].[Fund No].&[435]}"
    sOut = sOut & ", EXCEPT([Fund].[Fund Type].[All].CHILDREN,[Fund].[Fund Type].&[CP])"
    sOut = sOut & "*[Fund].[Fund No].[All].CHILDREN) "
    'else
    ' Commented out because if it's true, we don't want to limit any results
    ' sOut = sOut & "*{[Fund].[Fund Type].&[CP]}"
    ' sOut = sOut & "*EXCEPT([Fund].[Fund No].[All].CHILDREN,[Fund].[Fund No].&[435])"
    I know it is to exclude the capital construction expenditure as explained above but can you explain each line.
    Thanks.

    I was asked to add a new parameter (Project or Non-Project) to a report. The parameter for the summarized report is a dataset from a cube which is to drill through to an expense journal report. The drill through report whose data source is from a database.
    For the previous report before adding the parameter it has been returning result, but after adding my parameter it returns nothing because of 1 of the filter selection FUND_NUMBER IN (ALL) but when I put a real value it returns result.I understand why it
    is not returning any result. It is because in the database for that column .All is only applicable in dataset from analysis. My question now is I only added my column to the code. I did not touch anything else that reference that column so how come it
    is an issue after I added my parameter since I guess the code has been designed to handle such before.
    I have added the vb code both for the Monthly trend and Expense Journal. Please if you are good in vb please assist or if you have a suggestion.
    I know the code looks lengthy but it is pretty much the same thing when you get the hand work of  1 line.Thanks
    Public Function fMonthlyTrendsMDX() as string
    Dim sOut as String
    Dim iCriteria as Integer = 0
    sOut = "SELECT NON EMPTY {[Measures].[" & Report.Parameters!pRevOrExp.Label & " Amount]} ON COLUMNS, NON EMPTY {"
    if Report.Parameters!pSummary1.Value="Category_Description" or Report.Parameters!pSummary2.Value="Category_Description" or Report.Parameters!pSummary3.Value="Category_Description" then
    sOut = sOut & fPadMDX("[Object].[Category Description].[Category Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Object_Description" or Report.Parameters!pSummary2.Value="Object_Description" or Report.Parameters!pSummary3.Value="Object_Description" then
    sOut = sOut & fPadMDX("[Object].[Object Description].[Object Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Object_Detail_Description" or Report.Parameters!pSummary2.Value="Object_Detail_Description" or Report.Parameters!pSummary3.Value="Object_Detail_Description" then
    sOut = sOut & fPadMDX("[Object].[Object Detail Description].[Object Detail Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Resp_Unit_Org_Level_1" or Report.Parameters!pSummary2.Value="Resp_Unit_Org_Level_1" or Report.Parameters!pSummary3.Value="Resp_Unit_Org_Level_1" then
    sOut = sOut & fPadMDX("[Responsible Unit].[Org Level 1].[Org Level 1].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Resp_Unit_Org_Level_2" or Report.Parameters!pSummary2.Value="Resp_Unit_Org_Level_2" or Report.Parameters!pSummary3.Value="Resp_Unit_Org_Level_2" then
    sOut = sOut & fPadMDX("[Responsible Unit].[Org Level 2].[Org Level 2].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Resp_Unit_Org_Level_3" or Report.Parameters!pSummary2.Value="Resp_Unit_Org_Level_3" or Report.Parameters!pSummary3.Value="Resp_Unit_Org_Level_3" then
    sOut = sOut & fPadMDX("[Responsible Unit].[Org Level 3].[Org Level 3].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Resp_Org_Unit_Description" or Report.Parameters!pSummary2.Value="Resp_Org_Unit_Description" or Report.Parameters!pSummary3.Value="Resp_Org_Unit_Description" then
    sOut = sOut & fPadMDX("[Responsible Unit].[Org Unit].[Org Unit].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    sOut = sOut & fPadMDX("[Responsible Unit].[Org Unit Description].[Org Unit Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Resp_Org_Unit" or Report.Parameters!pSummary2.Value="Resp_Org_Unit" or Report.Parameters!pSummary3.Value="Resp_Org_Unit" then
    sOut = sOut & fPadMDX("[Responsible Unit].[Org Unit].[Org Unit].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Charge_Unit_Org_Level_1" or Report.Parameters!pSummary2.Value="Charge_Unit_Org_Level_1" or Report.Parameters!pSummary3.Value="Charge_Unit_Org_Level_1" then
    sOut = sOut & fPadMDX("[Charge Unit].[Org Level 1].[Org Level 1].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Charge_Unit_Org_Level_2" or Report.Parameters!pSummary2.Value="Charge_Unit_Org_Level_2" or Report.Parameters!pSummary3.Value="Charge_Unit_Org_Level_2" then
    sOut = sOut & fPadMDX("[Charge Unit].[Org Level 2].[Org Level 2].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Charge_Unit_Org_Level_3" or Report.Parameters!pSummary2.Value="Charge_Unit_Org_Level_3" or Report.Parameters!pSummary3.Value="Charge_Unit_Org_Level_3" then
    sOut = sOut & fPadMDX("[Charge Unit].[Org Level 3].[Org Level 3].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Charge_Org_Unit_Description" or Report.Parameters!pSummary2.Value="Charge_Org_Unit_Description" or Report.Parameters!pSummary3.Value="Charge_Org_Unit_Description" then
    sOut = sOut & fPadMDX("[Charge Unit].[Org Unit].[Org Unit].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    sOut = sOut & fPadMDX("[Charge Unit].[Org Unit Description].[Org Unit Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Charge_Org_Unit" or Report.Parameters!pSummary2.Value="Charge_Org_Unit" or Report.Parameters!pSummary3.Value="Charge_Org_Unit" then
    sOut = sOut & fPadMDX("[Charge Unit].[Org Unit].[Org Unit].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Activity_Description" or Report.Parameters!pSummary2.Value="Activity_Description" or Report.Parameters!pSummary3.Value="Activity_Description" then
    sOut = sOut & "NonEmpty([Activity].[Activity Description].[Activity Description].ALLMEMBERS)*"
    end if
    if Report.Parameters!pSummary1.Value="Appn_Symbol_Description" or Report.Parameters!pSummary2.Value="Appn_Symbol_Description" or Report.Parameters!pSummary3.Value="Appn_Symbol_Description" then
    sOut = sOut & fPadMDX("[Appropriation].[Appn Symbol Description].[Appn Symbol Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="EA" or Report.Parameters!pSummary2.Value="EA" or Report.Parameters!pSummary3.Value="EA" then
    sOut = sOut & fPadMDX("[EA].[EA].[EA]",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="EA_Description" or Report.Parameters!pSummary2.Value="EA_Description" or Report.Parameters!pSummary3.Value="EA_Description" then
    sOut = sOut & fPadMDX("[EA].[EA Description].[EA Description]",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="EA_Subjob" or Report.Parameters!pSummary2.Value="EA_Subjob" or Report.Parameters!pSummary3.Value="EA_Subjob" then
    sOut = sOut & fPadMDX("[EA].[EA Subjob].[EA Subjob]",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="EA_Class" or Report.Parameters!pSummary2.Value="EA_Class" or Report.Parameters!pSummary3.Value="EA_Class" then
    sOut = sOut & fPadMDX("[EA].[Report Class].[Report Class]",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if left(Report.Parameters!pSummary1.Value,6)="Rel_EA" or left(Report.Parameters!pSummary2.Value,6)="Rel_EA" or left(Report.Parameters!pSummary3.Value,6)="Rel_EA" then
    sOut = sOut & fPadMDX("[EA].[Rel EA Description].[Rel EA Description]",Report.Parameters!pRevOrExp.Label) & "*"
    sOut = sOut & fPadMDX("[EA].[Rel EA Subjob].[Rel EA Subjob]",Report.Parameters!pRevOrExp.Label) & "*"
    sOut = sOut & fPadMDX("[EA].[Rel EA].[Rel EA]",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Fiscal_Year" or Report.Parameters!pSummary2.Value="Fiscal_Year" or Report.Parameters!pSummary3.Value="Fiscal_Year" then
    sOut = sOut & fPadMDX("[Biennium].[Fiscal Year].[Fiscal Year].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Fiscal_Month" or Report.Parameters!pSummary2.Value="Fiscal_Month" or Report.Parameters!pSummary3.Value="Fiscal_Month" then
    sOut = sOut & fPadMDX("[Biennium].[Fiscal Month].[Fiscal Month].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Fund_Detail_Description" or Report.Parameters!pSummary2.Value="Fund_Detail_Description" or Report.Parameters!pSummary3.Value="Fund_Detail_Description" then
    sOut = sOut & fPadMDX("[Fund].[Fund Detail Description].[Fund Detail Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Fund_Detl" or Report.Parameters!pSummary2.Value="Fund_Detl" or Report.Parameters!pSummary3.Value="Fund_Detl" then
    sOut = sOut & fPadMDX("[Fund].[Fund Detl].[Fund Detl].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Fund_No_Description" or Report.Parameters!pSummary2.Value="Fund_No_Description" or Report.Parameters!pSummary3.Value="Fund_No_Description" then
    sOut = sOut & fPadMDX("[Fund].[Fund No Description].[Fund No Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Fund_Source_Description" or Report.Parameters!pSummary2.Value="Fund_Source_Description" or Report.Parameters!pSummary3.Value="Fund_Source_Description" then
    sOut = sOut & fPadMDX("[Fund].[Fund Source Description].[Fund Source Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    'if Report.Parameters!pSummary1.Value="Fund_Type" or Report.Parameters!pSummary2.Value="Fund_Type" or Report.Parameters!pSummary3.Value="Fund_Type" then
    ' sOut = sOut & fPadMDX("[Fund].[Fund Type].[Fund Type].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    'end if
    if Report.Parameters!pSummary1.Value="Fund_Type_Description" or Report.Parameters!pSummary2.Value="Fund_Type_Description" or Report.Parameters!pSummary3.Value="Fund_Type_Description" then
    sOut = sOut & fPadMDX("[Fund].[Fund Type Description].[Fund Type Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Trans_Code_Description" or Report.Parameters!pSummary2.Value="Trans_Code_Description" or Report.Parameters!pSummary3.Value="Trans_Code_Description" then
    sOut = sOut & fPadMDX("[Transaction Codes].[Trans Code Description].[Trans Code Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Trans_Group_Description" or Report.Parameters!pSummary2.Value="Trans_Group_Description" or Report.Parameters!pSummary3.Value="Trans_Group_Description" then
    sOut = sOut & fPadMDX("[Transaction Codes].[Trans Group Description].[Trans Group Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Agency_Source_Description" or Report.Parameters!pSummary2.Value="Agency_Source_Description" or Report.Parameters!pSummary3.Value="Agency_Source_Description" then
    sOut = sOut & fPadMDX("[Revenue Source].[Agency Source Description].[Agency Source Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    if Report.Parameters!pSummary1.Value="Revenue_Source_Description" or Report.Parameters!pSummary2.Value="Revenue_Source_Description" or Report.Parameters!pSummary3.Value="Revenue_Source_Description" then
    sOut = sOut & fPadMDX("[Revenue Source].[Revenue Source Description].[Revenue Source Description].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    end if
    sOut = sOut & fPadMDX("[Biennium].[Biennium Hierarchy].[Bien Name].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    sOut = sOut & fPadMDX("[" & Report.Parameters!pColumnGrouping.Label & "].[Calendar Year].[Calendar Year].ALLMEMBERS",Report.Parameters!pRevOrExp.Label) & "*"
    sOut = sOut & fPadMDX("[" & Report.Parameters!pColumnGrouping.Label & "].[Calendar Month].[Calendar Month].ALLMEMBERS",Report.Parameters!pRevOrExp.Label)
    if (Report.Parameters!pCapExpenses.Value=False) then
    ' Exclude capital construction expenditures
    sOut = sOut & "*UNION({[Fund].[Fund Type].&[CP]} * {[Fund].[Fund No].&[435]}"
    sOut = sOut & ", EXCEPT([Fund].[Fund Type].[All].CHILDREN,[Fund].[Fund Type].&[CP])"
    sOut = sOut & "*[Fund].[Fund No].[All].CHILDREN) "
    'else
    ' Commented out because if it's true, we don't want to limit any results
    ' sOut = sOut & "*{[Fund].[Fund Type].&[CP]}"
    ' sOut = sOut & "*EXCEPT([Fund].[Fund No].[All].CHILDREN,[Fund].[Fund No].&[435])"
    end if
    sOut = sOut & "} DIMENSION PROPERTIES MEMBER_CAPTION,MEMBER_UNIQUE_NAME ON ROWS "
    if (Report.Parameters!pLastCompletedPeriod.Value="Month") and (Report.Parameters!BienniumBienniumHierarchy.Value(0) = fReturnBienMDX(Now())) then
    sOut = sOut & "FROM (SELECT StrToMember('" & Report.Parameters!pFirstDayOfBiennium.Value & "', constrained):StrToMember('"
    sOut = sOut & Report.Parameters!pLastFullMonthMDX.Value & "', constrained) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!ActivityDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!ActivityDescription.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!Appropriation.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!Appropriation.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!AgencySrcDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!AgencySrcDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!EA.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!EA.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!EAReportClass.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!EAReportClass.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!EASubJob.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!EASubJob.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!EASubjobDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!EASubjobDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundNo.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundNo.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundNoDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundNoDescription.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundDetailDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundDetailDescription.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundDetl.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundDetl.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FiscalMonth.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FiscalMonth.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FiscalYear.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FiscalYear.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundSrcDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundSrcDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundType.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundType.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!FundTypeDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!FundTypeDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!RelEA.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!RelEA.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!RelEADesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!RelEADesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!RelEASubjob.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!RelEASubjob.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!RevenueSrcDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!RevenueSrcDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!TransCode.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!TransCode.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!TransCodeDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!TransCodeDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!TransGroup.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!TransGroup.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!TransGroupDesc.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!TransGroupDesc.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!ObjectCategoryDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!ObjectCategoryDescription.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!ObjectObjectDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!ObjectObjectDescription.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!ObjectDetailDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!ObjectDetailDescription.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!OrgUnitDescription.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & replace(join(Report.Parameters!OrgUnitDescription.value,","),chr(39),chr(39)&chr(39)) & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!OrgLevel1.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & replace(join(Report.Parameters!OrgLevel1.value,","),chr(39),chr(39)&chr(39)) & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!OrgLevel2.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & replace(join(Report.Parameters!OrgLevel2.value,","),chr(39),chr(39)&chr(39)) & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!OrgLevel3.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & replace(join(Report.Parameters!OrgLevel3.value,","),chr(39),chr(39)&chr(39)) & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if not (instr(join(Report.Parameters!BienniumBienniumHierarchy.value,","),"All")>0) then
    sOut = sOut & "FROM (SELECT StrToSet('{" & join(Report.Parameters!BienniumBienniumHierarchy.value,",") & "}',CONSTRAINED) ON COLUMNS "
    iCriteria = iCriteria + 1
    end if
    if Report.Parameters!pRevOrExp.Label = "Expenditure" then
    sOut = sOut & "from (select ([Transaction Codes].[Trans Group].&[3500]) on columns "
    sOut = sOut & "from (select except([Object].[Category Description].members, {[Object].[Category Description].&[9]}) on 0 "
    iCriteria = iCriteria + 2
    end if
    sOut = sOut & "FROM [HMI Finance]" & fStringClone(")", iCriteria)
    sOut = sOut & "CELL PROPERTIES VALUE,BACK_COLOR,FORE_COLOR,FORMATTED_VALUE,FORMAT_STRING,FONT_NAME,FONT_SIZE,FONT_FLAGS;"
    return sOut
    end function
    Public Function fGenAuditTrailQuery() as String
    ' For any Summary or column parms that have EASJ as the value, this is a calculated
    ' column made up of the EA and SUBJOB columns. Due to this, we need to detect
    ' when the EASJ value has been selected so we get the EA and SUBJOB columns to use
    ' in the calculation
    ' Same with VENDOR_NO_SFX -- calculated column, so we need to grab the appropriate
    ' columns to create it (VENDOR_NO and VENDOR_SFX)
    Dim sOut as String
    ' Limit results to the pRecordsLimit parameter if it is populated
    if Report.Parameters!pRecordsLimit.Value IsNot Nothing then
    sOut = "SELECT top " & Report.Parameters!pRecordsLimit.Value & " "
    else
    sOut = "SELECT "
    end if
    ' Column1 select
    if Report.Parameters!pColumn1.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pColumn1.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    elseif LEFT(Report.Parameters!pColumn1.Value,8) = "VENDOR_N" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, VENDOR_NAME, "
    else
    sOut = sOut & Report.Parameters!pColumn1.Value & ", "
    end if
    ' Column2 select
    if Report.Parameters!pColumn2.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pColumn2.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    elseif LEFT(Report.Parameters!pColumn2.Value,8) = "VENDOR_N" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, VENDOR_NAME, "
    else
    sOut = sOut & Report.Parameters!pColumn2.Value & ", "
    end if
    ' Column3 through Column6 select
    sOut = sOut & Report.Parameters!pColumn3.Value & ", "
    sOut = sOut & Report.Parameters!pColumn4.Value & ", "
    sOut = sOut & Report.Parameters!pColumn5.Value & ", "
    sOut = sOut & Report.Parameters!pColumn6.Value & ", "
    ' Column7 select
    if Report.Parameters!pColumn7.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pColumn7.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    elseif LEFT(Report.Parameters!pColumn7.Value,8) = "VENDOR_N" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, VENDOR_NAME, "
    else
    sOut = sOut & Report.Parameters!pColumn7.Value & ", "
    end if
    ' Column8 select
    if Report.Parameters!pColumn8.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pColumn8.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    elseif LEFT(Report.Parameters!pColumn8.Value,8) = "VENDOR_N" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, VENDOR_NAME, "
    else
    sOut = sOut & Report.Parameters!pColumn8.Value & ", "
    end if
    ' Column9 select
    if Report.Parameters!pColumn9.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pColumn9.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    elseif LEFT(Report.Parameters!pColumn9.Value,8) = "VENDOR_N" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, VENDOR_NAME, "
    else
    sOut = sOut & Report.Parameters!pColumn9.Value & ", "
    end if
    ' Include columns if they were used to groupby
    if Report.Parameters!pSummary1.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pSummary1.Value = "VENDOR_NO_SFX" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, "
    elseif Report.Parameters!pSummary1.Value="RESPONSIBLE_UNIT" then
    sOut = sOut & "RESPONSIBLE_UNIT, "
    elseif Report.Parameters!pSummary1.Value="CHRGE_UNIT" then
    sOut = sOut & "CHRGE_UNIT, "
    elseif Report.Parameters!pSummary1.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    else
    sOut = sOut & Report.Parameters!pSummary1.Value & ", "
    end if
    if Report.Parameters!pSummary2.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif left(Report.Parameters!pSummary2.Value,8) = "VENDOR_N" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, VENDOR_NAME, "
    elseif Report.Parameters!pSummary2.Value="RESPONSIBLE_UNIT" then
    sOut = sOut & "RESPONSIBLE_UNIT, "
    elseif Report.Parameters!pSummary2.Value="CHRGE_UNIT" then
    sOut = sOut & "CHRGE_UNIT, "
    elseif Report.Parameters!pSummary2.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    else
    sOut = sOut & Report.Parameters!pSummary2.Value & ", "
    end if
    if Report.Parameters!pSummary3.Value = "EASJ" then
    sOut = sOut & "EA, SUBJOB, "
    elseif Report.Parameters!pSummary3.Value = "VENDOR_NO_SFX" then
    sOut = sOut & "VENDOR_NO, VENDOR_SFX, "
    elseif Report.Parameters!pSummary3.Value="RESPONSIBLE_UNIT" then
    sOut = sOut & "RESPONSIBLE_UNIT, "
    elseif Report.Parameters!pSummary3.Value="CHRGE_UNIT" then
    sOut = sOut & "CHRGE_UNIT, "
    elseif Report.Parameters!pSummary3.Value = "REL_EASJ" then
    sOut = sOut & "REL_EA, REL_SUBJOB, "
    else
    sOut = sOut & Report.Parameters!pSummary3.Value & ", "
    end if
    ' Always include the following columns
    sOut = sOut & " FUND_SPLT_SEQ_NO, DUP_REC_IND, FISCAL_YEAR, FISCAL_MONTH, BATCH_AGENCY, BATCH_DATE, BATCH_TYPE, BATCH_NO, DOC_INDEX, LINE_NO, RECORD_NO, "
    sOut = sOut & "ORG_LEVEL, ORG_LEVEL_1, ORG_LEVEL_2, ORG_LEVEL_3, RESP_UNIT_LEVL_1, RESP_UNIT_LEVL_2, RESP_UNIT_LEVL_3,OBJECT, CATEGORY "
    ' Logic to query the correct audittrail table depends on
    ' the pBiennium parm and that the audittrail table is named
    ' appropriately.
    ' Current biennium should always be STG_FMPROD_V_AUDITTRAIL_CURR
    ' Previous bienniums are STG_FMPROD_V_AUDITTRAIL_BI_XX
    ' Someday in the future, this naming schema will have to change
    ' because the biennium numbering will hit 99, then roll over to 01 again
    sOut = sOut & " FROM dbo.STG_FMPROD_V_AUDITTRAIL_"
    If Right(fReturnBien(Now()),2) = Right(Report.Parameters!pBiennium.Value, 2) then
    ' pBiennium value is in the current biennium, use CURR
    sOut = sOut & "CURR "
    else
    ' pBiennium value is in a previous biennium, use it
    sOut = sOut & "BI_" & Right(Report.Parameters!pBiennium.Value,2) & " "
    end if
    sOut = sOut & "WHERE"
    ' We only want expenditures. This could obviously be put into a parm, but for now we just hard coded it
    sOut = sOut & " TRANS_CODE IN (SELECT TRANS_CODE FROM STG_FMTMPROD_V_TRANS_DECISION where trans_group = 3500)"
    ' Per the requirements, we are not including anything from category 9
    sOut = sOut & " AND CATEGORY <> '9'"
    ' Capital expenditures or non-capital expenditures determined here
    if (Report.Parameters!pCapExpenses.Value = False) then
    ' Exclude capital expenditures
    sOut = sOut & " AND (FUND_TYPE <> 'CP' or FUND_NUMBER = '435')"
    end if
    if (Report.Parameters!pDateBegin.Value IsNot Nothing) and (Report.Parameters!pDateEnd.Value IsNot Nothing) Then
    sOut = sOut & " AND PROCESS_DATE BETWEEN '" & Report.Parameters!pDateBegin.Value & "'"
    sOut = sOut & " AND '" & Report.Parameters!pDateEnd.Value & "'"
    end if
    if Report.Parameters!RESPONSIBLE_UNIT.Value IsNot Nothing THEN
    sOut = sOut & " and RESPONSIBLE_UNIT IN ('" & Replace(Report.Parameters!RESPONSIBLE_UNIT.Value,",","','") & "')"
    end if
    if Report.Parameters!FISCAL_YEAR.Value IsNot Nothing THEN
    sOut = sOut & " and FISCAL_YEAR = '" & Report.Parameters!FISCAL_YEAR.Value & "'"
    end if
    if Report.Parameters!FISCAL_MONTH.Value IsNot Nothing THEN
    sOut = sOut & " and FISCAL_MONTH = '" & Report.Parameters!FISCAL_MONTH.Value & "'"
    end if
    if Report.Parameters!RESP_UNIT_LEVL_1.Value IsNot Nothing THEN
    sOut = sOut & " and RESP_UNIT_LEVL_1 IN ('" & Replace(Report.Parameters!RESP_UNIT_LEVL_1.Value,",","','") & "')"
    end if
    if Report.Parameters!RESP_UNIT_LEVL_2.Value IsNot Nothing THEN
    sOut = sOut & " and RESP_UNIT_LEVL_2 IN ('" & Replace(Report.Parameters!RESP_UNIT_LEVL_2.Value,",","','") & "')"
    end if
    if Report.Parameters!RESP_UNIT_LEVL_3.Value IsNot Nothing THEN
    sOut = sOut & " and RESP_UNIT_LEVL_3 IN ('" & Replace(Report.Parameters!RESP_UNIT_LEVL_3.Value,",","','") & "')"
    end if
    if Report.Parameters!CHRGE_UNIT.Value IsNot Nothing THEN
    sOut = sOut & " and CHRGE_UNIT IN ('" & Replace(Report.Parameters!CHRGE_UNIT.Value,",","','") & "')"
    end if
    if Report.Parameters!ORG_LEVEL_1.Value IsNot Nothing THEN
    sOut = sOut & " and ORG_LEVEL_1 IN ('" & Replace(Report.Parameters!ORG_LEVEL_1.Value,",","','") & "')"
    end if
    if Report.Parameters!ORG_LEVEL_2.Value IsNot Nothing THEN
    sOut = sOut & " and ORG_LEVEL_2 IN ('" & Replace(Report.Parameters!ORG_LEVEL_2.Value, ",","','") & "')"
    end if
    if Report.Parameters!ORG_LEVEL_3.Value IsNot Nothing THEN
    sOut = sOut & " and ORG_LEVEL_3 IN ('" & Replace(Report.Parameters!ORG_LEVEL_3.Value, ",","','") & "')"
    end if
    if Report.Parameters!CATEGORY.Value IsNot Nothing THEN
    sOut = sOut & " and CATEGORY IN ('" & Replace(Report.Parameters!CATEGORY.Value,",","','") & "')"
    end if
    if Report.Parameters!OBJECT.Value IsNot Nothing THEN
    sOut = sOut & " and OBJECT IN ('" & Replace(Report.Parameters!OBJECT.Value, ",","','") & "')"
    end if
    if Report.Parameters!OBJ_DETL.Value IsNot Nothing THEN
    sOut = sOut & " and OBJ_DETL IN ('" & Replace(Report.Parameters!OBJ_DETL.Value, ",","','") & "')"
    end if
    if Report.Parameters!APPN_SYMBOL.Value IsNot Nothing THEN
    sOut = sOut & " and APPN_SYMBOL IN ('" & Replace(Report.Parameters!APPN_SYMBOL.Value,",","','") & "')"
    end if
    if Report.Parameters!EA.Value IsNot Nothing THEN
    ' Gotta do some wizardry here in case the EA value contains EA SubJob or EA SubJob Description
    sOut = sOut & " and EA IN ('" & Replace(fStripEA(Report.Parameters!EA.Value),",","','") & "')"
    if InStr(1, Report.Parameters!EA.Value, " - ")>0 then
    ' parameter contains subjob, parse that out
    sOut = sOut & " and SUBJOB IN ('" & Replace(fStripSJ(Report.Parameters!EA.Value),",","','") & "')"
    end if
    end if
    if Report.Parameters!REL_EA.Value IsNot Nothing THEN
    sOut = sOut & " and REL_EA IN ('" & Replace(fStripEA(Report.Parameters!REL_EA.Value),",","','") & "')"
    if InStr(1, Report.Parameters!REL_EA.Value, " - ")>0 then
    ' parameter contains subjob, parse that out
    sOut = sOut & " and REL_SUBJOB IN ('" & Replace(fStripSJ(Report.Parameters!REL_EA.Value),",","','") & "')"
    end if
    end if
    if Report.Parameters!ACTIVITY.Value IsNot Nothing THEN
    sOut = sOut & " and ACTIVITY IN ('" & Replace(Report.Parameters!ACTIVITY.Value,",","','") & "')"
    end if
    if Report.Parameters!TRANS_CODE.Value IsNot Nothing THEN
    sOut = sOut & " and TRANS_CODE IN ('" & Replace(Report.Parameters!TRANS_CODE.Value,",","','") & "')"
    end if
    if Report.Parameters!FUND_NUMBER.Value IsNot Nothing THEN
    sOut = sOut & " and FUND_NUMBER IN ('" & Replace(Report.Parameters!FUND_NUMBER.Value,",","','") & "')"
    end if
    if Report.Parameters!FUND_DETAIL.Value IsNot Nothing THEN
    sOut = sOut & " and FUND_DETAIL IN ('" & Replace(Report.Parameters!FUND_DETAIL.Value,",","','") & "')"
    end if
    if Report.Parameters!FUND_SOURCE.Value IsNot Nothing THEN
    sOut = sOut & " and FUND_SOURCE IN ('" & Replace(Report.Parameters!FUND_SOURCE.Value,",","','") & "')"
    end if
    if Report.Parameters!FUND_TYPE.Value IsNot Nothing THEN
    sOut = sOut & " and FUND_TYPE IN ('" & Replace(Report.Parameters!FUND_TYPE.Value,",","','") & "')"
    end if
    sOut = sOut & " ORDER BY PROCESS_DATE DESC"
    return sOut
    End Function

  • GradeBook class

    I am creating a void method which accepts nams and grades from 1 to 20 students. The condition is that this should stop when the user is finished or when the array is full. I need to validate the grades to be only A, B, C, D, OR F
    When I made the condition it shows me an error:
    exception in thread "main" java.lang NullPointerException
    at GradeBook.input(GradeBook.java:29)
    at Program4.main(Program4.java:8)
    my methods is as follow:
    public void input()
    final String LIMIT = "QUIT";
    int index = 0;
    System.out.println("\nPlease enter grades and names (Enter QUIT to stop). ");
    System.out.println("\nStudent # " index " :");
    names[index] = Keyboard.readString();
    index++;
    while (!(names[index].equals(LIMIT)))
    count++;
    System.out.print("Exam Score: ");
    grades[index] = Keyboard.readChar();
    while((grades[index] < 'A') && (grades[index] > 'D')||(grades[index]!=('F')))
    System.out.println("\nINVALIDE GRADE. PLEASE REENTER. ");
    grades[index] = Keyboard.readChar();
    System.out.println("\nStudent # " index " : ");
    names[index] = Keyboard.readString();
    names[index] = names[index].toUpperCase();
    index++;
    Cold you help me to see the errors...?

    Hi
    Why do i get this error when trying to run a code like
    this:By 'run' I assume you mean you are entering a command like "java App" and you get the error. That's because the code you posted does not include a "public static void main(String[] args)" method. A class must contain this method to be launched as an application using the java command. The code you posted is an Applet, normally run using a web browser and HTML code.

  • Problem looping through recordset

    Hi,
    I am having a problem with the following code. In the test case, the recordset returns more than one record. Only one record is inserted, and the loop aborted after the insert. If I take out the insert statement the loop cycles through for every record. I do not believe there is anything wrong with the insert statement, as the first record is inserted. Any help would be appreciated.
      while(rs.next()){
                     System.out.println("test");
                     String equip = rs.getString("EQUIP");
                     String pm = rs.getString("PM");
                     String lim = rs.getString("LIMIT");
                     String item_val = rs.getString("ITEM_VALUE");
                     String source = rs.getString("SOURCE");
                     myStatement.executeQuery("INSERT INTO TESTTBL(ACTION,STATUS,TOOL,REMARK) VALUES('STACK VALIDATION','UPDATED', '" + equip + "','LIMIT: " + lim + " - VALUE: " + item_val + " SOURCE: " + source + "')");
                     System.out.println("INSERT INTO TESTTBL(ACTION,STATUS,TOOL,REMARK) VALUES('STACK VALIDATION','UPDATED', '" + equip + "','LIMIT: " + lim + " - VALUE: " + item_val + " SOURCE: " + source + "')");
                 }

    Did rs come from myStatement?
    From http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html :
    A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.
    You have to use two different statements: one for the rs that you're looping through and one for the insert that occurs while still using the first rs.

  • ConsumerFlowLimit set to 0 working incorrectly

    I've got a simple program which creates a queue and sets the consumerFlowLimit on that queue. Then it creates a producer for the queue which loads the queue with 10 messages. The payload of each message is the order it was created in. So the first message is a text message "1", the second message is a text message "2", etc.
    The program then creates two consumers. The first is called "c5" because it reads a single message, prints the message, then sleeps for 5 seconds. The second is named "c1" because it does the same, but sleeps for only one second.
    When I set consumerFlowLimit on the queue to -1 (unlimited) I get what I expect. The 10 messages get randomly "pre-assigned" to the queues, and I get output (something) like this:
    c1 read message: 2 Mon Jul 14 08:37:53 PDT 2008
    c5 read message: 1 Mon Jul 14 08:37:53 PDT 2008
    c1 read message: 5 Mon Jul 14 08:37:54 PDT 2008
    c1 read message: 7 Mon Jul 14 08:37:55 PDT 2008
    c1 read message: 9 Mon Jul 14 08:37:56 PDT 2008
    c5 read message: 3 Mon Jul 14 08:37:58 PDT 2008
    c5 read message: 4 Mon Jul 14 08:38:03 PDT 2008
    c5 read message: 6 Mon Jul 14 08:38:08 PDT 2008
    c5 read message: 8 Mon Jul 14 08:38:13 PDT 2008
    c5 read message: 10 Mon Jul 14 08:38:18 PDT 2008
    What I want, however, is for the messages to be pulled off and printed in order, from 1 to 10. So I don't want the broker pre-assigning any of the messages -- I want the messages assigned to consumers only when they ask for them. So, I set the consumerFlowLimit to 0. But the setting of 0 behaves exactly like it does for the setting of -1. I think this is a bug and want to know if I should enter it as such. I see the same behavior for both the 1.3 and 1.4 brokers.
    I do know that I'm successfully setting consumerFlowLimit, not only because I query and print it after I set it , but because when I set it to 1, it works as expected: only one message gets pre-assigned and output looks like this:
    c5 read message: 1 Mon Jul 14 09:12:32 PDT 2008
    c1 read message: 2 Mon Jul 14 09:12:32 PDT 2008
    c1 read message: 4 Mon Jul 14 09:12:33 PDT 2008
    c1 read message: 5 Mon Jul 14 09:12:34 PDT 2008
    c1 read message: 6 Mon Jul 14 09:12:35 PDT 2008
    c1 read message: 7 Mon Jul 14 09:12:36 PDT 2008
    c5 read message: 3 Mon Jul 14 09:12:37 PDT 2008
    c1 read message: 8 Mon Jul 14 09:12:37 PDT 2008
    c1 read message: 10 Mon Jul 14 09:12:38 PDT 2008
    c5 read message: 9 Mon Jul 14 09:12:42 PDT 2008
    Thanks if you can help.

    Challenge to Sun: Explain why there are no settings that allow this program to finish in 8 seconds every time it runs. 1 producer queues 10 messages. 2 consumers drain the queue. One sleeps 1 second after it dequeues a message, the other sleeps 5 seconds. Two messages should be dequeued at the 0 second marker and the 5 second marker, and one message at other second markers. 10 messages in 8 seconds. Should be easy, but openmq can't do it.
    Command line looks like this once you compile it:
    java -cp build\classes;lib\imqjmx.jar;lib\jms.jar;lib\imq.jar my.example.Flow 1 -1
    The parameters are for the consumerFlowLimit and maxNumActiveConsumers attributes. Set them any way you like. Nothing will get you to 8 seconds consistently.
    package my.example;
    import java.util.Date;
    import javax.jms.Connection;
    import javax.jms.DeliveryMode;
    import javax.jms.Destination;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import javax.management.Attribute;
    import javax.management.MBeanServerConnection;
    import javax.management.ObjectName;
    import javax.management.remote.JMXConnector;
    import com.sun.messaging.AdminConnectionFactory;
    import com.sun.messaging.ConnectionConfiguration;
    import com.sun.messaging.jms.management.server.DestinationAttributes;
    import com.sun.messaging.jms.management.server.DestinationType;
    import com.sun.messaging.jms.management.server.MQObjectName;
    public class Flow {
    private static com.sun.messaging.ConnectionFactory
    connectionFactory = new com.sun.messaging.ConnectionFactory();
    private String brokerName;
    private int brokerPort;
    private long flowLimit;
    private int activeConsumers;
    public Flow(String brokerName, int brokerPort, long flowLimit, int activeConsumers) {
    this.brokerName = brokerName;
    this.brokerPort = brokerPort;
    this.flowLimit = flowLimit;
    this.activeConsumers = activeConsumers;
    public void start() {
    try {
    connectionFactory.setProperty(ConnectionConfiguration.imqAddressList,
    this.brokerName + ":" + this.brokerPort);
    Connection connection = connectionFactory.createConnection();
    connection.start();
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    String queueName = "myQueue";
    Destination myQueue = session.createQueue(queueName);
    MessageProducer producer = session.createProducer(myQueue);
    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    AdminConnectionFactory acf = new AdminConnectionFactory();
    JMXConnector jmxc = acf.createConnection("admin", "admin");
    MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
    ObjectName destConfigName = MQObjectName.createDestinationConfig(DestinationType.QUEUE, queueName);
    Attribute attr = new Attribute(DestinationAttributes.CONSUMER_FLOW_LIMIT, flowLimit);
    mbsc.setAttribute(destConfigName, attr);
    attr = new Attribute(DestinationAttributes.MAX_NUM_ACTIVE_CONSUMERS, activeConsumers);
    mbsc.setAttribute(destConfigName, attr);
    Long longAttrValue = (Long)mbsc.getAttribute(destConfigName, DestinationAttributes.CONSUMER_FLOW_LIMIT);
    Integer attrValue = (Integer)mbsc.getAttribute(destConfigName, DestinationAttributes.MAX_NUM_ACTIVE_CONSUMERS);
    jmxc.close();
    System.out.println( "consumerFlowLimit: " + longAttrValue );
    System.out.println( "maxNumActiveConsumers: " + attrValue);
    // Pre-load the queue with 10 messages numbered from 1 to 10
    for (int i = 1; i <= 10; i++) {
    TextMessage message = session.createTextMessage();
    message.setText(String.valueOf(i));
    producer.send(message);
    System.out.println("");
    // Kick off two consumers
    new Thread(new Consumer("c5", 5)).start();
    new Thread(new Consumer("c1", 1)).start();
    } catch (Exception e) {
    System.out.println( "Exception occurred: " + e);
    public static void main(String[] args) {
    String limit = "1";
    String activeConsumers = "-1";
    if (args.length > 0) {
    limit = args[0];
    if (args.length > 1) {
    activeConsumers = args[1];
    Flow flow = new Flow("localhost", 7676, Long.parseLong(limit), Integer.parseInt(activeConsumers));
    flow.start();
    class Consumer implements Runnable {
    private String name;
    private int sleepSeconds;
    public Consumer(String name, int sleepSeconds) {
    this.name = name;
    this.sleepSeconds = sleepSeconds;
    public void run() {
    try {
    String queueName = "myQueue";
    Connection connection = connectionFactory.createConnection();
    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    Destination myQueue = session.createQueue(queueName);
    MessageConsumer consumer = session.createConsumer(myQueue);
    connection.start();
    while (true) {
    TextMessage message = (TextMessage) consumer.receive();
    System.out.println(this.name + " read message: " + message.getText() + "\t" + (new Date()));
    Thread.sleep(sleepSeconds * 1000);
    } catch (Exception e) {
    System.out.println("Exception occurred: " + e);
    }

Maybe you are looking for