Total incorrect when trying to summarize using a variable

I have a report with two subreports that summarize labor cost and material cost.  I need to return the material cost total to the main report so I created a shared variable.  The correct value is returned each time I display this variable in the main report.  Now I need to display a group total of the material cost and summarize the formula field that uses this variable.  The formula for displaying the variable with the value set in the subreport is {@MatSubTotal}:
Shared NumberVar myTotal;
myTotal;
This field on my report is correct.  I created a second variable call SumTotal which I set to 0 in my group header.  Then after the formula field listed above, I added a new formula: (I left it in the details section until I knew it was working correctly and then I plan to just display the total in the group footer)
WhilePrintingRecords;
Shared NumberVar SumTotal;
SumTotal := SumTotal + {@MatSubTotal};
Here is where I run into problems.  The first time my subreport displays, the group total is correct, but then the material subreport is supressed and {@MatSubTotal} is 0, but my group total adds the previous value so now the amount is double what it should be.  From here on out, the group total is calculated correctly even when the material subreport is supressed and returns 0.  Just that one time the SumTotal adds the previous value when it should be adding 0 and the whole total is off.  Any suggestions?  Also, my report has three groupings so do I need three separate variables to track the material total for the group?  Just trying to figure out the best way to summarize the variable I'm returning from the subreport.  Thanks

Thank you everyone for the help.  I thought I'd found it with this last suggestion--there is a condition on the details section that I wasn't aware of:
not({workorder.actmatcost}+{workorder.actlabcost}>0)
However, I copied the same condition to my formula, but I still get the same result.
iif(({workorder.actmatcost}+{workorder.actlabcost}>0),SumTotal := SumTotal +1,SumTotal); 
It definitely seems like the formula is being incremented when I can't see it on the report, but the only conditions I can find all have to do with the material cost being zero anyway so it shouldn't matter if that was added to my total.  I just can't figure out how the previous value is added more than once.  I swear once I figure out what the cause is, it will seem like such a simple fix, but I've tried so many things so far with no luck!?!
There's also a condition to suppress the material subreport (within the Details section)
isnull ({matusetrans.wonum})
but I can't try that on the main report since it doesn't use that table.  And that condition is equal to the one above anyway in terms of the data from the two different tables.  Maybe at this point I should just try rewriting the report since I'm not familiar with exactly how it was created in the first place.

