How to get a report "closed" when using the ReportViewerBean

I read the article /people/ted.ueda/blog/2008/12/20/crystal-reports-for-eclipse--ensuring-report-cleanup from Ted Ueda regarding cleaning up reports for the RAS server.  However, I'm trying to figure out how to get this accomplished for a thick client accessing a local rpt file and then displaying that file using the ReportViewerBean.  I can't seem to get the report closed. I tried the dispose() techniqe from the article, but with no success.
My basic process is:
1) Press button on main frame to open and set up report
2) Pass open report (via ReportClientDocument) object to the viewer frame class (which views report in separate window using ReportViewerBean)
3) Close viewer window when done, destroy ReportVieweBean and close ReportClientDocument
4) Press button again on main frame later to view report
If I set up the report but skip the step of sending the report to the viewer frame, ReportClientDocument.isOpen() will go from true to false after I execute just  the ReportDocumentClient.close() command.  However, if open the viewer frame, I cannot get the report closed.
In the window closing event for my viewer window I have:
public void quit() {
            try {
                CrystalReportViewer crv1 = new CrystalReportViewer();
                crv1.setReportSource(reportClientDoc.getReportSource());
                reportViewer.destroy();  //this is a ReportViewerBean
                reportClientDoc.close();  //this is a ReportClientDoc
                crv1.dispose();
                //the following is always true
                System.out.println("ReportClientDoc.isOpen: " + reportClientDoc.isOpen());
                this.dispose();
            catch(ReportSDKException ex) {
                ex.printStackTrace();
            catch(ReportSDKExceptionBase ex) {
                ex.printStackTrace();
I'm using the latest Java CR4E 12.2.205.825 downloaded from the CR4E website.  Any ideas?
Edited by: Joseph Huber on Mar 16, 2010 8:13 PM

The webservices you are trying to use are not the ones used for enterprise, they are used for non-enterprise applications accessing reports that are stored in a specific location on the web server.
Here are samples that use our Enterprise SDK:
[https://boc.sdn.sap.com/samples/84/1193|https://boc.sdn.sap.com/samples/84/1193]
Here are samples that use our Enterprise Web Service SDK:
[https://boc.sdn.sap.com/samples/84/1197|https://boc.sdn.sap.com/samples/84/1197]
You can also look at the SDK documentation available here:
[http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]

Similar Messages

  • I am unable to get a bullited list when using the synchronized text feature.

    I am unable to get a bullited list when using the synchronized text feature. The option is greyed out and not active. Any tips? Am I doing something wrong?

    This is by default , synchronized text does not alter any style and other visual attributes associated with instance.
    Thanks,
    Sanjit

  • How to get to outlook express when using firefox

    new to firefox i do not see a tab to access my email in outlook express when using fire fox

    http://www.webdesigns.ms11.net/getmail.html <br />
    The GetMail extension provides a '''button''' for opening your email program. Make sure you read the instructions for setting GM Options for Outlook Express, as the default setting in GM is for Gmail.
    Also, you need to read this for setting up Firefox to use Outlook Express for "Send Mail" buttons on web pages or "Send Link" from within Firefox. Firefox also defaults to Gmail. <br />
    [http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox]

  • How to create a report with data using the Crystal Reports for Java SDK

    Hi,
    How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
    I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats.  I can create my own report through the following code snippet:
    ReportClientDocument boReportClientDocument = new ReportClientDocument();
    boReportClientDocument.newDocument();
    However, I cannot find a way to add data elements to the report without specifying an RPT file.  Is this possible?  I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
    is there a way to do this through these packages?
    com.crystaldecisions.sdk.occa.report.data
    com.crystaldecisions.sdk.occa.report.definition
    Am I forced to create a RPT file for the different table and column structures I have? 
    Thank you in advance for any insights.
    Ted Jenney

    Hi Rameez,
    After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser.  I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
    Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
    <%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
    <%
    try { 
                ReportClientDocument rcd = new ReportClientDocument();
                rcd.newDocument();
    // Setup the DB connection
                String database_dll = "Sqlsrv32.dll";
                String db = "qa_start_2012";
                String dsn = "SQL Server";
                String userName = "sa";
                String pwd = "sa";
                // Create the DB connection
                ConnectionInfo oConnectionInfo = new ConnectionInfo();
                PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
                // Set new table logon properties
                PropertyBag oPropertyBag2 = new PropertyBag();
                oPropertyBag2.put("DSN", dsn);
                oPropertyBag2.put("Data Source", db);
                // Set the connection info objects members
                // 1. Pass the Logon Properties to the main PropertyBag
                // 2. Set the Server Description to the new **System DSN**
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
                oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
                oPropertyBag1.put("Database DLL", database_dll);
                oConnectionInfo.setAttributes(oPropertyBag1);
                oConnectionInfo.setUserName(userName);
                oConnectionInfo.setPassword(pwd);
                // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
                oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
    // Add a Database table
              String tableName = "Building";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
        catch(ReportSDKException RsdkEx) {
                out.println(RsdkEx);  
        catch (Exception ex) {
              out.println(ex);  
    %>
    Throws the exception
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
              String tableName = "Building";
                String fieldname = "Building_Name";
                Table oTable = new Table();
                oTable.setName(tableName);
                oTable.setAlias(tableName);
                oTable.setQualifiedName(tableName);
                oTable.setDescription(tableName) ;
                Fields fields = new Fields();
                DBField field = new DBField();
                field.setDescription(fieldname);
                field.setHeadingText(fieldname);
                field.setName(fieldname);
                field.setType(FieldValueType.stringField);
                field.setLength(40);
                fields.add(field);
                oTable.setDataFields(fields);
                oTable.setConnectionInfo(oConnectionInfo);
                rcd.getDatabaseController().addTable(oTable, null);
    This code succeeds, but it is not clear how to add that database field to a section.  If I attempt to call the following:
    FieldObject oFieldObject = new FieldObject();
                oFieldObject.setDataSourceName(field.getFormulaForm());
                oFieldObject.setFieldValueType(field.getType());
                // Now add it to the section
                oFieldObject.setLeft(3120);
                oFieldObject.setTop(120);
                oFieldObject.setWidth(1911);
                oFieldObject.setHeight(226);
                rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
    Then I get an error (which is not unexpected)
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
    How do I add one of the table.SetDataFields()  to my report to be displayed?
    Are there any other pointers or suggestions you may have?
    Thank you

  • How to suppress Save As dialog when using the Close button on an editable pdf

    Environment: Windows 7, SDK 9, Adobe Acrobat Pro X, Visual Studio 2010 Professional
    Summary: when a document is opened for editing using automation, edited, then closed using the "Close" button, the confirmation dialog appears, "yes" is selected and then the "Save As" dialog appears.  It should save without the "Save As" dialog in the same way it does were the document opened from Adobe Acrobat directly.  My question is, is there any flag to set which governs whether the "Save As" dialog appears as part of the close document process.  It is behaving as if the document is read-only upon close. (it isn't)
    This is how the document is opened from C++:
    if(SUCCEEDED(hr = ::CoCreateInstance(__uuidof(Adobe9::Acrobat::CAcroAVDoc), 0, CLSCTX_ALL, IID_IUnknown, (void**)&pUnk))){
    hr = OleRun(pUnk);
    if (SUCCEEDED(hr)){
    if (SUCCEEDED(hr = pUnk->QueryInterface(&pAVDoc))){
    hr = pAVDoc->Open((BSTR)CComBSTR(strPath), strDocName, &bRet);
    Even when the plugin is removed from the plug_ins\AcrobatSDK directory, the behaviour is the same.
    Another reproduction is running the BasicIacVC sample, commenting out all lines from gAcroPdDoc->Close(); in InitInstance() and returning TRUE.  If an editable document is opened using the sample, edited then closed using the "X" button, the confirmation dialog is followed by a "Save As" dialog as if it were a read-only document which it is not.
    Any suggestions would be appreciated.
    Regards,
    Evan

    Yes, it does.  (as long as the pdf has been opened via a COM interface)

  • I get Error Code 1 when using the installer.  Please advise.

    When running the installer, it quits with the message:  Error Code 1.  Please advise how to resolve @this error.

    Gener7:  Good morning.  Thanks for speedy reply.  I’m running Windows 7 on a Dell Studio laptop computer.  I have CS6 installed, and it runs okay.
    I ran the CC Cleaner tool to uninstall Photoshop CC.  PCC kept crashing every time soon after I tried editing an image.  I gave up.  After the cleaning, I tried to re-install PCC.  The error code 1 showed each time I ran the installer.
    Please advise.
    Thanks.
    ==============

  • How to get a "blank" answer when using "if" statements in a table

    I'm using a table for an invoice where an item is ordered, but more may be shipped than ordered. I have the formcalc expression figured out where I can get a 0 in the "backordered" column if the amount shipped is more than the item ordered, but I can't get rid of the 0 in the rest of the backordered column when there isn't any information in the "ordered" and "shipped" columns. Trying to get that column to be blank if there is no shipping or ordering information.
    So far this is working for the math part. Not sure how to write a "blank" into the calculation
    Sum(ordered-shipped)
    if (Sum(ordered-shipped)>0)
    then backordered=Sum(ordered-shipped)
    elseif (Sum(ordered-shipped)<0)
    then backordered=0
    endif
    Any advice will be greatly appreciated. Thanks!

    I'm still getting a 0 in all the backordered columns when I'd like them to be empty. The form has more rows than I will be using, so when there is no information in the shipped and ordered row, I'd like the backordered row to be empty/blank. I've tried writing this at the end of my formula
    elseif ordered=null and shipped=null
    then backordered=null(but I really want it to be blank)
    or elseif Table1.Row1.ordered=null and Table1.Row1.shipped=null
    then Table1.Row1.backordered=null
    And yes, backordered is a numeric field.
    Any more advice? Thanks!

  • How to get values from resultset when using subquery???

    Hi ,
    I have a problem in executing sql query from java.
    I am executing an sql query which return a intersection of values from 3 tables.
    Here is the query I am using
    select id from dps_user where id in (select b.id from dps_user b,laserlink c
    where c.userid='univ.'||b.login and c.status in(1,3,8,9,10)
    intersect
    select b.id from dps_user b,laserlink c
    where c.userid=b.login and c.status in(1,3,8,9,10)).
    this query is working fine from sql .
    when I am trying to excute the same query from java nothing is coming into resultset.
    String ISP_AND_EMAIL="select id "+
                             " from dps_user where id in (select b.id from dps_user b,laserlink c "+
                                  "where c.userid='"+"univ.'"+" ||b.login and c.status in(1,3,8,9,10)"+
                                  " intersect "+
                                  " select b.id from dps_user b,laserlink c"+
                                  " where c.userid=b.login and c.status in(1,3,8,9,10))";
              System.out.println(ISP_AND_EMAIL);
              rs=stmt.executeQuery(ISP_AND_EMAIL);
    How to use concatinate string (|| ) in java.
    can anyone help to retrieve the values from this resultset...
    Thanks

    concatnation is done using + in java.
    I am doubtful about the following line where there may be error
    "where c.userid='"+"univ.'"+" ||b.login and c.status in(1,3,8,9,10)"+
    I don't know if the univ. is a string or some variable.I need more clarification on this line,then i may help u.
    thx

  • How to get 16:9 resolutions when using DVI to Video Adapter?

    I just plugged my new Intel Mac Mini into a 16:9 widescreen TV with the Apple DVI to Video Adaptor (PAL Video version).
    It only offers me:
    640x480
    720x480
    720x576
    800x600
    1024x768
    (all interlaced)
    I do get a choice of 50hz (PAL) or 60hz (NTSC).
    However, I don't get the widescreen options I've seen in some Apple screenshots.
    I'm plugging it into a PAL TV via an s-video cable.
    I intend later to plug it into a larger 42" plasma with same cable, but wanted to test it on this TV first.
    More info:
    I noticed, when I bought the "DVI to Video Adapter" that there were NTSC and PAL version. Both seem to do PAL though.
    Any help on this most appreciated.

    Concerning your question, "if only i knew the the correct entries for a custom displayconfig x timing," I think I can answer that one for you.
    It sounds like you have other Macs at your disposal that are correctly driving the TV you are trying to drive with the Intel mini. In that case, install DisplayConfigX on one of those computers and while it is running the TV at the desired resolution, click on the "Card" tab in DCX and then click on the "+" symbol at the bottom right corner. This will open a window in DCX titled "Resolution details" and you will see all the detailed information of the timing you need to enter into DCX on the Intel mini.

  • How to get default input values when using promt user for input

    I use "promt user for input" to input some values. The messageboard appears with blank boxes then I will input  new values. I want to make some default values in this blank boxes so that I needn't to enter new values. Is it possible ?

    Right click on he Express Vi terminal and choose open Front panel to convert it into a standard vi. Then open it. Enter a default value for each control, then right-click on the controls and go to data operation > make current value default.
    Message Edité par chilly charly le 11-18-2007 12:52 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to get 2 finger scrolling when using windows on mac?

    I just recentley put windows on my mac and i have installed all of the drivers for it to run but im having trouble with a few things like the f keys wont work for brightness or keyboard brightness and the other thing that wont qork is the 2 fingered scrolling then the volume buttons.

    In Windows there is a task bar located in the lower right of your desktop. There is a Bootcamp icon there, if you installed Bootcamp in Windows. Click on the icon and open the Bootcamp control panel. Select the keyboard and trackpad tab then set up your two finger scrolling etc.

  • A blue screen appears and gets restarted each time when using the iphone ...wat shd i do to solve this ??

    i bought a new iphone 4s 64 gb from a nearby store in ma hometown ...my iPhone flashed a blue screen then rebooted more than  twice in the same day, I then updated to 6.13 (lastest IOS version )...still the problem continues..... wat should i do to solve this ?

    I would bring the phone back.

  • Applying report filter when using OBIEE web services

    Hi
    Would like to know if it's possible apply report filter when using the web serivce ? Read from Oracle doc that there's this applyReportParams() method in ReportEditingService that could do the job. Can anyone confirm this ?
    Currently we've tried to access the report using the WebCatalogService, read the xml and retrieve the result using the XMLViewService successfully. However there's an additional requirement to pass in the report filter on the fly.
    Thanks in advance

    Hi Gerardnico,
    I have a question regarding the OBIEE Web Services,
    We are using C # for Automation code to test Obiee Analysis Web Services,while designing filter in C # to call report we are facing difficulty with Presentation Variable using Variable value. Where as it is working fine for Column value.
    Note: The choice list has 2 custom values.
    So please guide me in this regard.
    Regards,
    Pj

  • Multivalue error when using the previous() function

    I am getting a multivalue error when using the previous() function on a dimension object in the report.  I thought that the previous function was supposed to look at the current report and then look at the previous record's contents.  How could this possibly give me a multivalue error when the value is clearly output in the previous row?  Anyone have any ideas?
    By the way, this is a valuable function for the types of reports that I design.  The next() function would be even more valuable.
    Thanks for your help.

    Hi Michael,
    Could you please test the following solutions it might help you to resolve the issue.
    Solution1:
    Use slice and dice to reset all the tables that have #multivalue in it. The only problem with this workaround is they have to do the formatting manually.
    Solution2:
    Also, test the issue by changing the object to dimension if it is a measure or to measure if it is a dimension.
    Regards,
    Sarbhjeet Kaur

  • How to Suppress Report Total When Using Sum on Columns & Break Formatting

    I need to know how to NOT show the report total line when using the sum functionality with a break in a report.
    I am summing two columns, a debit amount and credit amount. I am breaking on the first column which is the level of a hierarchical query. I want to see something like this:
    Parent Record xxxxxxxxxxxxxx
    Parent Sum $$ $$
    Child Record xxxxxxxxxxxxxx
    Child Record xxxxxxxxxxxxxx
    Child Sum $$ $$
    However, when I run the report, I also get a report total line under the child sum which is really meaningless for this report.
    I have also tried creating this report as an interactive report. When applying the sum on the two columns, I do get the sum totals on the break only - no report total - however, it is reversing the order of the hierarchical query results putting the child records first and the parent records second.
    Thanks in advance for your help.

    Hi, and welcome!
    I don't think that there's an easy way to "switch off" the Total line on a report. The nearest I could suggest would be to either hide the entire row or colour the text so that it's the same as the background - either way, the total is calculated but the user won't see it.
    If you put something like the following into your report region's Region Footer:
    &lt;script type="text/javascript"&gt;
    var outertable = document.getElementById("#REGION_ID#");
    var innertable = outertable.getElementsByTagName("TABLE")[1];
    var rs = innertable.rows;
    var lastrow = rs[rs.length-1];
    if (lastrow.cells[0].innerHTML == '&lt;b&gt;TOTAL&lt;/b&gt;')
    rs[rs.length - 1].style.display = "none";
    &lt;/script&gt;Then, on your report's Report Attributes page, scroll down to the Break Formatting section and put TOTAL into the "Display this text when printing report sums" setting. Also, in the "Layout and Pagination" section, set "Enable Partial Page Refresh" to No.
    The above code is based on the report and region templates that I'm using here: [http://apex.oracle.com/pls/otn/f?p=267:147] (Theme 18, "Report Region" region template and "Standard" report template). Your report may use different templates, so the first two lines on the code may have to change. #REGION_ID# would be replaced with the region's ID value (which would be "R" followed by a long number). As long as you can identify the HTML tag that uses this ID value, you can then get to the actual table that contains the data as it would be a TABLE within that tag - the [1] above is the second table within the region. In some instances, you may have to use "region_#REGION_ID#" as the starting point.
    Andy

Maybe you are looking for

  • Add XControl Properties in LV2010 is not working correctly

    Could someone verify this, on my end only the properties folder is created without any templates vi's inside. Am I doing something wrong?  It seems to work in LV2009

  • Bonjour, without WLC, pointers?

    If I can ask for some pointers or ideas on this: Currently have a mix of 3502e and 3602e APs.  They are configured in auton. mode, so no WLC.  The same config across them has a native vlan of 1, vlans 10, 20, and 60.  These all are running off a stac

  • RAW not working Elements 4.0

    Hello...."All of a sudden" my RAW images will not open in the editor.  I'm using Elements 4.0, Camera Raw Plug-in (3.7.0.200), my camera> Nikon D80. The 3.7 plug-in is the latest that I'm aware of for a D80 using Elements 4.0.  Is there a newer versi

  • Any FM or other ways to open the Excel file with data

    Please provide some Help, where I need to open the excel File  with some static  data (header data) from the Selection screen application Toolbar on clicking the button Thanks Ravindra

  • Mise à jour logiciel IPhone 3Gs

    avec PC portable wifi je n'arrive pas à télécharger la mise à jour on m'annonce une durée de 74 minutes puis au bout de 30 minutes reste 44 minutes de téléchargement le téléchargement est coupé avec message "problème survenu lors du téléchargement du