Problem with the crystal reports XI

Portuguese
Boa Tarde, tenho um problema com o cristal reports XI.
ele esta em producao fazendo a consulta em um servidor mas quando eu acesso passando parametro connectionInfo.ServerName = <endereco do servidor> para um servidor de teste pelo VStudio 2005, ele nao busca os dados deste e continua acessando o servidor de producao.
gostaria de saber como consertar isso
English
Good afternoon, I have a problem with the crystal reports XI. him this in production making the consultation in a servant but when I access passing parameter connectionInfo.ServerName =  I address of the servant > for a test servant for VStudio 2005, he doesn't look for the data of this and it continues accessing the production servant.

Fabiano, here is what I understand of the issue:
1) You are using CR XI (I am not sure if release 1 or release 2)
2) you are using .NET 2005
3) you are trying to change the server name, but the report keeps giving you data from the original server
Please answer the following:
1) Are you using CR XI release 1 or release 2?
2) Can you change to the new server, using the Crystal Reports Designer?
3) Can you duplicate the issue on your development computer?
4) What Crystal Reports service pack are you on?
5) Are you connecting to the database using OLE DB?
Ludek

Similar Messages

  • CRVS2010 Beta - Problems with printing Crystal Reports for VS 2010

    Good afternoon,
    We have the following problem, we used the version of Crystal Reports that came integrated with visual studio for several years. But we are migrating to the version of Visual Studio 2010, and we are using the version of Crystal Reports for this same version, running on screen is correct, and run all the reports, but in print there is a failure we could not solve. Our customers use printers dot matrix as the "Epson LX300 +", but when you print the report leaves the impression defective in the previous version of Visual Studio 2005 "The impression is quite clear, we have attempted to overcome this problem with the options of PrintMode with activex and pdf in the CrystalReportViewer, and RenderingDPI option with multiple values. Obviously when using other types of printers such as laser or inkjet printing is perfect, but due to cost our customers use the printers mentioned. The server where the application is Windows server 2008 and client computers are windows xp, windows 7, windows vista. As network hardware and printers are working properly, and from other applications and from the other server with versions of Crystal Reports If anyone knows how to solve this problem I would like to receive support and ideas.
    Thanks
    Subject modified as per the sticky post at the top of this forum; [Crystal Reports for Visual Studio 2010 Beta - read before posting|Crystal Reports for Visual Studio 2010 Beta - read before posting;
    Edited by: Ludek Uher on Oct 11, 2010 3:42 PM

    I have a question about printing reports. We are using VS2008 and the CR reportviewer with printmode = ActiveX. Many of our users absolutely hate the number of steps they must go through and the time it takes to print a Crystal Report when printmode = PDF. In our environment several times per day, we need to produce hard copies of reports for legal reasons. Making the users first render the report, then had it off to Adobe to print simply takes too much time which is why we are using the ActiveX print control.
    We recently started looking at VS2010 and discovered the issue with the unbundling of Crystal Reports. We have not downloaded CR for VS2010 yet.
    My question is this: for VS2010, what happened to the ActiveX print control? I read somewhere that it was going to become some WPF-type thing but there weren't many details about that. So when a user clicks on the print button in the Crystal Report Viewer intended for VS2010, what can they expect? Can they still print straight to a printer (is there something that gives them this capabitliy like the Active X print control did?), or has that capability been deprecated and they have to go through PDF? Thanks in advance for any information you can give me.

  • Problem with the crystal viewer

    Hi there,
    I have a problem with thw crystal viewer. I have reports developped in Crystal XI that run in vb.net within the "CrystalDecision.Windows.Forms.CrystalReportViewer" object. On all computer client everything works fin except on one of them. When the print button is pressed, it gave a "Object reference not set to an instance of an object" error. Since this error is raised by the "Crystal report windows form viewer" preview window i have no idea why this occured. We tried to uninstall the viewer and reinstall it without chance.
    The only thing i can tell is that this client use a "HP deskjet 3420 series" printer. that's the only difference there is on this computer. Anyone as an idea?
    Thanks
    Ben

    Hi Ben,
    Try moving that printer to another PC and install the print driver. If it fails there it's likely a driver issue. HP and Cr has a history of problems. Mostly it's HP drivers returning the wrong memory structure size.
    If you can find someone who is using Windows XP and Windows 2003 and see if either work. Or possibly plug the printer ina print server and see if that works.
    Next option is if you wrote the software you are running run it in debug mode and see if it captures anything when printing. If did not write it then ask the person who did to test it also.
    Next option if you want to dig deeper into the cause is go to Windows site and download a program called DebugDiag. Run this program and set it to capture crashes. It will generate a dump file which can be analyzed. It should tell you which API or function caused the crash.
    Thank you
    Don

  • Default printer and problem with printing Crystal Report

    Good morning
    I have SAP B1 and on the client the default printer is "AMM_4014DN_PCL6_domain-srv FRONTE-RETRO"
    Then i have another printer "AMM_4014DN_PS_domain-srv".
    Before the default printer were the "AMM_4014DN_PS_domain-srv".
    Now the default printer is "AMM_4014DN_PCL6_domain-srv FRONTE-RETRO".
    When i push the button "Print" in the menu bar to print for example an invoice, instead of printing on the default printer AMM_4014DN_PCL6_domain-srv FRONTE-RETRO is always printing on then AMM_4014DN_PS_domain-srv.
    The report to print was made with Crystal Report 2008 and on the report I also set the correct default printer (AMM_4014DN_PCL6_domain-srv FRONTE-RETRO).
    So what's the problem ? Why is continue to print to the older printer ?
    So i also delete the older printer (AMM_4014DN_PS_domain-srv) and very strange still printing on the old printer.
    I also shut down the client, but no effect.
    The operating system of the client is Win Vista and SAP B1 is host on a Win2008 server.
    Thanks in advance.
    Regards Gabriele

    hi,
    Check this SAP Notes
    [1030589 - Printing preference in document printing|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303130333035383926]
    [1609615 - Obtain printer settings from default printing layout|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303136303936313526]
    regards,
    Fidel

  • Performance problem with Orcacle / Crystal reports 8.5 / ASP

    Hi,
    I have a performance problem with reports running crystal reports 8.5 with oracle databases.
    Fetching data appears to be slow. Oracle trace reports (tkprof) shows that fetchsize=1.
    Fetchsize in Oracle ODBC is 15 (default).
    How can I update te fetchsize in crystal reports?
    I would appreciate any help.

    CR XI R2 is also still available for purchase. This is the last version of CR to use the RDC. Contact sales at 866-681-3435.
    Make sure the installed versin is 11.5.12.1838 - if it is not, apply SP6:
    https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe
    MSM:
    https://smpdl.sap-ag.de/~sapidp/012002523100000634032010E/crxir2sp6_rdc_mm.zip
    - Ludek
    Edited by: Ludek Uher on Jan 4, 2011 10:05 AM

  • Problem showing the crystal report viewer in form after added the component on it

    Greetings
    I have a problem running a program. I created a form which I added the component Crystal Report Viewer perfecty but during program execution when I call that form my VS 2012 Ultimate show the following error:
    Translated:
    Failed to create the form. See Exception.InnerException for details. Error: An exception occurred in the type initializer for 'CrystalDecisions.Shared.SharedUtils'.
    Note: If I remove the component from the form. the applications runs fine when calling the form without the component CrystalReportViewer
    It is something related to my VS? o just that the actual version 13.0.9 is not yet compatible?

    Report.Show?
    How about you try:
    CrystalReportViewer1.ReportSource = <path to your report>
    Or:
    Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
    crReportDocument.Load(<path to your report>)
    CrystalReportViewer1.ReportSource = crReportDocument
    Or, if the report is added to the project:
    crReportDocument = New test
    CrystalReportViewer1.ReportSource = crReportDocument
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter
    Message was edited by: Ludek Uher

  • Problem with starting Crystal Report document from SAP Gui

    Dear all,
    in Crystal Reports I created my first report (based on a BW query), which is executed successfully, when I run it directly from CR or from Infoview. The report is stored directly in BW and has been published successfulyl to BOE.
    If I try to run it native from the SAP Gui, the following steps happen:
    Internet Explorer is started with the following link:
    http://dtcmbbwp01.ctc.ch.rcc:1080/sap/bw/ce_url?(ce_protcl):(DS)(ce_server)/(ce_path_pr)/viewreport.csp(Q)bw_id=4I4B2HQG8KK2ICFPONVIG5D9Q&sap_sysid=(sysid)&sap_client=010&language=EN&sap-client=010
    this link is transcoded to the following:
    http://dtcmbbwp01.ctc.ch.rcc:1080/sap/bw/=ce_protcl)%3a//MONHAMBO020.world.mon:8080%2fSAP%2fviewreport.csp(Q&sap_sysid=BWP&sap_client=010&language=EN&sap-client=010&sap-language=EN&cmsname=MONHAMBO020.world.mon
    (I already entered /CRYSTAL/CL_BW_HTTP_HANDLER handler in the ce_url service)
    and afterwards I get an error 404 -> corresponding service not available
    which is obvious, as a service =ce_protcl is not existing at alkl.
    If I then execute my CR document again from SAPGui (without closing the IE), the standard BOE login page for the infoview is displayed, but I get an error:
    Account information not recognized: The credentials passed to secSAPR3 [] are invalid. Use the following format: sid~clnt/user
    I can logon with my BW credentials, and afterwards I can see my CR document.
    Any idea, what went wrong?
    Thanks,
    Andreas

    Dear Ingo,
    the basic installation of all BOE components was done by the SAP installation service and I checked several times your blog(s) and the corresponding parts on the BOE server and in BW. From my point of view we did all necessary configuration steps on BOE and BW (/CRYSTAL/RPTADMIN) which are necessary to setup the BOE software and the connections.
    I checked again the HTTP handler and it still says:  /CRYSTAL/CL_BW_HTTP_HANDLER
    I stopped and restarted the service, but with no effect at all -> I do not think that I need a restart of the server, right?
    My user is as well existing on the BOE server and I can logon to the BOE with my SAP credentials.
    I guess as well that the key to the success is the HTTP handler. The first link I provided is the link that is shown in IE, before I logged on to the BW server and I think this is correct, as the transcodification is done after(!) I logged on to the BW server.
    A part of the transcodification is as well working, as I can see the replacement of my ce_server, sysid, etc. But it seems to me that the first part of the string is crap:
    http://dtcmbbwp01.ctc.ch.rcc:1080/sap/bw/=ce_protcl)%3a
    Any further ideas?
    Thanks and best regards,
    Andreas

  • Problem with Exporting crystal report to Excel

    Hi !
    I am new to crystal world. I have an application which has csp code. From the csp code (internal website) we invoke crystal using viewer.cwr to view or export reports. Last week we upgraded from Crystal 10 to Crystal Reports XI Release 2. Due to this upgrade we did some modification to the Viewer.cwr url ( Changed to Viewer.asp too). Now the View option is working fine but when the report is exported to an Excel the columns are squeezed up.
    Here is the code for the viewer.asp :
    ExcelWindow = window.open("http://servername/crystalreportviewers115/viewrpt.asp?id=" + id + "&apstoken=" + escape(token) + <%Response.Write("'"&sReportLogin&"'")%>'&promptex-REPORTDATE='pRptDate'&promptex-State='pState'&promptex-usertype='pUserType'&promptex-startreport='pStartpSelect'&cmd=export&export_fmt=U2FXLS:3&',"ExcelWindow", windowprops);                                                         
    Is there any way to solve this formatting issue ? I tried changing the export format option as "export_fmt=U2FXLS:4" but this pulled up the data with the report header and sub heading in one row. Please help. 
    Nandita

    Hi Kedalene,
    Please check below links.
    Microsoft Visual C++ Runtime Library:
    VC++ runtime error
    C++ Runtime Error when installing addons | SCN
    Hope this help
    Regards::::
    Atul Chakraborty

  • Problem With the BI reports iviews in EHP 1.0 for Maintenance

    Hi All,
    We are using EHP1.0. In the portal for BI report i have to make visible/Invisible the BI report iview According to user.
    Is it possible to remove all the active queries except the ones relating to notifications from the maintenance Tasks Iview? Could you provide a step by step please?
       In the Reports section and the Service Map section, there are many BI reports but the customer does not have BI.
    1)  How to hide these reports Iview by changing the launchpad ?
    2)  is it possible to do this globally so all users do not see these?
    Kindly help me with your valuble suggestion or document related to that issue.
    Prashant Krishen
    Edited by: prashant krishen on Oct 27, 2010 9:01 AM

    Why this behaviour. Why the "Classpath" entry should
    not be the last line in the manifest file.
    That is a question for the people at Sun. The behaviour is not specific to Class-Path. The last line of the Manifest is not read unless it ends with a newline.

  • Password is lost when I save the Crystal Report

    We use Crystal Reports v. 11.5.3.417, and our users access the crystal Reports using InfoView (Web Portal)
    We store the username and password inside the different Repor so the end-users of these reports don't have to know our database passwords in order to run the reports. (Oracle DB)
    We have 2 problems with our Crystal Reports
    1) Every time I change and the Save a report, the Password is lost, and I have to remember to go into the "Manage Object" and Process->Database and enter it again. It's really annoying to have to remember this every time we change a report.. Is there an option somewhere to avoid this?
    2) The password and username are occationly failing. When the users (accessing Crystal Reports through the Web Portal / Infoview) get an error message "Incorrect logon parameters..." The funny thing (actually not that funny) is that if I try to open the report like 10-15 times, just by clicking on the Crystal Report in the Infoview, it usually starts to work again. Some times after 5 clickes, and other times after 10-15 clicks. Its just not logical. Also when it starts working in my web-browser, it also start to work on our users browser as well.
    Every week I have to tell a couple of users to try like 10-15 times, but its not that funny to say this to a user.

    Hi   Roy Ingar Hansen,
    If  you think not to provide the password for your End user then we can  do that go into the "Manage Object" and Process->Database  enter the password  and Enable the option in :
    When viewing report:
    Use same database logon as when report is run.
    For the first time you need to enter the logon credentials and enable the option and click on update.
    It wont prompt for the password and it will not show password to your user's.
    If you have problems with Original database logon , then try with Custom database logon and update the option.
    Try with this...
    Regards,
    Naveen.

  • Welcome to the Crystal Reports Viewer XI Beta Forum

    <p>This forum is used to post any feedback, issues or comments you have with the Crystal Reports Viewer XI beta program. </p><p>The link to the beta program is located here: <a href="/betas/crviewerxi">http://diamond.businessobjects.com/betas/crviewerxi</a> </p><p>If you have any other questions please e-mail them to <a href="mailto:[email protected]">[email protected]</a> </p><p>Thanks for your participation! <br />Crystal Reports Viewer XI Beta Team</p>

    Hi
    We will fix this.
    The particular problem you noticed is one that we will be addressing with the RTM version of CR Viewer XI. We mentioned only Win XP was supported in the release notes âu20ACu0153For Technical Preview, the Crystal Reports Viewer XI is supported only on Windows XP in English.âu20AC
    Root Cause
    The root cause is that GDI+ is not installed already on Windows 2000. We will be changing our install to add it. However, if you would like to continue to use CR Viewer XI Tech Preview (we hope you will) => You can download and install GDI+ yourself: If you google âu20ACu02DCGDI+ Windows 2000 Microsoftâu20AC(tm) youâu20AC(tm)ll see the links Many thanksCR Viewer XI Tech Preview/Beta Team Ps We will be sending a survey to beta participants at the end of the beta period, and we look forward to your feedback in that survey. Â
    In particular, would you be willing to read through the Tech Preview release notes and see if any of the known issues have a big impact on your potential use of CR Viewer XI = that feedback in the survey will be very important for us [the release notes are available at http://diamond.businessobjects.com/node/3023 ]</span></font></p>

  • Windows 2008 problems with Delphi and the Crystal Reports VCL

    Anybody had any luck with Crystal XI using the VCL on a Windows 2008 machine?
    In testing we've found that everything seems to work, except that the user can not select a different printer.  When I go to the Printer Setup button, the panel that pulls up used to have, in previous Windows versions, a printer button inside the Printer Options box.  Windows 2008 does not, so the end user can not select a different printer to print to than their default.
    Anybody have any ideas on:
    1) Am I just doing somthing wrong
    2) A fix for the Crystal XI VCL that will address the probelm
    3) An option on how to call Crystal Reports from inside a Delphi program without the VCL?
    Obviously, I'm hoping I don't have to go with #3, but if that's the only solution I guess I need to know now.
    Mike Nielsen

    Hi Mike,
    Try these links:
    https://www.sdn.sap.com/irj/boc/businessobjects-samples?rid=/webcontent/uuid/80774579-b086-2b10-db91-ed58c4dda375
    If that link doesn't work try this one:
    https://www.sdn.sap.com/irj/boc/businessobjects-samples
    Then click on the Crystal Reports .NET SDK link.
    Gets you to the .NET downloads and you should see this, try the RAS samples, gives you the most functionality:
    Crystal Reports .NET SDK Applications
    All Sample Applications
    All | Exporting/Printing | Report Modification | Viewing | Home
    Report Application Server .NET Sample Code Code Sample(ZIP 177 KB)
    Contains Visual Studio 2005 Web sample code pages that highlight features of the RAS SDK, including report parameter and formula modification, database logon, and exporting.10 Oct 2008
    NET-CS2005_CRNET_CR115_Set_Viewer-Locale-by-Page Code Sample(ZIP 51 KB)
    This sample shows you how to change the multilingual settings for the .NET web form viewer control (CrystalReportViewer) to any locale of your choice. The locale is set via a QueryString variable. The settings are changed on the webform page level instead of using the web.config. Changing the Regional Settings or IE Language Settings will not impact this sample. Note: This has only been tested on Crystal Reports XI R2 with Visual Studio .NET 2005.14 Jul 2008
    NET-CS2003_RAS-Unmanaged_CR115_Modify_Command-Table-SQL Code Sample(ZIP 31 KB)
    "This sample application shows how to retrieve and change the text of a SQL command table from a Crystal Report using the CR .NET SDK and in-process Report Application Server (RAS) Report Creation API (RCAPI). Note that you must have SP2 for Crystal Reports XI R2 for this sample to work. Previously you could access the RAS .NET SDK from the ReportDocument object only if you had a dedicated RAS server. Now you can use RAS in-process to accomplish this. "05 Mar 2008
    NET-CPP-Win2005_CRNET_CR115_Change_Record-Selection-Formula Code Sample(ZIP 3 MB)
    A .NET C++ Windows application that demonstrates how to change a record selection formula at runtime.03 Mar 2008
    Crystal Reports 2008 .NET SDK Tutorial Samples Code Sample(ZIP 2 MB)
    This sample contains Visual Studio 2005 Web sample code projects that highlight features of the Crystal Reports .NET SDK, including viewing and exporting reports, filtering data and setting parameters, and connecting to different data sources.19 Feb 2008
    NET-CS2005_CRNET_CR115_Modify_Image-Location Code Sample(ZIP 90 KB)
    This sample application shows how to change an image in a Crystal Report at runtime using the graphic location formula in the CR .NET SDK (C#).16 Feb 2008
    NET2003-CS-Web_CRNET_CR115_change_graphic-location Code Sample(ZIP 103 KB)
    This sample application shows how to change an image in a Crystal Report at runtime using the graphic location formula in the CR .NET SDK (C#).31 Jan 2008
    Crystal Reports .NET SDK u2013 Sample Applications from Tutorials Code Sample(ZIP 1 MB)
    This file contains C# and VB .NET Windows and web sample applications. These samples were built using the tutorials provided in the u2018Crystal Reports .NET SDK u2013 Additional Documentation and Tutorialsu2019 (cr_net_sdk_additional_en.zip). These sample applications apply to Crystal Reports 9 and 10, and Crystal Reports for Visual Studio .NET 2002 and 2003.10 May 2006
    Thanks again
    Don

  • Problem printing duplex even though it's saved in the Crystal Report.

    I'm using VS.NET 2010 with Crystal Reports 13.0.10.1385
    We have a set of Crystal Reports that were created with Crystal 8.5 and they print duplex and the printer and printer preferences are saved with each Crystal Report.
    The problem is this, I'm pulling in these reports to my VS.NET 2010 Project using Crystal Report Viewer and it will not keep the printer preferences when you print the report.  Why, it works using VB6.0?  The only way I can get it to print duplex is to manually set the printer preferences before printing the report.

    Hi Bill,
    Update the reports to CR 2011 or above then that info should be saved. If not add this line of code to your app:
    rpt.PrintOptions.PrinterDuplex = PrinterDuplex.Default; // you can change the last value
    Or if using RAS use this:
    CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions RASPO = new CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions();
    RASPO.PrinterDuplex = CrPrinterDuplexEnum.crPrinterDuplexSimplex;
    And comparing RDC to .NET doesn't work. RDC used COM and DEVMODE, .NET uses the System.Printer API set.
    Don

  • How to stop printing the crystal report with an alert message

    I am having a field called "APPROVAL" in my stored procedure with which I prepared the CR. I want that if the value in the filed is 'A' then only the crystal report should print else it should prompt with an alert message.

    Hi Sreejith,
    Check this helps you:
    Create an alert from "Report  -> Alerts -> Create or Modify Alerts" with below steps:
    1. Provide name of the alert (say Alert1)
    2. Click on X+2 in front of "Message" field and write the Alert message you want to display.
    3. Click on Condition button and write the condition If not({APPROVAL}='A') then true;
    The above Alert will prompt with configured alert message when {APPROVAL} field is not having value of 'A'
    Now, in a formula, write below content and display it where you want to display the APPROVAL field value:
    If {APPROVAL} = 'A' then
              {APPROVAL}
    This formula content will be blank if the value of {APPROVAL} is not 'A'
    Thanks,
    Raghavendra

  • 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

Maybe you are looking for

  • Set up disk freezing

    My set up disk (for i-Pod & i-Tunes) freezes in the middle of the download. Never used to. Is it a disk problem, or my PC?

  • Keyboard issues after OS X update

    Sine updating to OS X 10.9.4 yesterday, I've been unable to type the letter "c". It still works for keyboard shortcuts etc (command + c still works to copy) but it does not work while typing. Does anyone have any ideas for a fix for this?

  • How to delete "Others" to free up storage?

    The storage of my 32G iphone4S is almost full. However, when I connect with iTune, I can see that 9G of these are showing in yellow as "Others" which I cannot delete. What can I do to delete these "Others" to free up the storage? Thanks!

  • Emails disappear from inbox when forwarded

    I have an iPhone 4S with Verizon service. The phone was set up as new. When I forward an email from the inbox to someone, the original email being forwarded disappears from the inbox. In all other mail applications I have used, the original email sta

  • Watching videos on iPhoto 11

    Hi I recently upgraded to iPhoto 11. With my older version of iPhoto I was able to pause the video I was watching and then hit the right arrow button on my keyboard to advance the video frame by frame. I can no longer do this with iPhoto 11, when I p