Report spontaneously stops working

I mentioned in yesterday's post that I cleared an error by re-implementing the page from scratch with the same SQL. The error has recurred, so I'm thinking now that I must be overrunning an internal buffer somewhere. Page 1 is my query-by-example form. Page 2 (duplicated on page 10) is the report of patients found by filling in the query by example form.
The symptoms are that the number of rows returned (on page 2 yesterday and page 10 today) is -175. Depending on the pagination scheme used this shows up differently, but obviously a negative number of rows means that nothing good can subsequently happen. The headers show up but no rows are displayed.
I have tried for several hours to figure out the reproduction conditions but with no real luck. The most recent time it happened when I used the tab to navigate back to the report page, but I checked the session variables and all Page 1 variables referenced in the report are still correctly set. Besides, page 2 ran the identical query successfully.
The condition seems to spontaneously clear itself after a while -- the original page that was broken yesterday (p2) is now working while the re-implementation (p10) is currently broken. Also when you log in as a different workspace user, the both pages work correctly.
Is anyone able to play "spot the bug" on the following. This is the report SQL used on pages 2 and 10:
declare
    conj VARCHAR2(5) := ' AND ';
    qSelect LONG;
    codeFound char(1);
    qFrom LONG;
    qWhere LONG;
    query LONG;
    codeClause LONG;
    codeConj varchar2(10);
  BEGIN
    qSelect := 'SELECT pat.patient_id id_v, pat.patient_id id2, mrn mrn, first_name "first name", last_name "last name", ergn "ERG #", birthdate, creation_date ';
    qFrom := 'FROM patient pat';
    qWhere:= ' WHERE visible =''Y''';
    IF :P1_PATIENT_TYPE != '-' THEN
      qWhere:= qWhere || ' and dx = '''||:P1_PATIENT_TYPE||'''';
    END IF;
    IF :P1_FIRST_NAME is not null THEN
      query := query||conj||'upper(FIRST_NAME) like upper('''||:P1_FIRST_NAME||'%'')';
    END IF;
    IF :P1_LAST_NAME is not null THEN
      query := query||conj|| 'upper(LAST_NAME) like upper('''||:P1_LAST_NAME||'%'')';
    END IF;
    IF :P1_MRN is not null THEN
      query := query||conj|| 'upper(MRN) = upper('''||:P1_MRN||''')';
    END IF;
    IF :P1_ERGN is not null THEN
      query := query||conj|| 'upper(ERGN) =upper('''||:P1_ERGN||''')';
    END IF;
    IF :P1_AGE_START IS NOT NULL THEN
      query := query||conj|| 'trunc( months_between( sysdate, birthdate ) /12 ) >= '||:P1_AGE_START;
    END IF;
    IF :P1_AGE_END IS NOT NULL THEN
      query := query||conj|| 'trunc( months_between( sysdate, birthdate ) /12 ) <= '||:P1_AGE_END;
    END IF;
    IF :P1_AGE_DX_START IS NOT NULL THEN
      query := query||conj|| 'trunc( months_between( creation_date, birthdate ) /12 ) >= '||:P1_AGE_DX_START;
    END IF;
    IF :P1_AGE_DX_END IS NOT NULL THEN
      query := query||conj|| 'trunc( months_between( creation_date, birthdate ) /12 ) <= '||:P1_AGE_DX_END;
    END IF;
    IF :P1_DX_START IS NOT NULL THEN
     query := query||conj||'creation_date >= to_date('''||:P1_DX_START||''',''MM/DD/YYYY'')';
    END IF;
    IF :P1_DX_END IS NOT NULL THEN
     query := query||conj||'creation_date <= to_date('''||:P1_DX_END||''',''MM/DD/YYYY'')';
    END IF;
    IF :P1_4D_CODE1 IS NOT NULL THEN
      codeFound := 'T';
      qFrom := qFrom || ', DX_4D_CODE dx1';
      qWhere := qWhere || conj ||' dx1.patient_Id = pat.patient_Id';
      codeClause := codeClause || codeConj ||' dx1.code= '||:P1_4D_CODE1;
      codeConj := ' '||:P1_4D_AND_OR;
    END IF;
    IF :P1_4D_CODE2 IS NOT NULL THEN
      codeFound := 'T';
      qFrom := qFrom || ', DX_4D_CODE dx2';
      qWhere := qWhere || conj ||' dx2.patient_Id = pat.patient_Id';
      codeClause := codeClause || codeConj ||' dx2.code= '||:P1_4D_CODE2;
      codeConj := ' '||:P1_4D_AND_OR;
    END IF;
    IF :P1_4D_CODE3 IS NOT NULL THEN
      codeFound := 'T';
      qFrom := qFrom || ', DX_4D_CODE dx3';
      qWhere := qWhere || conj ||' dx3.patient_Id = pat.patient_Id';
      codeClause := codeClause || codeConj ||' dx3.code= '||:P1_4D_CODE3;
      codeConj := ' '||:P1_4D_AND_OR;
    END IF;
    IF :P1_4D_CODE4 IS NOT NULL THEN
      codeFound := 'T';
      qFrom := qFrom || ', DX_4D_CODE dx4';
      qWhere := qWhere || conj ||' dx4.patient_Id = pat.patient_Id';
      codeClause := codeClause || codeConj ||' dx4.code= '||:P1_4D_CODE4;
    END IF;
    IF codeFound = 'T' THEN
      query := query||' and ('||codeClause||')';
    END IF;
    return qSelect||qFrom ||qWhere||' '||query;
end;The SQL that is generated is quite vanilla, so I'm thinking it's the process of generating the query that's the issue. Any idea what might be happening here? It's just a matter of time before the users trigger this.
Thanks in advance,
Susan

Susan,
I don't have a clue what would result in a negative row count. Maybe Marc will weigh in on this. I will offer three general suggestions that might be better than nothing:
1. Replace all your LONGs with varchar2(32767). Just in case.
2. Add reset pagination processes for these reports wherever you can. Not sure exactly how to tell you to do that, but there are lots of examples. Perhaps you already do that.
3. Fix your SQL so that it uses bind variables. The way I read your code, you'll end up with distinct SQL statements that will have to be parsed for each invocation of the report where some data (like P1_FIRST_NAME) has changed. This is a fast way to trash the shared pool and slow down your database. The returned value from your function should have as many bind variables in it as possible.
Scott

Similar Messages

  • Crystal Reports XI  stopped working error message on a Windows Server 2008

    We recently installed Crystal Report XI  in a Windows Server 2008 environment. After completed the installation as the Administrator every time that we try to execute Crystal we receive the following error message:
    "Crystal Reports has stopped working"
    Problem signature:
    Problem Event Name: BEX
    Application Name: crw32.exe
    Application Version: 11.0.0.1282
    Application Timestamp: 422d5c77
    Fault Module Name: StackHash_1fc1
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Offset: 7ef2fbfc
    Exception Code: c0000005
    Exception Data: 00000008
    OS Version: 6.1.7600.2.0.0.272.7
    Locale ID: 1033
    Additional Information 1: 1fc1
    Additional Information 2: 1fc163a1c57ae45571bce37d539b233f
    Additional Information 3: 2f92
    Additional Information 4: 2f92817e9e63d4100e2aa48e72910a78
    Any recommendation on what is causing this error?
    Thanks,
    Luis

    Hi, did you get this working? I'm really struggling to get up and running on 2008 R2, the CMS service just refuses to connect to the database. It also looks like the database wasn't created properly during the install. I set it up on an MSDE database, and when I look at it with sql management studio the database is there but there aren't any tables or anything else
    Can anyone either confirm or deny that its possible to run Crystal XI on 2008 R2?
    The error I'm getting when trying to start the service is:
    The root server reported an error Initialization Failure. (Reason: Unable to connect to the database using the provided connection string. Reason: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified).
    I've confirmed that the ODBC connections work (both 32 bit and 64 bit) via the built in test, but Crystal for some reason isn't happy

  • My audio spontaneously stopped working

    Hey everyone,
    I've been recently editing together a feature film and had several different timeline sequences for different scenes (one had scenes 1-9, another 10-14, etc.) I opted to combine two sequences as they were just about locked and copy/pasted one sequence and all it's contents into another. Worked just fine every other time I did it but for whatever reason, one particular set of scenes (scenes 19-22) spontaneously stopped working. All audio tracks unlinked, everything was silent, and whenI click on one, the track displays red. I attached a photo below for reference. I have another timeline that has all the raw clips synced, but the only sequence I had where everything was edited together is the one I discovered it didn't work. My DP encountered this on his own film but forgot how to solve it. Does anyone have any helpful tips or insight?

    Any help please?

  • APPCRASH - "Crystal Reports has stopped working"- windows message

    Hi,
    I had installed Crystal reports 2008 using valid license keycode on Windows Server 2008 machine ( crystal software not registered it in Sap portal for additional support)  This was used for crystal reports development in .Net for few days, After 1 month or little more , the crystal reports stopped working and when launched from Start -> Programs -> Crystal Reports 2008 displayed a windows error message " Crystal Reports has stopped working ".
    Following is the details about Problem from windows message
    Problem Event name: APPCRASH
    Application name: crw32.exe
    Application version : 12.0.0.683
    Fault Module Name: x2rpclB5.dll
    Exception Code : c0000005
    OS Version : 6.0.6001.2.1.0.274.10
    I Uninstalled and reinstalled the application with valid license keycode and registered as well, but still the error remains same when the application is started.
    Kindly suggest on how to resolve this issue.

    Please note that this forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net.
    Reports design, Crystal Reports (exe) installation and other issues should be posted to the [Report Design forum|SAP Crystal Reports;
    Now, looking up the DLL,(x2rpclB5.dll) it appears to be a Xerox printer driver(?). You mention that this started to happen recently, so the question would be; was a Xerox printer driver installed? Also, see if either uninstalling the printer driver or installing any available updates fomr Xerox will resolve the issue.
    Ludek

  • Crystal Reports XI crashes says "Crystal Reports has stopped working"

    I'm on Crystal Reports Xi release 2 sp2, with windows 7, I also have visual studio 2008 installed.
    When I try to add any fields or objects to a report in crystal reports it crashes and throws up a windows generic error message that says "Crystal Reports has stopped working"  There is no additional error information besides that...  I've tried a number of fixes, too many to list here, but no go, and apparently calling for tech support requires me to pay more money! ack.  We've already paid for the product, I just want to use it..
    Does this version of crystal reports even work on windows 7?  if I could get a straight answer on that it would be a start anyway...
    Sorry to be snippy, I'm just frustrated!!!

    Upgrading to SP6 solved the issue.  I originally thought sp4 was the newest because of this page: http://resources.businessobjects.com/support/additional_downloads/service_packs/crystal_reports_en.asp
    which is out of date...
    Thanks for the quick fix.

  • Crystal Reports has stopped working

    I just installed Crystal Reports 2013. I am using Windows 7. The program opens up and everything looks normal but when I open a blank report and try to create a new connection, it immediately gives me the error "Crystal Reports has stopped working" and closes me out of the program. I talked to support and they told me to uninstall and reinstall the program. I tried that but still get the same exact error. Another support rep sent me an update to try. I tried that with the same results. Can someone please help me with this?

    Hi Try setting the DEP.
    1) Click Start > Run, > type sysdm.cpl, and then click OK.
    2) On the Advanced tab, under Performance, click Settings.
    3) On the Data Execution Prevention tab, click Turn on DEP for all programs and services except those I select > then click Add to add the CRW32.exe (You need to browse to the executable file)
    P.S  Solution provided by AbhilashKumar

  • Error - Crystal Reports has stopped working

    I have downloaded the CR 2011 trial, and I am trying to open a Crystal 7 report.  The strange thing is that it was opening OK before, but has now stopped opening.   Some of the Crystal 7 reports I have are able to be opened, and others are not.
    The error is not helpful - Crystal Reports has stopped working.  Windows is checking for a solution to the problem.   I have uninstalled and reinstalled the CR 2011 trial, but this has not helped.
    Has anyone had a similar problem?

    Thomas,
    Can you create a brand new reports against those Stored Procedures?
    Are the .rpt files from CR 7 still have the old "last modified" date?
    What if you try a middle CR version, like install temporary CR XIR2, open and save the reports and then try to open in the latest version?
    Do you know if failing reports have any external links like Linked pictures, OLE objects, etc.?
    Have you ever used Process Monitor utility? It may be helpful to identify what CR is trying to do.
    Vitaly.

  • 9i Report Builder stops working after 10g install

    I have the 9i Developer Suit installed and recently I installed the 10g Developer Suit. After installing the 10g Developer Suit the 9i Report Builder stopped working. When I try to start it, it hangs at the launch screen. All the other apps in the 9i and 10g Developer Suits seem to work except for the 9i Report Builder. Please Help.

    Nope. The 10g report builder works fine. The issue is only with the 9i report builder.

  • Hyperion Reports Scheduler stopped working after 4 years of reliable servic

    Hello,
    I'm puzzled by this, but today at 4:00 AM, the scheduler stopped working. I tried to manually restart the service to no avail. I rebooted the server, nothing. I reinstalled Reports (but selected retain configuration), yet nothing. I'm perplexed as this has been working without issues for 4 years. Next step is to check whether the IT group did a patch upgrade of the OS and may have caused this.
    If anyone has an idea, pls forward. Many thanks.
    Here's the content of the log file:
    10-29 04:06:48 INFO JobServiceThread     Batch "Station Reporting\2006 MOR" finished at Oct 29, 2008 4:06:48 AM
    10-29 04:06:48 INFO JobServiceThread     Detail status : Batch "Station Reporting\2006 MOR" was started at Oct 29, 2008 4:06:31 AM
    Problems encountered in "Station Reporting\MOR\2008 MOR"
    ADM Error processing results from query: 1
    Batch "Station Reporting\2006 MOR" finished at Oct 29, 2008 4:06:48 AM
    10-29 04:23:06 INFO SchedulerServerLauncher     Hyperion Reports 7.0
    10-29 04:23:06 INFO SchedulerServerLauncher     Copyright(C)2000-2004 Hyperion Solutions Corporation
    10-29 04:23:06 INFO SchedulerServerLauncher     All Rights Reserved
    10-29 04:23:23 ERROR SchedulerServerLauncher     Error while starting Scheduler Server

    schedule.xml must be deleted if it reaches 8 megs. Surprised that Hyperion did not come with something more intuitive.

  • Illustrator spontaneously stops working...

    Illustrator stops working/responding and closes down erasing any progress I've made on my current project.  I'm not terribly tech savy so please formulate answers in leyman's terms.  I have an ASUS Laptop and I have Bridge, Photoshop, Illustrator, Lightroom, InDesign and Flash, all from the Creative Cloud suite, installed.  I have 512 MB of VRAM (because I was told I needed at least that to run these programs).  I'm not sure about any other specs but am willing to be directed to where I can find them if needed.  I also have a back up external drive that I use to store the bulk of my photos.  I have Windows 8 OS.  Let me know what other info is needed to help diagnose my problem. 
    Thank you in advance for any help.
    Shea

    http://forums.adobe.com/community/illustrator
    This forum is actually about the Cloud, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

  • MAJOR PROBLEM - Wireless Mice spontaneously stop working!

    I have gone through three wireless mice now. The kind with USB recievers, I mean.
    The first was a Kensington Slimblade, which stopped working back in March. It would not work on either of my family's iMacs, OSX or Boot Camp.
    I had it sent back under warranty, thinking it was faulty. I recieved a new one and it worked fine until June.
    Now I'm thinking "What a crappy manufacturer. I'll go elsewhere for products, thank you." So I buy a generic wireless mouse from Wal-Mart, hoping it will work.
    It didn't. It just stopped working today. But here's the kicker: It broke down EXACTLY like the two Kensington mice. If it had stopped working any other way I would have thought "It's my fault for using a cheap, generic product." But no, it stopped working exactly how the ones from a BRAND NAME manufacturer did.
    So it's not poor quality, and it's not the brand. And here's another kicker: The second Kensington mouse stopped working in Boot Camp (Windows XP). But the generic mouse stopped working in Mac OS X (Leopard)!
    So. What the heck is going on? I'm this close to forgetting about ordinary wireless and using Bluetooth, but I'm not sure if that will work either. Is there any way I can fix this?
    Thanks in advance.

    Oops, wrong forum...

  • Dv6-3120us Entertainment Notebook - Disk tray spontaneously stopped working.

    My disk tray was working just fine yesterday, but today it randomly stopped working and I know I didn't accidentally break it because I didn't even try to use it until now. I managed to get the disk that was in it out using a paperclip, but whether I use the paperclip or not my computer is acting like the disk tray doesn't even exist and it won't let me use any CD's.
    While I was trying to get the disk out I clicked eject on the (E: drive I think? Whatever the dvd drive was in removable devices) to try and get the disk out, but it deleted the dvd drive so now I don't even have that in there anymore. All I have in removable storage now is an F: drive which I don't even know what that is for.
    Is there any way to fix this or will I have to send the computer in? It's fairly new so I'm irritated that I'm having problems already. =|

    Hi,
    Download this software and run it as an administrator.
    http://go.microsoft.com/?linkid=9740811
    For more info: http://support.microsoft.com/kb/982116
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Crystal Reports has stopped working with Windows 7 and demo database

    I'm trying to get back up to speed on Crystal Reports after 10 years away. I'm running Crystal Reports 2008 Standard with the just-released Service Pack 3 (same symptom with SP2).
    So I downloaded the demo database and tried creating a new report. No problems creating a simple customer list. When I add the Orders table and link the CustomerID columns and then add the OrderDate column to the report, everything works fine. But as soon as I add the OrderID or OrderDate column, the application crashes.
    Culprit seems to be MSVCR80.dll. Here's the log:
    Faulting application name: crw32.exe, version: 12.3.0.601, time stamp: 0x4bd05d31
    Faulting module name: MSVCR80.dll, version: 8.0.50727.4927, time stamp: 0x4a2752ff
    Exception code: 0xc000000d
    Fault offset: 0x00008aa0
    Faulting process id: 0x1944
    Faulting application start time: 0x01cb0139cfafeb40
    Faulting application path: C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\crw32.exe
    Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5\MSVCR80.dll
    Report Id: 3b28c990-6d2d-11df-b9d8-00080d72c9f2
    Suggestions? Thanks in advance.

    Hello,
    It may be that something was "fixed" and our default xml file falls out of the Standards now.
    Are you wanting to connect to SQL or XML?
    Go to Microsoft's site and search for C++ distribution and download and install the recommended one for windows 7. It may be that part is corrupt or our installer thinks it is there. Try doing a Repair install and custom options to select all of the DB drivers and exports types to see if that resolves the issue.
    Thank you
    Don

  • Business Objects Finance 10.5 Report Formula Stopped Working

    HI
    I have build reports in Report Designer, in the LAYOUT tab I have a simple formula in one Column A to add Column B and Column C
    Column B and C are straight forward extracts from the packages and there are figures in column B and C, lately I have been having this problem that formulas are just not working, it keeps bringing back a 0.  There are no error messages or anything else that I can see that is going on.  On some reports when I delete the columns from the SELECT DATA tab and rebuild it exactly the same way the formula starts working, but I have one report where nothing is working.  I have rebuild it several times and Column A values still comes up as 0.  It is a real simple formula B5+C5, but it is just not working.
    I have had to rebuild several reports and it is taking up a lot of my time, if anyone can please help me with this I would really appreciate it.
    Thanks

    Hi ,
    Do you want to restrict the data at universe level : Rowlevel Restriction
    Follow the below steps:
    - Create a new universe in Designer
    - Save and export the universe to repository
    - From menu go to Tools->Manage Security->Manage Access Restrictions-
    - Manage Access Restriction window opens,Click on NEW-
    - Select Rows Tab and click on ADD
    - Select the table to apply the restriction and also the condition in the Where clause then click OK
    - A new restriction is created
    - Select users or groups which we want to restrict from available list by clicking Add New User or Group
    - Select the newly created restriction and click Apply to the group or user selected then click OK
    - Save the universe and export it to repository
    - Create a new report based on the universe by selecting any one object from the table on which restriction is applied along with other objects and check the SQL whether restriction is applied.
    Hope this helps.
    Regards,
    Deepti Bajpai

  • OTM Spontaneously Stopped Working for OpenScript Tests

    So I've been working with OTM and OpenScript as part of a R&D project for my company. We set up some fairly simple test cases in Oracle EBS/Forms and ran them through OpenScript. They were recorded as EBS/Forms Functional Tests and worked in Test Manager after I started the AgentManagerService.exe file from the command line.
    A couple of days later I recorded some new tests and tried to run these in OTM. They acted as if I had not set up the AgentManager correctly, simply hanging forever at the running window. I've tried running them with and without the AgentManager running from the command line and even tried reinstalling OATS in its entirety (we're using 12.1 to match the potential client). I did not change any settings between the first batch of tests and the new one, and when the problem started I tried running the old tests as well with no success.
    Any help would be appreciated.

    Any help please?

Maybe you are looking for