Similar Messages

  • Why is it saying my password is incorrect when trying to download adobe flash?

    why is it saying my password is incorrect when trying to download adobe flash?

    Hi,
    I assume you are trying to update Flash Player on a Mac machine. If so, please use your Mac system ID and password and not the Apple ID (used for purchases on Apple Store) or any Adobe related ID.
    Hope this solves your problem.
    With regards,
    Prabhu

  • For some reason the "Basic" tab is missing in my Develop folder when trying to edit using LR5..? Plz Help

    For some reason the "Basic" tab is missing in my Develop folder when trying to edit using LR5..? Plz Help

    Right-click (Mac Cmd-click) on another panel header such as "Tone Curve". Make sure there is a checkmark for Basic as was all other panel sections that you want displayed.

  • Able to install the .ipa signed with distribution certificate using iTunes on MacBook Pro. where as the when tried to install using iTune on PC is causing a problem

    Able to install the .ipa signed with distribution certificate using iTunes on MacBook Pro. where as the when tried to install using iTune on PC is causing a problem

    The sound input going to the mic is not going to pipe through the speakers like that.  It doesn't do it because it would cause a feedback loop on itself.  The mic input will take sound and output it to a program or to another pathway (like a VoIP or Facetime call, etc.) but it won't behave like a Karaoke machine if that's what you're thinking.

  • Nasty feedback when trying to record using the internal mic

    I get nasty feedback when trying to record using the internal mic on my macbook. I'm running Maverick. Why is this happening?

    Note: there may be other issues involved, but without further details I can only suggest that using headphones is the best way to accurately hear what you're recording, adjust gain levels, and avoid feedback. So this should be the first thing to try as you troubleshoot.

  • Why does iOS 5.0.1 always say, my iCloud Password is incorrect, when i try to use my iCloud email account?

    Why does iOS 5.0.1 always say, my iCloud Password is incorrect, when i try to use my iCloud email account?
    Btw: The password works in all other issues.

    I GOT IT !
    JUST BE SURE UR DESCRIPTION IS NOT (f.E.) iCloud OR SO ON.
    THE DESCRIPTION MUST BE JUST LIKE UR EMAIL NAME !!!
    IF U GOT "[email protected]" => UR DESCRPTION MUST READ "MY-NAME"
    This is how it worked for me, so ...
    ... just hope it help´s
    greez

  • Error Message: "The parameter is incorrect" when trying to modify SSLs

    Like I wrote in my subject line, RoboHelp pop-ups the error message “The Parameter is incorrect” when I try to modify any SSL.
    What happens next, is that the “Print Document General” window opens, but does not allow me to select anything (the fields are blank).
    If I close the window and open it again, it seems to work until I have to select the styles from our Microsoft Word Template.
    Then the error message “The parameter is incorrect” appears again, and RoboHelp does not allow me to select anything but a stylesheet
    (which is not what I need).
    This is very strange, because not only  until recently I was able to build Word documents and PDFs, but also my colleagues are able to
    produce them out of my source.
    Even the old projects, that I was able to build, now I cannot.
    I do not have any problem in generating CHMs.
    Until now I have tried everything I found in the forum:
    I deleted the PSS file (also following the advice in your snippet number 14 from 10 – RoboHelp HTML –Features and Use).
    http://forums.adobe.com/thread/120022
    I reinstalled RoboHelp and the Adobe Technical Communication Suite (I also used CCleaner to delete the registries).
    http://forums.adobe.com/thread/598335
    I gave Administrator rights to all users in my computer (what seemed to work for some SSLs, but not for all)
    http://forums.adobe.com/thread/870339
    I am also looking at all programs that I installed since the last time I was able to build .docs in case there is a conflict, but I do not find anything!
    My computer has Windows 7 installed and I use the Adobe Technical Communication Suite 3.5, with RoboHelp 9.
    My Microsoft Office is 2010.
    Can somebody please help me? Did someone have the same problem?
    Thanks in advance.

    Hi there
    I know you said you reinstalled, but did you reinstall before or after you gave administrator rights to all users on your computer? And how many users *ARE* on your computer?
    Often you need administrator rights to properly install things.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Problem when trying to convert using PDFG

    Hi,
    I'm trying to convert come files using PDFG. I tried the user console, the email account and the WebService API. None of this options worked.
    I can see in the log file that JBOSS is launched successfully, with every BMC being started without any error. The only problem that i have is taht QuartzService error but the Adobe support already told me that this was not a problem.
    When trying to submit a document for conversion, the log files registered the errors below. does anyone has some clue on this problem ?
    TIA,
    [code]
    2007-04-02 17:34:24,332 INFO [com.adobe.native2pdf.internal.DequeueBean] Retry enabled for Native conversion
    2007-04-02 17:34:24,348 INFO [com.adobe.native2pdf.internal.AESEngineBean] AES_1001: Begin processing job c27e1f-6c2951-465685-a7364b-845e2f-7ae0a1
    2007-04-02 17:34:24,566 INFO [com.adobe.service.ProcessResource] BMC505: Service WordConverterService: Starting native process with command line "C:\\Adobe\\LiveCycle\\jboss\\server\\all\\svcnative\\WordConverterService\\bin\\dll\\pdf gen.exe" PDF-WO3ff760003 -beginExecutable "C:\\Adobe\\LiveCycle\\jboss\\j2re1.4.2_04_compiler\\bin\\javaw.exe" -endExecutable -Xmx20m -cp "C:/Adobe/LiveCycle/jboss/server/all/svcnative/WordConverterService/bin/aaes-idl-bmc.jar; C:/Adobe/LiveCycle/jboss/server/all/svcnative/WordConverterService/bin/aaes-jaxb.jar;C:/Ad obe/LiveCycle/jboss/server/all/svcnative/WordConverterService/bin/adobe-bslj.jar;C:/Adobe/ LiveCycle/jboss/server/all/svcnative/WordConverterService/bin/AdobeCSA.jar;C:/Adobe/LiveCy cle/jboss/server/all/svcnative/WordConverterService/bin/AdobeCSAUtils.jar;C:/Adobe/LiveCyc le/jboss/server/all/svcnative/WordConverterService/bin/appmon.jar;C:/Adobe/LiveCycle/jboss /server/all/svcnative/WordConverterService/bin/commonbmc.jar;C:/Adobe/LiveCycle/jboss/serv er/all/svcnative/WordConverterService/bin/jaxb-api.jar;C:/Adobe/LiveCycle/jboss/server/all /svcnative/WordConverterService/bin/jaxb-impl.jar;C:/Adobe/LiveCycle/jboss/server/all/svcn ative/WordConverterService/bin/jaxb-libs.jar;C:/Adobe/LiveCycle/jboss/server/all/svcnative /WordConverterService/bin/jniw2.9.5_pdfmapi1.0.jar;C:/Adobe/LiveCycle/jboss/server/all/svc native/WordConverterService/bin/jniw2.9.5_word8.1.jar;C:/Adobe/LiveCycle/jboss/server/all/ svcnative/WordConverterService/bin/jniwrap-2.9.6.241.jar;C:/Adobe/LiveCycle/jboss/server/a ll/svcnative/WordConverterService/bin/namespace.jar;C:/Adobe/LiveCycle/jboss/server/all/sv cnative/WordConverterService/bin/winpack.jar;C:/Adobe/LiveCycle/jboss/server/all/svcnative /WordConverterService/bin/WordConverterServer.jar;C:/Adobe/LiveCycle/jboss/server/all/svcn ative/ServicesNatives2/jars/adobe-bslj.jar;C:/Adobe/LiveCycle/jboss/server/all/svcnative/S ervicesNatives2/jars/jacorb.jar" com.adobe.native2pdf.bmc.WordConverterServer -IOR IOR:000000000000002249444C3A636F6D2F61646F62652F736572766963652F4D616E616765723A312E30000 000000000020000000000000068000102000000000E3139322E3136382E31302E3130000DC8000000134A426F7 3732F42522D312F010000000000000000000000020000000000000008000000004A414300000000010000001C0 0000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000 000010000001C00000000000100010000000105010001000101090000000105010001 -AppServer jboss
    2007-04-02 17:34:24,676 INFO [STDOUT] Command line '"C:\Adobe\LiveCycle\jboss\j2re1.4.2_04_compiler\bin\javaw.exe"'
    2007-04-02 17:34:27,222 INFO [STDOUT] myOwnProcesses found 2
    2007-04-02 17:34:27,925 INFO [STDOUT] com.adobe.native2pdf.bmc.ConvertWord starting run()
    2007-04-02 17:34:28,315 INFO [STDOUT] com.adobe.native2pdf.bmc.ConvertWord calling execute
    Processing document 'C:\Documents and Settings\build_user\Local Settings\Temp\pdfg-build_user\c2\7e1f-6c2951-465685-a7364b-845e2f-7ae0a1\New Text Document.txt'
    2007-04-02 17:34:30,034 INFO [STDOUT] COM PID appears to be 5216
    2007-04-02 17:34:31,846 INFO [STDOUT] Running Word version 11.0
    2007-04-02 17:34:31,971 INFO [STDOUT] ConversionInterface returned status -2147467259

    Following the exception stack :
    Got default parameter bits 1c80017
    ConversionInterface returned status 0
    Read-Back ConversionInterface returned status 0, bits 1c00017
    JobOptions from file null
    2007-04-02 17:34:34,360 INFO [STDOUT] Working on doc New Text Document.txt
    2007-04-02 17:34:34,439 INFO [STDOUT] com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80004005; E_FAIL (Unspecified error)
    2007-04-02 17:34:34,439 INFO [STDOUT]
    at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:624)
    at com.adobe.native2pdf.internal.wrap.acrobat7.pdfmakerapilib.impl.IPDFMakerDriverImpl.execP DFMaker(IPDFMakerDriverImpl.java:94)
    at com.adobe.native2pdf.bmc.ConvertBasePDFM.execPDFMaker(ConvertBasePDFM.java:438)
    at com.adobe.native2pdf.bmc.ConvertWord.convertViaPDFMaker(ConvertWord.java:179)
    at com.adobe.native2pdf.bmc.ConvertWord.execute(ConvertWord.java:66)
    at com.adobe.native2pdf.bmc.ConvertBase.run(Con
    2007-04-02 17:34:34,439 INFO [STDOUT] vertBase.java:82)
    2007-04-02 17:34:34,439 INFO [STDOUT] at java.lang.Thread.run(Unknown Source)
    2007-04-02 17:34:35,266 INFO [STDOUT] Sleeping before oleUninitialize
    2007-04-02 17:34:36,266 INFO [STDOUT] Calling oleUninitialize
    2007-04-02 17:34:36,282 INFO [STDOUT] Calling getProcessIdsByNonDefaultWindowStation()
    getProcessIdsByNonDefaultWindowStation() found 0
    2007-04-02 17:34:36,860 INFO [com.adobe.native2pdf.internal.AESEngineBean] AES_1002: Done processing job c27e1f-6c2951-465685-a7364b-845e2f-7ae0a1
    2007-04-02 17:34:36,860 INFO [STDOUT] com.adobe.native2pdf.bmc.ConvertWord shutdown JniWrapper
    2007-04-02 17:34:36,875 INFO [com.adobe.native2pdf.internal.DequeueBean] Message queued again into job queue
    2007-04-02 17:34:36,875 INFO [com.adobe.native2pdf.internal.AESEngineBean] AES_1001: Begin processing job c27e1f-6c2951-465685-a7364b-845e2f-7ae0a1
    2007-04-02 17:34:37,094 INFO [STDOUT] com.adobe.native2pdf.bmc.ConvertWord starting run()
    com.adobe.native2pdf.bmc.ConvertWord calling execute
    Processing document 'C:\Documents and Settings\build_user\Local Settings\Temp\pdfg-build_user\c2\7e1f-6c2951-465685-a7364b-845e2f-7ae0a1\New Text Document.txt'
    2007-04-02 17:34:37,297 INFO [STDOUT] COM PID appears to be 960
    2007-04-02 17:34:37,969 INFO [STDOUT] Running Word version 11.0
    2007-04-02 17:34:37,984 INFO [STDOUT] ConversionInterface returned status -2147467259
    Got default parameter bits 1c80017
    [/code]

  • When trying to update using help in LR from "Help" menue  a dialogue box appears saying not possible as it does not have a programme associated with it

    When trying to download latest version of software fro "Help" menue. a box appears saying there isn't a programme associated with so the action cannot be completed. please install a programme in the Default Programmes Control panel.

    Hello jaybearden,
    Thanks for the question. After reviewing your post, it sounds like you are not able to restore the iOS device since you get an error 9. I would recommend that you read this article, it may be able to help the issue.
    Resolve iOS update and restore errors - Apple Support
    Check your security software
    Related errors: 2, 4, 6, 9, 1000, 1611, 9006. Sometimes security software can prevent your device from communicating with either the Apple update server or with your device.
    Check your security software and settings to make sure that they aren't preventing a connection to the Apple servers.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • My iPad keeps telling me my apple id is incorrect when trying to activate my iMessage

    My iPad wasn't sending iMessages while connected to wifi so I restarted my device and went to try to get back into my iMessage. My iPad is telling me I need to log back in but tells me my apple ID is incorrect when it works for everything else. I do know there is an ongoing issue with iMessage as my iPhone wont activate either, I don't know what else to do! Do I need to take my iPad and my phone into the apple store?

    Seems to be an iMessage issue. I'm having the same issue. It was working fine earlier.

  • My iPhone 4s keeps telling me my password is incorrect when I try to use the app store, but it's definitely NOT incorrect.

    When I try to update apps in the app store from my iPhone 4s, it says the password is incorrect. I'm positive it's correct. I even went through yesterday and changed my passwords just in case (I have two apple ids - they now both have the exact same password.) I was able to go to the app store yesterday and download an app using that password, but then tried to update some apps and it says the password is incorrect - and it's said that ever since. I can go to settings and log into the store with the password - view my cc info, etc. So it's definitely correct. Heck, I can even log into this forum with that password - so it's definitely the right one. What can I do?

    Okay - tried that and it didn't work either. HOWEVER ...
    I SEEM TO HAVE FOUND THE ISSUE! If this happens to anyone else, this might help you ...
    A while back I had to set up a second apple ID in order to use the iCloud. So now I have two (annoying), and from what I'm reading on forums, this has happened to many people and you still can't merge accounts. But I digress.
    Apparently the apps in question were purchased on one apple ID, but the phone had the other apple ID set within the app store. The store, it seems, will only update the apps if you're logged in as the account that initially purchased the apps. So it means going to Settings > Store > Log out, then log back in with the other ID. Annoying. But at least I know, now, what's going on.
    The password, it seems, was right all along (since I have the same password for both IDs). Too bad the phone's error message told me the password was incorrect, instead of saying something more useful like "This apple ID is not authorized to update this app." Or ... something like that. Apparently I've been chasing down the wrong solution due to the wrong error message being given.

  • Error 101 when trying to download using the Adobe Download Assistant

    What the F__K, I reisntalled windows 7, second time the same **** happen at the end, I m using a Data plan which allow me to D/L 8 GB  max in one month , this happened thrice with me , this time i downloaded in my D Drive 22.7 GB of free space remaining after complete D/l , and in C Drive I ve 50 GB free space , Operating System is now Windows 8 Preview , Last two times it was on Windows 7 Ultimate, Stilll having the same Downloader is really a super slow SICK I ever experienced.. Kindly look into the matter and resolve the issue with genuine REASONS , as i already seen and read all the Forums and post regarding to this problem

    These are the errors coming while I'm trying to extract the CS6 , but these error wont come while extractice indicisuals set ups of Photoshop, Dreamweaver and Flash.. so  I think the problem is in CS 6 Setup, I already mentioned that I try all the thing that u have told about user permissions, I never change the permission in case while I am extracting PS, DW and Flash, so why I need to provide permission in CS 6 ??? although all permission are set to FULL CONTROL still unable to extract in any version of Windows, Also the problem is  when now I am trying to Download the file again from direct link this message is coming :
    Access Denied
    You don't have permission to access "http://trials2.adobe.com/AdobeProducts/FLBR/4_6/win32/FlashBuilder_4_6_LS10.exe?" on this server. 
    Reference #18.244b3917.1347607523.5b70ac7c
    Can some real Adobe professional help me out on this problem ??? Except Mr. Jeff A Wright , as I am sick of his useless solutions

  • "Side-by-side configuration is incorrect" when trying to install MS DirSync tool

    Apologies if this is the wrong thread, but it seems like every thread is the wrong thread for this one :)  Yes, I've checked all the other "side-by-side configuration" threads, but none of them seems to apply to this case.
    I have a SBS 2012 machine, acting as DC, AD DS and DNS, and our organization has recently signed up for Office 365 Online E1, and we've migrated our mail there.  Everything is set up, but now I'd like to sync our AD with MS Online.  I enabled directory
    sync in the admin user and group controls on the Office 365 site and as per instructions, I downloaded the latest version of DirSync from here:http://social.technet.microsoft.com/wiki/contents/articles/18429.microsoft-azure-active-directory-sync-tool-version-release-history.aspx.
    However, when I try to install it on the server, I get this error message:  "The application has failed to start because its side-by-side configuration is incorrect. Please run sxtrace or see the application event log for more detail."
    Sxtrace gives the following results:
    =================
    Begin Activation Context Generation.
    Input Parameter:
    Flags = 0
    ProcessorArchitecture = AMD64
    CultureFallBacks = en-US;en
    ManifestPath = N:\temp\dirsync.exe
    AssemblyDirectory = N:\temp\
    Application Config File = 
    INFO: Parsing Manifest File N:\temp\dirsync.exe.
    INFO: Manifest Definition Identity is (null).
    ERROR: Line 0: XML Syntax error.
    ERROR: Activation Context generation failed.
    End Activation Context Generation.
    Things I've tried:
    Other posts seem to indicate that it's often an issue with missing visual C++ libraries, but I installed both the 2008 and 2010 C redistributables for x86 and x64, and nothing has changed.  
    One solution for a similar message had a typographical error in an xml configuration file, however in this case the "Application config file" field is blank.  
    As several other (non TN threads) around the 'net recommend, I ran SFC.  It appears to work for others with the same error message.  It fixed some issues and spit out a huge log file, but the problem persists, and I don't know where in the log
    file to look, assuming anything in there is relevant (the file is over 700kb, so I'm not going to start spamming big chunks of it just yet unless I know what to look for).
    The problem seems to come up in the context of software development (another thread on this subject is about the user developing an application from scratch) but I have no background in software dev, and this is supposed to be an official tool from Microsoft,
    for crying out loud, not some homebrew thing I'm putting together.  
    This one issue is keeping us from moving ahead with our entire plan for user access, so any help would be
    much appreciated. Thanks!!!

    Hi AGrush,
    Based on your description, did you mean that attempt to install Microsoft Azure Active Directory Sync tool
    on Windows Server 2012 Essentials?
    The Azure Active Directory Sync tool should be installed on a computer which isn't a domain controller. For
    more details, please refer to the System requirements in the following KB.
    How to troubleshoot Azure Active Directory Sync tool installation
    and Configuration Wizard error messages
    In addition, I’m a little confused that why install DirSync (That is what the Windows Server Essentials Office
    365 integration is for) on Windows Server 2012 Eseentails.
    Manage Office 365 in Windows Server Essentials
    If anything I misunderstand or any update, please don’t hesitate to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

  • Error 9672 when trying to print using airport extreme

    I have just purchased a new imac running os x 10.5.1 and an airport extreme base station. I have a canon pixma mp530 printer and have on occasions successfully printed using the printer with the airport extreme but it has been inconsistent and I have never been able to locate the printer drivers in the utilities folder. So I thought I would download the latest drivers located in the canon website claiming that they were os x 10.5.1 compatible. Now I am unable to add the printer to my printer list in the finder as I get a 9672 error message and my screen freezes and I still have no printer in the utility folder. I have a ibook running tiger and the printer when connected to both the ibook and the imac using a firewire works perfectly. Has anyone else had these problems using a printer wirelessly or is there something I am missing. The internet works with base station with no problems.

    Despite being a total newbie, I good the damned thing to work--At least for now.
    I first unplugged the airport and then the printer. Plugged them both back in and then went to Canon's site to redownload the drivers. Restarted the Macbook pro and to my astonishment it worked. Again, at least for now.....

  • AES Algorithm error when trying to encrypt using stored Java class.

    Dear All,
    We have a specific reuirement where in we cannot use DBMS_CRYPTO package to encrypt/decrypt data using AES Algorithm
    So I am trying to use a stored Java class and I am getting "AES algorithm not available".
    I am using Oracle 10gR2 standard edition.
    Below is my code
    1. Stored Java class
    2. Stored function to access the above Java class.
    3. Test anonymus PL/SQL to test above code.
    Please help me finding the problem why I am getting "AES algorithm not available" error when I call stored Java class in Oracle.?
    **** If I use "DES" algorithm, it works. Also the Java code works well if I execute it as normal Java class from Eclipse.
    I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
    The jre version in Oracle is 1.4.2.
    I appreciate your help.
    Thanks,
    Priyanka
    Step1: Stored java class to encrypt and decrypt data
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "EncryptUtil" AS
    import java.security.Key;
    import javax.crypto.Cipher;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.spec.SecretKeySpec;
    public class EncryptUtil
         public static String encrypt(String inStr)
         String outStr = "Test data 123";
    try
    KeyGenerator kgen = KeyGenerator.getInstance("AES");
    kgen.init(128);
    SecretKey skey = kgen.generateKey();
    byte[] raw = skey.getEncoded();
    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
    Cipher cipher = Cipher.getInstance("AES");
    cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
    byte[] encrypted =
    cipher.doFinal(inStr.getBytes());
    outStr =new String(encrypted);
    catch (Exception e)
         outStr = outStr + "exception thrown::" + e.getMessage();
    e.printStackTrace();
    return outStr;
    Step2: Stored function to access above stored java class.
    CREATE OR REPLACE FUNCTION SF_ENCRYPTUTIL(
    pKey1 VARCHAR2
    ) RETURN VARCHAR2 AS
    LANGUAGE JAVA NAME 'EncryptUtil.encrypt(java.lang.String ) return java.lang.String';
    Step3: Test encryption and descryption
    DECLARE
    outstr VARCHAR2(2000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE('outstr-->' || SF_ENCRYPTUTIL('12345'));
    END;
    Below code example using DBMS_CRYPTO. This works, but we do not want to use this.
    declare
    l_in_val varchar2(2000) := 'Test data 123';
    l_mod number := dbms_crypto.ENCRYPT_AES128
    + dbms_crypto.CHAIN_CBC
    + dbms_crypto.PAD_PKCS5;
    l_enc raw (2000);
    l_enc_key raw (2000);
    l_dec raw (2000);
    begin
    l_enc := dbms_crypto.encrypt
    UTL_I18N.STRING_TO_RAW (l_in_val, 'AL32UTF8'),
    l_mod,
    HEXTORAW('156ae12300ccfbeb48e43aa016febb36'),
    HEXTORAW('001122230405060708090a0b0c0d0e0f')
    dbms_output.put_line ('Encrypted='||l_enc);
    end;
    Edited by: user5092433 on Sep 10, 2009 12:26 AM

    I guess I'd be a bit curious about why you can't use a DBMS_CRYPTO solution that provides identical output. It seems odd to want to have a procedure running inside Oracle and then dictate that it has to be Java and not PL/SQL...
    I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
    The jre version in Oracle is 1.4.2.Which java.security file are you talking about? The JVM that is inside the Oracle database does not and can not use configuration files that are outside the database. I suspect when you talk about files and paths that you're looking at a JVM outside the database, which is not the JVM that your Java stored procedure would be using.
    Looking at the error, my assumption is that some JAR file needs to be loaded into the internal JVM in order for the AES algorithm to be available. But I'm unfortunately not familiar enough with these classes to say what that would be.
    Justin

Maybe you are looking for