When a report is Empty?

<p>
Hello,
I would like to know, haw can I detect that a report is empty!
With a report without subreports was OK, I took the "report.Rows.Count > 0", but if the ReportDocument is a Subreport, This property whrows me a NotSupported exception.
</p>
<p>
Please help, I have a peace of code, but i have no idea how to make this recursive function work:
</p>
<p>
</p>
<p>
        private static bool IsEmptyReport(ReportDocument report) <br />
        {<br />
            if (!report.IsSubreport)<br />
            {<br />
                foreach (ReportDocument subreport in report.Subreports)<br />
                {<br />
                    if (!IsEmptyReport(subreport))<br />
                    {<br />
                        return false;<br />
                    }<br />
                }<br />
            }<br />
             <br />
            if (report.Rows.Count == 0) // NotSupported Exception for a SUBreport<br />
            {<br />
                return true;<br />
            }<br />
            else <br />
            {<br />
                return false;<br />
            }<br />
</p>
<p>
</p>
<p>
thanks!
</p>

The CrystalReportDataView object instance being returned from a subreport.Rows do not support the Count property for subreports.
On my Crystal Reports 2008 SP0, the NotSupportedException comes with the message "Not supported within subreports."
So this method wouldn't get you what you want.  I'm not aware of alternative methods.
Sincerely,
Ted Ueda

Similar Messages

  • I generate file (PDF, HTML, etc) the report is empty but I run in paper

    Hi
    I use oracle Report10g
    When I generate file (PDF, HTML, etc) the report is empty but I run in paper design show data, the report in the paper design show many pages, when generate file show only the information of the margin in the main seccion and the body is empty,
    Thanks

    Thanks Daniel for pointing that out.  Though you answer is helpful but I am not sure if that is what I would want to do.
    The link you provide for csv says "For each report there's an _report.xdo file that contains the XML structure of the report... "   It suggests I modify the .xdo file for each report.  I currently have 16 reports.
    Does it mean I modify the .xdo file for all 16  and what happens if someone creates a 17th report ?
    Also, what if I run the same report using different input parameters will that change the xml structure for the report  and therefore will need me to modify the .xdo again ? (I think it should not change the xml structure so the answer should be "NO" to that, unless I change the structure of the report).
    Finally, the link you provide says after doing what it suggest  "Now log back into BI publisher and select the report. You should now be able to see that CSV is now an option."
    CSV should be an option where ? on what screen/page ?  Maybe PDF is already an option for me that I cant see because I do not know where that option is.
    I was hoping there would be something I could do on the xdo_metadata sheet (in the data constraints section or elsewhere) OR in BI Publisher itself as some property of the report.
    I will try out what you suggest any ways.
    M. Jamal

  • Report sometimes empty - responsibility

    Hi,
    After updating a computer, a User could not run any reports. After cleaning the cache the User can now run reports. However, one report is empty.
    When I run the report using the same responsibility and the same parameter, I get data. When the User runs it, the report is empty.
    Any suggestions?
    Thanks.
    Leah
    Edited by: user476771 on Feb 17, 2013 1:33 AM
    Just to clarify, the user can run the report successfully on another computer.

    NO PROBLEM now. It turns out that the problem was with the User's version of the report. She only told me that now.
    Leah

  • How to remove asterix symbol which appears in report for empty values?

    Hi Experts,
    I have designed a querry wherein I am getting all the values correctly. But, for certain cells - I am getting the asterix symbol which the user does not wants.
    Now, how to remove the asterix symbol which appears in report for empty values?
    Thanking you in advance,
    Waiting for your reply,
    With Kind Regards,
    Shreeem.

    check if following thread helps you;
    # in report when null in the cube
    Regards,
    Gaurav

  • Reports are empty

    Hi,
      I've executed these steps (
    http://technet.microsoft.com/en-us/library/jj943761(v=office.15).aspx ) and when I go in PWA->Report->English (US)-> Project Overview. The report is empty. I opened it in excel and click "Refresh All" from data tab, not error message,
    and no data as well. I tried to open it in web excel service, when I refresh data, I get this message :
    The data connection uses Windows Authentication and user credentials could not be delegated. The following connections failed to refresh:
    OData Assignments Data
    OData Issues Data
    OData Risks Data
    OData Tasks Data
    OData Projects Data
    Any clues? Should I follow this procedures  http://technet.microsoft.com/en-us/library/jj943761(v=office.15).aspx ?
    (Project Server 2013)
    Thanks
    OG

    Hi OG,
    Have you checked out those similar post or article about his error message?
    http://mmman.itgroove.net/2013/03/the-data-connection-uses-windows-authentication-and-user-credentials-could-not-be-delegated/
    http://msdn.microsoft.com/en-us/library/ff487856.aspx
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Ordering messed up when generating Report as Delimited on Server

    Hi folks,
    Not sure if anyone else might have observed or faced this issue but thought I'd give it a try. I have an Oracle Report (Version 6i) and the output generated should be a tab delimited text file so the user can view the output in Excel. The Report output is sorted by Name. When I run the Report locally (Client) by doing File -> Generate to File -> Delimited (Delimiter Option: Tab), the Report works fine. The ordering is correct. However, when I am running it off the server (Using the option DELIMITED for the DESFORMAT), the ordering seems messed up. The ordering is maintained for quite a few rows and then a Name (out of order appears). Note that this record also appears in the correct place as well as above the place where its expected to be ... Here is an example:
    Name                     ID     BIRTH DATE
    ==========================================
    ALLAN, BRIAN             1001   1970/12/31
    ALLAN, SUSAN             2001   1968/01/01
    FRANCIS, JOHN            5001   1965/02/01
    BROWN, EDWARD            3001   1978/01/02
    BROWN, JENNY             4001   1976/04/01
    FRANCIS, JOHN            5001   1965/02/01
    GRAHAM, DALE             6001   1980/10/10As you can see that FRANCIS, JOHN is appearing out of order and in order (Twice). This is not happening when I run it on the Client. Any ideas what may be causing this? I realize I don't have much information out here as I myself am at my wits end.
    Thanks
    Edited by: Roxyrollers on Jan 4, 2013 2:15 PM

    Hello,
    I you have access to Metalink (http://metalink.oracle.com), you can take a look to the notes:
    Note.278044.1 How to Debug REP-1401 when executing Reports with Barcode java code
    Note.382952.1 RDF to Debug REP-1401 when using Oraclebarcode.jar
    Note 252691.1 REP-1401: 'CF_1Formula ': Fatal PL/SQL error occurred - ORA-
    06502: PL/SQL: numeric or value error when running the example "Building a Report with a Barcode"
    Note 271807.1 Report With Barcode Bean Is Causing REP-69, REP-57054, REP-1401 and ORA-39565:
    Regards

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • Sending an email when the report is being refreshed

    Hi All,
    Is it possible, in Answers, to send an email automatically when a report is being refreshed ?
    Thanks in advance,
    Lau

    You can do this multiple ways, As you mentioned using conditional ibot also. You should have flag or indicator in your database saying that ETL load was done. Then based on conditional request run a ibot. But the trick is after completing this ibot you need to turn of the flag.
    Other easiest way is Create a report which runs ibot, Make sure you checked Oracle BI Server Cache feed check box, save the ibot. At the end of ETL execute a command which runs the ibot job for you. There is a command mode application available in Oracle BI called SASchInvoke.exe. This application will run the ibot for you.
    here is the blog which explains more about it.
    http://oraclebizint.wordpress.com/2008/03/06/oracle-bi-ee-101332-integrating-schedulerdelivers-into-other-applications/
    - Madan

  • Error when sending report output to printer from Forms 10g

    Hi,
    I have a simple report that I am running from a form using run_report_object built-in. I can successfully send the report output to a file but when I send the report output to a printer my report is
    terminated with report status of 'TERMINATED_WITH_ERROR'. I am using the default forms service and reports server that comes with the forms builder. How do I specify the reports server to user my default network printer ?Following is the code that runs my report.
    Thanks,
    Anna
    PROCEDURE SEND_TO_PRINTER IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    rep_server system_variables.reports_server%type;
    alldone          exception;
    BEGIN
         select reports_server
         into rep_server
         from system_variables;
         if rep_server is null then
              msg_alert('Error getting the reports server name', 'I', FALSE);                
              raise alldone;
         end if;
         :ctrl.run_report_errors := 'N';                    
         repid := find_report_object('REP_OBJ1');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,rep_server);
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
         IF :ctrl.rg_print = 'P' THEN
              --Send the output to printer.
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt');
         ELSIF :ctrl.rg_print = 'R' THEN
              --Rich Text Format
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,FILE);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'rtf');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,:ctrl.filename);
         END IF;
         v_rep := RUN_REPORT_OBJECT(repid);
         rep_status := REPORT_OBJECT_STATUS(v_rep);
         WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
         LOOP
              rep_status := report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' THEN
              null;
         ELSE
              :ctrl.run_report_errors := 'Y';
              msg_alert('Error when running report.' || rep_status, 'I', FALSE);           
         END IF;
    EXCEPTION
         when no_data_found then
              msg_alert('Error getting the reports server name', 'I', FALSE);      
         when alldone then
              null;     
    END;

    If you use Windows the user that runs the reports server is usually LocalSystem. Check this in the Windows Services panel.
    LocalSystem has no printer access. To be able to print, you have to use a real domain user that has access to the printer. So, change the Log on properties in the Services panel.

  • How do you identify when a report has finished?

    Hi all,
    I've got a big report that is taking a while to run (approx 1min) and the problem I'm having is that my users are getting bored of waiting and starting to click around my web application and re-running the report because they think it has failed. The re-running of the report is causing more load on the system and the reports to run even slower. What I would like to do is stop them re-runnning the report maybe by somehow locking the web page until BI publisher has finished but I don't know how to get a message back from BI publisher.
    Currently I'm running the BI publisher report by having a button push which redirects the users web browser to a url such as:
    'http://'||:BI_PATH||'/xmlpserver'||:BI_DIRECTORY||'/Custom Reports/'||:p180_report||'/'||:p180_report||'.xdo?_xpf=&_xpt=1&_xdo='||:BI_DIRECTORY||'%2FCustom%20Reports%2F'||:p180_report||'%2F'||:p180_report||'.xdo&_xt='||:p90_template||'&_xf=rtf&_xmode=4'
    And then as I'm returning an rtf doc the familiar save, open or cancel popup comes up. The problem is that before the popup appears they can re-click the run report button.
    One way round it I've thought of is to have the report generate to a file system and redirect the user to a waiting page that checks periodically for the files existance and then when it does exist forward the user to a page with a view report button. This sounds like a lot of effort, does anybody know of a better way?
    I've also wondered if running the report using webservices would be an option, is there a way of getting BI publisher to run a web service when a report has finished? This could then interact with my back end server and the web page could act on that, or am I totally barking up the wrong tree?
    Any help would be greatly appreciated!
    Thanks,
    Darren.

    Hi Darren
    couple of ideas
    1. Rather than 'run' the report, get it to run through the scheduler immediately. Once its running through the scheduler you could then poll the scheduler tables to see when it completes. You could either redirect the users to a wait page or show an egg timer until the document has been created. this would require the document to be delivered to somewhere for you to poll as the URL will not return a job id.
    2. Bit more involved but probably better is to hook into BIPs web services. So rather than the button issue an http request it calls a servlet to issue a web service call to BIP to schedule a report. The WS will return the job id to the caller, you can then poll the scheduler via a ws to check the progress of the job. Once complete you can then retrieve the result form the scheduler tables via another call.
    Food for thought I hope
    Tim

  • Garbage text when viewing reports

    Post Author: icecroft
    CA Forum: General
    Hello everyone!
    Is there anyone here who has encountered this error? When running any Crystal Report, our client gets garbage text as a report output. The weird thing is, when this report is exported to PDF, the output is perfectly fine. They are currently running on Windows XP and uses Crystal Report 10.
    If it helps, here's a screenshot of the report with garbage text:
    I would really appreciate it if anyone could help me with this.
    Thanks a lot!!!

    The basic flow is this, for the situation in which I'm seeing this issue.
    This is a desktop application using an Access database as its data store, with a button that allows the user to view a Crystal Report containing all of the data that's in the screen.
    When the user clicks on the button to view the report, the application does the following:
    - Builds up a DataRow containing all of the data representing the current 'item' being viewed in the application
    - Inserts the row into the Access database using the DataSet / TableAdapter (creates a new database connection each time)
    - Creates a new instance of the Crystal Report class to be viewed
    - set the database connection info in the report to the access database being used by the application
    - create a new form containing a CrystalReportViewer control
    - set the ReportSource of the control to the instance of the Crystal Report created above
    - show the form / CrystalReportViewer control.
    That what you were looking for?

  • My iPhone 4S was turned off when the battery got empty, and when I put it on the charger it didn't charge at all. I tried restarting it (on/off home button for 10 sec) nothing happened except it kept giving me the "charge battery"  on its screen.

    Hi! My iPhone 4S was turned off when the battery got empty, and when I put it on the charger it didn't charge at all. I tried restarting it (on/off home button for 10 sec) nothing happened except it kept giving me the "charge battery"  on its screen. I tried with different chargers, still dead! What's weirder is that my sister who has iPhone 4 experienced the same today! No we don't live in the same house!! Does anyone have the same problem?
    Please apple support do you people have a convincing answer for us? Is there a solution? My phone is only 2 years old and was (2 hours ago), in top condition!!
    Please help....

    imanfromsweden wrote:
    Please apple support do you people have a convincing answer for us? Is there a solution? My phone is only 2 years old and was (2 hours ago), in top condition!!
    Please help....
    On belhalf of my fellow volunteers, the answer is, "We'll try our best." 
    My advice is to try not to treat this like it is a paid service provided by compensated professionals.  Ask nicely and one of the nice folks here might take some time out of their weekend to offer advice.

  • I'm getting an error code -8003 when I try to empty my trash.

    I recently emptied several old backup files from an external hard drive to the trash folder.  Now when I attempt to empty the trash, I get this message: "The operation can't be completed because an unexpected error occurred (error code -8003).  What should I do?  I just took the computer and external hard drive to an apple store for genius support a few days ago and the tech fixed a few things.  He advised me to empty the backup files, which is what I'm trying to do.

    See this general resume of trash problems.
    I suspect you've been trying to remove some of your Time Machine back ups.   Not a good idea without doing the necessary research first.  Read about ways to solve Trash problems.
    From the X LAB.       Solving Trash Problems     
    Then, for clearing stubborn trash.                Download Trash It! for Mac
    In particular related to Time Machine.       Time Machine - Troubleshooting
    http://pondini.org/TM/E6.html
    Can't empty the trash after deleting backups via the Finder

  • I get an error code -8003 when I try to empty the trash

    I was about to run TechToolPro to defrag etc my external HD when I decided to reduce the size of the Time Machine file by removing the earliest two or three backups which date back to a year ago or so. I realize the error of my ways now but my thinking was to reduce the time it took to defrag etc.
    I had put the files in my trash on the MBP 2.16 GHz Intel Core 2 Duo 4 Gb ram running 10.6.8 which at that time had about 11gib of HD space left. This action brought it down to 3.8 Gb left on the HD.
    cannot
    Now when I try to empty the HD I get an error code -8003 and the HD space remaining has reduced to about .5 Gb.
    What are my options?
    I also have a Super Duper backup.

    Did any of the threads that appear in the "More Like This" section to the right help you?
    You could try this utility and see if that trashes any stubborn files:
    http://www.macupdate.com/app/mac/8214/trash-it

  • IPhoto hangs when I try to empty iPhoto trash.

    I had a lot of photos in my iPhoto library. I saved them to an external hard drive, then deleted most of them from  my computer.
    Except, they're still somewhere on my computer's hard drive.
    When I try to empty the iPhoto trash, the program goes into permanent spinning-beach-ball mode, and the only way out of the program is to force quit. The photos that are in the trash show up only as blank frames.
    My question is this: where is iPhoto trash on the hard drive? Can't I just find it and delete its contents without going into the utterly useless iPhoto program? My thought was the iPhoto would be structured like iTunes, so that I'd be able to find & delete as I said. But noooo. Unless I've got iPhoto open, the photos are simply not findable.
    Any ideas? Thanks.
    The "about" pane identifies this program as iPhoto 09, though that is not one of the choices on the menu offered here.

    Deleting the material by hand will corrupt your iPhoto Library - and it'll do the same to your iTunes library as well.
    How many items are you trying to trash?

Maybe you are looking for