Limitation on data passed to Crystal Report

Hello, I have a very basic question that I cannot find the answer to in the manual or online.
We are pulling data from a SQL 2005 database.  Specifically, we are querying information that contains very complicated legal instructions - the equivalent of two dozen pages of text.
We are finding that the data is being truncated once it reaches the report to about 7 pages....
Is there a limit on the amount of data Crystal Report XI can bring across from a single record. Or is this a limitation of the report itself? I am working with the developers who are struggling to make this work correctly and I am trying to get to the bottom off this.
Thanks for your time!
Dirk

I believe there is a limit to the length of string Crystal can work with, although I can't remember what it is off the top of my head, but probably 65534 characters - once upon a time it was 256 characters!
You could try working around this limitation by creating a few formulas, grabbing, say, the nth 1000 characters and storing it into a variable.
eg:
stringvar part1:=left(YourField, 1000);
stringvar part2:=mid(YourField, 1001, 2000);
stringvar part3:=mid(YourField, 2001, 3000);
etc...
Of course, you could wrap that up in a loop to automate it if you'd prefer.
Then, create a formula for each of the above "part(x)" variable to display the contents:
//Formula @show_part1
stringvar part1
//Formula @show_part2
stringvar part2
etc...
Finally, drop each of these "show" formulas into a single textbox and hopefully, you should get what you need.
If not, chop it up in the SQL command/view/whatnot and return it as seperate columns and concat them in a similar textbox fashion?
Let us know how you get on...
Ta,
J

Similar Messages

  • Writing and including our own customer data source to Crystal Report Design

    Hi,
    I need to create a Crystal Report based on a locally stored XML and schema. I can do this but the issue Iu2019m facing is that some tags used in the schema and the format is not supported by Crystal. So my plan is to write a database driver which will take our format and then convert it to the format Crystal supports and vise versa. To do this before writing the driver I need to know if itu2019s possible to include my custom database driver source in to the list that is shown in the Crystal Report Designer when selecting a data source to create a report.  Is there such an API available so that I can plugin my data source to Crystal Report Designer? Is this at least possible to do or is there another way?
    Hope you can help me.
    Thanks you in advance.
    Regards,
    Chanaka

    Hi Chanaka,
    Not directly. If you base your driver on OLD DB or ODBC then it will show up in those lists.
    If you are planning on selling a lot of packages then you may want to contact our OEM Sales team and sign up. You'll have more resources to do customized features like this. Not sure if we can but the option is there.
    Thank you
    Don

  • Reading data from a crystal report using crystal for eclipse

    tried both approaches listed here: [Help needed in reading data from a Crystal Report]
    but having the same issues, is this a bug or is there some workaround? cant get any results with rowsetcursor and only the first 100 no matter what i do with browsefiledvalues

    Hello,
    I have the same problem. I need to know values of last record in CrystalReports and i got only 100 records.
    Have you found solution for this problem?

  • How Do I Display HTML Formatted Text From A Data Table In Crystal Reports?

    I'm creating reports in Crystal XI.  The information being displayed in the reports comes from data tables where the text is formatted in HTML.
    I've worked with Crystal Reports enough to know that HTML text pulled from a data table doesn't appear in Crystal the same way it does in a web browser.  Crystal Reports ignores all the tags (...unless I'm missing something...) and just displays the text.
    Someone far more Crystal savy than I (...who I don't have access to...) came up with a Formula Field workaround that tricks Crystal Reports into displaying some basic HTML tags.  Here's that workaround:
    <!--
    stringVar TableName := ;
    TableName := Replace (TableName, "<ul>","<br> <br>");
    TableName := Replace (TableName, "<li>", "<br>   &bull; ");
    TableName := Replace (TableName, "</li>", "");
    TableName := Replace (TableName, "</ul>","<br> <br>");
    TableName := Replace (TableName, "<a", "<u><font color='blue'");
    TableName := Replace (TableName, "</a>", "</font></u>");
    TableName
    -->
    QUESTION - Does any similar workaround exist so I can display an HTML Table in Crystal Reports?  If not, is there any way to display HTML formatted text from a data table in Crystal Reports as it would appear in a web browser?

    Hi Steven,
    To display html text in Crystal Reports follows these steps.
    1. Right click on the field and select Paragraph tab.
    2. Under 'Text Interpretation' select 'HTML Text' and click OK.
    I have tried using the way,but it never works.So reply me if there is any way to solve the issue

  • How to register/configure a Data Provider with Crystal Report Designer

    Hi,
    Iu2019m in the process of developing an ADO .Net XML Data Provider which works with Data Sets. I want to use this custom Data Provider through Crystal Report Designer 2008 so that I can access it from the u201CStandard Report Creation Wizard\Available Data Sourcesu201D section. How can I do this? I read the following in the u201Ccreating custom adddins.docu201D documentation.
    u201CCrystal Reports (CR) 2008 installs a new managed dll called DotNetExternalCommandAdapter.DLL and installs it into the Global Assembly Cache (GAC).  CR 2008 uses this dll to search and load files with a csc prefix in CR 2008u2019s AddIns subdirectory in a similar way it looks for database drivers, export drivers and UFLs. To create an Add-In the developer needs to reference this dll and inherit two classes from it, ICommand and ICommandDLL.u201D
    I have the following questions,
    1) As it mentions above how can I make Crystal find my custom Data Provider when it searches for the database drivers?
    2) Is there another class I can inherit from when creating my custom data provider? If so where can I find some documentation regarding this?
    3) Can I register my custom data provider in to the GAC and will Crystal find it if so how can I register my custom Data Provider? Will GACUtil work for Crystal as well?
    Thanks in Advance,
    Regards,
    Chanaka

    Baron, thank you for providing that link.
    Chanaka see if that article helps you out. It should - had I got to this thread earlier, I'd have sent that link also. Certainly DE place to start.
    Ludek

  • How to hardcode date(s) in Crystal Reports?

    Post Author: Vishy
    CA Forum: Formula
    Hi,
    Any one have any idea about, how to hardcode the date(s) in Crystal Reports?
    For example, I want hardcode the US holidays in my Crystal Report.
    I am using Version 9.0.
    Your immediate help is greatly appreciated
    Thanks,
    Vishy

    Post Author: chantilly
    CA Forum: Formula
    Not sure I'm the best person to answer because I seem to be experimenting in my own inexperience.  What I would try first would be to create variables for each of the holidays and pull them into the report.  Such as
    dateVar Christmas := Date (2007, 12, 25);Christmas
    I think you can then perform more calculations on it, such as to find how many days etc.

  • Hierarchical Data Source in Crystal Reports Options

    We are trying to use Crystal Reports in VS2005 and set the data source
    to a list of our objects.
          Dim list As New BindingList(Of Payslip)
          Dim Report2 As New CrystalReport2()
          Report2.SetDataSource(list)
    This works fine when we are just considering the Payslip class in
    isolation. However we have a property on Payslip which contains a list
    of another class Element.
       Public Property Elements() As BindingList(Of Element)
          Get
             Return _Elems
          End Get
          Set(ByVal Value As BindingList(Of Element))
             _Elems = Value
          End Set
       End Property
    We would like to be able to display the Elements in the report, in a
    sub report ideally. However we cannot find a way of doing this. We can
    tell Crystal Reports how to link an Element to a PaysSlip, but not how
    to get to the Elements in the first place (i.e. by going through the
    property called Elements).
    How can we achieve this?

    The fundamental data model of Crystal Reports is relational and not object hierarchial.
    Are you able to transform the object hierarchy to a relational model?
    Sincerely,
    Ted Ueda

  • Passing input Dates in a Crystal Report

    Post Author: Preethig
    CA Forum: Older Products
    Hi all,
    I am using Crystal reports 8.5 to develop my report. I use the the Crystal report Enterprise Version 8.0 to view my reports in the IE 6.0 Web browser.I communicate to the Crystal Enterprise through my Active Server Pages.(ASP 3.0)
    From my asp page redirect to the urlI use response.redirect
    Here is an example URL:
    http://Domain/Directory/Report.rpt?&prompt0=Valuemy url request is
    Response.Redirect("report.rpt?&prompt0=" & some random value & "&prompt1=" & DateField & "&prompt2 =" & DateField  )
    and I use "sf " query string parameter for passing new selection criteria
    There are three parametes defined in the Crystal report
    Prompt0 - To accept a Number
    Prompt1 - To accept a Date
    Prompt2 - To accept a Date
    Problem: Even after passing the input date parameters as the parameter values for the parameter "Prompt1" and "Prompt2" in my Active Server Page, on launch of the Crystal report in the Crystal enterprise Viewer, the Crystal reports' Dialog still prompts the user to give input dates.
    Need Solution for: I should be able to pass the date parameter values from the ASP page and susequently, the crystal dialog should not be prompted to get the input dates.Kindly suggest a solution.
    Thanks in advance!!Preethi

    Well, can you please post the details about your stored proc?
    <quote> I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No.</quote>
    Question: What do you mean by that? How many times did you run the report?
    More details please.
    -Raj Suchak
    [email protected]

  • 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

  • JRC bug: apostrophe in string parameter passed to Crystal Report with Command datasource to SQL Server

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

  • How to create a report using XML data source from Crystal Report Designer

    Hi,
    Iu2019m having Crystal Report Designer XI R2 SP4. Iu2019m trying to create a report using XML data source stored on disk. This is a customer order report and the xml is structured in such a way that it has an order details header part (master) and then it has several order lines (detail). One order line can have several order line characteristics (detail-detail). So what I need to know is now I can design this layout from the designer. If this was done using views I can do it with sub-reports but using xml data this seems to be different. Can you help me to design this layout? I have included the xml and xsd as well.
    Thank you in advance.
    Regards,
    Chanaka
    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER_ORDER_CONF_REP_REQUEST xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep">
        <CUSTOMER_ORDER_CONF_REP>
            <ORDER_NO>D555809</ORDER_NO>
            <PRINTED_DATE>2009-03-26T08:52:54</PRINTED_DATE>
            <AUTHORIZE_NAME>Chanaka</AUTHORIZE_NAME>
            <CUSTOMER_NO>CU-1473-INV</CUSTOMER_NO>
            <CUST_NAME>Mr.Johan Matts</CUST_NAME>
            <SHIP_ADDR_1>93,Main Street</SHIP_ADDR_1>
            <SHIP_ADDR_2>Negambo Road</SHIP_ADDR_2>
            <SHIP_ADDR_3>Watthala</SHIP_ADDR_3>
            <SHIP_ADDR_4>SRI LANKA</SHIP_ADDR_4>
            <BILL_ADDR_1>93,Main Street</BILL_ADDR_1>
            <BILL_ADDR_2>Negambo Road</BILL_ADDR_2>
            <BILL_ADDR_3>Watthala</BILL_ADDR_3>
            <BILL_ADDR_4>SRI LANKA</BILL_ADDR_4>
            <CUSTOMER_PO_NO>112984638</CUSTOMER_PO_NO>
            <CUSTOMER_FAX>112984639</CUSTOMER_FAX>
            <CUSTOMER_EMAIL>abcbababab</CUSTOMER_EMAIL>
            <ORDER_LINES>
                <ORDER_LINE>
                    <LINE_NO>1</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP11</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>iPod</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1200</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID xsi:nil="1"/>
                            <CHARACTERISTIC_VALUE xsi:nil="1"/>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>2</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP24</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>XGA Projector</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1500</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>3</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Instalation</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>3</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP02</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony DVD Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1000</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1000</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free 5 DVDs</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>4</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP99</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Flatscreen TV</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1350</PRICE_TOTAL>
                    <DISCOUNT>10</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Delivery</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>1 year additional warranty</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>5</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP56</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony MP3 Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>400</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>2</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free carry belt</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free promotional 4GB memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>3</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>No warranty on memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
            </ORDER_LINES>
        </CUSTOMER_ORDER_CONF_REP>
    </CUSTOMER_ORDER_CONF_REP_REQUEST>
    XSD
    <?xml version="1.0" encoding="UTF-8"?>
    <?report  module="ORDER" package="CUSTOMER_ORDER_CONF_REP" ?>
    <xs:schema targetNamespace="urn:ifsworld-com:customer_order_conf_rep" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER_ORDER_CONF_REP_REQUEST">
    <xs:complexType>
    <xs:all minOccurs="1" maxOccurs="1">
    <xs:element name="CUSTOMER_ORDER_CONF_REP">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="50">
    <xs:element name="ORDER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PRINTED_DATE" type="xs:dateTime" nillable="true" minOccurs="0"/>
    <xs:element name="AUTHORIZE_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PO_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUST_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_FAX" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_EMAIL" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINES" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="ORDER_LINE">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="39">
    <xs:element name="LINE_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SALE_UNIT_PRICE" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_TOTAL" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="DISCOUNT" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_QTY" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="CUSTOMER_PART_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PART_DESC" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINE_CHARACTERSTICS" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="CHARACTERISTIC_ITEM">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="6">
    <xs:element name="CHARACTERISTIC_ID" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CHARACTERISTIC_VALUE" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:all>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Hi Sourashree,
    Thank you for the response and ideas you have given me so far. I can get the fetch the data from the data source without any problem. That is I do the following,
    1.     New Report
    2.     From Create New Connection-> XML
    3.     Provide the u201CLocal XML Fileu201D and have u201CSpecify Schema Fileu201D checked -> Next
    4.     Provide the u201CLocal Schema Fileu201D  -> Finish
    Then I can see the following under XML
    + CUSTOMER_ORDER_CONF_REP_REQUEST
            CUSTOMER_ORDER_CONF_REP_REQUEST
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    And from here if I add the following three I can get all the fields I need to the report
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    Then I come to the Linking section. Here I canu2019t link anything. There is a common field called u201CInternal_IDu201D but I canu2019t link using it. So I get a message when I click Next. From here I add all the fields.
    For this point onwards only I need help. How do I group, add fields and design the layout so I can get an report output as follows.
    Date
    Order number                                   Authorized code
    Customer No
    Name
    Phone
    Fax email
    Shipping address 1                              Billing Address 1
    Shipping address 2                              Billing Address 2
    Shipping address 3                              Billing Address 3
    Shipping address 4                              Billing Address 4
    Order Line 1 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026                      LINE_NO     CUSTOMER_PART_NO          CUSTOMER_PART_DESC     SALE_UNIT_PRICE     PRICE_QTY     DISCOUNT     PRICE_TOTAL
    Characteristic details belonging to Order line 1       CHARACTERISTIC_ID 1  CHARACTERISTIC_VALUE1
                                           CHARACTERISTIC_ID 2  CHARACTERISTIC_VALUE2
                                           CHARACTERISTIC_ID 3  CHARACTERISTIC_VALUE3
    Order Line 2 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 2
    Order Line 3 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 3
    Order Line 4 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 4
    Order Line 5 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 5
    How can I achieve this kind of a layout using the give xml and xsd? Should I use grouping if so how should I do the grouping?
    I have included the full xml and xsd in the first mail I posted but I canu2019t see it now. I can include that again if you want.
    Regards,
    Chanaka

  • How to show arabic data in to crystal reports ?How to aligh crystal report right to left

    <p>we are trying to make a crystal report for both english and arabic..All the arabic data is stored in data base tables.And for arabic screens we need tables and datas come right to left.. </p><p>1)How can we get the arabic data and right to left alignment in crystal reports? </p><p>2)Is thee any direct method to change the report alignments? </p><p>can u please send some sample codes. </p><p>we are using java version= 1.5 </p><p>database using =Oracle 9i </p><p>char set we are using for arabic= CP1256</p><p> Tomcat using=4.1 </p><p>we are using Crystal Reports11 </p><p>We are not having seperate rpt files for reports. we are making each Sections and adding this sections to FieldObjet to make the report dynamically. A sample Employee report in english is attached..Can u instruct how can i get this report in arabic assuming all datas are stored in database. </p><p><br />import java.awt.BorderLayout;<br />import javax.swing.JFrame;<br />import com.crystaldecisions.ReportViewer.ReportViewerBean;<br />import com.crystaldecisions.sdk.framework.CrystalEnterprise;<br />import com.crystaldecisions.sdk.framework.IEnterpriseSession;<br />import com.crystaldecisions.sdk.occa.managedreports.IReportAppFactory;<br />import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;<br />import com.crystaldecisions.sdk.occa.report.data.;<br />import com.crystaldecisions.sdk.occa.report.definition.;<br />import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;<br />import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;<br />import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;<br />public class ReportSample {<br /> ReportClientDocument rptDoc=null;<br /> int fldTop=0;<br /> int fldWidth=1440;<br /> int fldHeight=400;<br /> int pageWidth=11500;<br /> ReportSample(){<br />  try{<br />   IEnterpriseSession oEnterpriseSession= CrystalEnterprise.getSessionMgr().logon("Administrator", "","zzzza","secEnterprise");<br />   IReportAppFactory oReportAppFactory = (IReportAppFactory)oEnterpriseSession.getService("", "RASReportService");<br />   rptDoc = oReportAppFactory.newDocument(java.util.Locale.ENGLISH);<br />   Table oTable = new Table();<br />   oTable.setConnectionInfo(getConnectionInfo("zzzzz","zzzz","zzz", "zzz"));//Connectin to oracle database<br />   oTable.setName("EMP1");<br />   rptDoc.getDatabaseController().addTable(oTable, null);<br />         String[] columnName={"EMPNAME"};<br />       Section dtlSection=(Section) rptDoc.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0);<br />   int fldLeft=100;<br />   for (int i=0;i<columnName.length;i+)<br />   {<br />    <br />    dtlSection= (Section) rptDoc.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0);<br />     try{<br />     FieldValueType fldValueType = FieldValueType.stringField;<br />     String javaDataType="String";<br />      add_db_field(<br />      dtlSection, <br />     oTable.getName()"."columnName<i>, <br />     fldValueType,javaDataType,<br />     fldLeft, fldTop, fldWidth, fldHeight);<br />     }catch(Exception e){<br />      e.printStackTrace();<br />     }<br />    fldLeft = fldLeftfldWidth;<br />   }<br />   <br />       <br />   try { <br />          //Create and set up the window.<br />          JFrame frame = new JFrame("ReportsViewer");<br />          frame.setTitle( "Crystal Reports Viewer");<br />          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br />          ReportViewerBean viewer = new ReportViewerBean();<br />          viewer.init( new String[0], null, null, null);<br />          IReportSource rptSource = rptDoc.getReportSource();<br />          viewer.setReportSource( rptSource );<br />          frame.getContentPane().add( viewer, BorderLayout.CENTER );<br />          frame.setSize( 700, 500 );<br />          frame.setVisible(true);<br />          viewer.start();<br />   }catch(Exception e)<br />    {<br />     e.printStackTrace();<br />    }</p><p>   }catch(Exception e)<br />   {<br />    e.printStackTrace();<br />   }<br /> }<br /> public ReportObject add_db_field(Section oSection, String field_name, <br />   FieldValueType oFieldValueType,String fldDataType,<br />   double x, double y, double w, double h)<br /> throws ReportSDKException<br /> {<br />  DBField oDBField = new DBField();<br />  oDBField.setName(field_name);<br />  oDBField.setType(oFieldValueType);<br />  FieldObject oFieldObject = new FieldObject();<br />  oFieldObject.setDataSource(oDBField.getFormulaForm());<br />  oFieldObject.setFieldValueType(oDBField.getType());<br />  IndentAndSpacingFormat indentSpacing = new IndentAndSpacingFormat();<br />  IStringFieldFormat stringFieldFormat = oFieldObject.getFieldFormat().getStringFormat();<br />  stringFieldFormat.setIndentAndSpacingFormat(indentSpacing);<br />  oFieldObject.getFieldFormat().setStringFormat(stringFieldFormat);<br />  rptDoc.getReportDefController().getReportObjectController().add(oFieldObject, oSection, -1);<br />  return oFieldObject;<br /> }<br />  public ConnectionInfo getConnectionInfo (String new_username, String new_password, String new_dsn, String new_database)<br /> {<br />  <br />      ConnectionInfo oConnectionInfo = new ConnectionInfo(); // Make a copy, don&#39;t change the original.<br />      PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();<br />      oPropertyBag1.put("QE_ServerDescription", new_database);<br />   oPropertyBag1.put("Database DLL", "crdb_oracle.dll" );<br />   oPropertyBag1.put("DSN", new_dsn);<br />   // Set new table logon properties attributes<br />   PropertyBag oPropertyBag2 = new PropertyBag();<br />   oPropertyBag2.put("Server", new_database);<br />   oPropertyBag1.put("QE_LogonProperties", oPropertyBag2);<br />   oConnectionInfo.setAttributes(oPropertyBag1);<br />   oConnectionInfo.setUserName(new_username);<br />   oConnectionInfo.setPassword(new_password);<br />   // The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).<br />   oConnectionInfo.setKind(ConnectionInfoKind.CRQE);<br />   return oConnectionInfo;</p><p>  }<br /> public static void main(String[] args) {<br />  // TODO Auto-generated method stub<br />  new ReportSample();<br />  //String cmsName = "admin-42cdvir7e(2)";<br />  <br />  <br />  <br /> }<br /> </p><p>}<br /></p>

    <p>This issue can be  solved when you create the reports without needing to write any extra code.  I haven&#39;t tested this solution because I don&#39;t have any data to test it against.</p><p>First you want to make sure that you are using a UNICODE font which I&#39;m sure you are probably already doing.  Then to configure the "Right to Left" you can right click on any field and select "Format Text" or "Format Field".  You should see a "Paragraph" tab.  In there you can set the content to be "Left to Right" or "Right to Left".  The button on the right allows you to make this setting conditional on a parameter value or something like that.  I hope this helps. </p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • Help needed in reading data from a Crystal Report

    I am trying to read data values from a saved crystal report. (groovy code snippet below)
    I open a new ReportClientDocument and set the RAS using the inprocConnectionString property.
    Then I get the rowsetController and set defaultNumOfBrowsingRecords, rowsetBatchSize and maxNumOfRecords all to 1000000
    Using the browseFieldValues method after that returns only 100 records. I want to get all.
               ReportClientDocument clientDocSaved;
           def pathout=rc.pathToSavedReports+rr.path;
         //****** BEGIN OPEN SAVED SNAPSHOT ************
         clientDocSaved = new ReportClientDocument();
         clientDocSaved.setReportAppServer(ReportClientDocument.inprocConnectionString);       
            // Open report
         println("Reading file in.")
         clientDocSaved.open(pathout, OpenReportOptions._openAsReadOnly);
           def rowsetController = clientDocSaved.getRowsetController()
         rowsetController.setDefaultNumOfBrowsingRecords(1000000)
         rowsetController.setRowsetBatchSize(1000000)
         rowsetController.setMaxNumOfRecords(1000000)
         //setup metadata
         IRowsetMetaData rowsetMetaData = new RowsetMetaData()
         Fields fields =  clientDocSaved.getDataDefController().getDataDefinition().getResultFields()
         rowsetMetaData.setDataFields(fields)
         def values = rowsetController.browseFieldValues(fields.get(0), 1000000)
         values.each{value->
            println(value.displayText(new Locale("ENGLISH")))
    Before using the browseFieldValues method I was trying to use a rowsetCursor
                //get the rowset cursor to navigate through the results
                RowsetCursor rowsetCursor = clientDoc.getRowsetController().createCursor(null, rowsetMetaData)
                //navigate through the rowset and log the name and value
                rowsetCursor.moveTo(0)
                while(!rowsetCursor.isEOF()){
                     Record currentRecord = rowsetCursor.getCurrentRecord()
                     //println("current record number: " + rowsetCursor.getCurrentRecordNumber())
                     for(int i=0;i<fields.size();i++){
                          //println("Column - "+fields.get(i).getName())
                          if (currentRecord.size()>0){
                              println(currentRecord.getValue(i))
                     rowsetCursor.moveNext()
    the currentRecord was always an empty list and I did not get any data values at all.
    Am I missing something in using these approaches?
    I'm fairly new to using the Java SDK for CR. Any help will be greatly appreciated.
    Thanks

    hi, I am trying this second method to read the values from report. but all the records comming as null. Kindly help me to resolve this issue.

  • 2.5 GB CSV file as data source for Crystal report

    Hi Experts,
        I  was asked to create a crystal report using crystal report as datasource(CSV file that is pretty huge (2.4Gb)). Could you help with me any doc that expalins the steps mainly with data connectivity.
    Objective is to create Crystal Report using that csv file as data source, save the report as .rpt with the data and send the results to customer to be read with Crystal Reports Viewer or save the results to PDF.
    Please help and suggest me steps as I am new to crystal reports and CSV as source.
    BR, Nanda Kishore

    Nanda,
    The issue of having some records with comma and some with a semi colon will need to be resolved before you can do an import. Assuming that there are no semi colons in any of the text values of the report, you could do a "Find & Replace" to convert the semi colons to commas.
    If find & replace isn't an option, you'll need to get the files separately.
    I've never used the Import Export Wizzard myself. I've always used the BULK INSERT command
    It would look something like this...
    BULK INSERT SQLServerTableName
    FROM 'c:\My_CSV_File.csv'
    WITH (FIELDTERMINATOR = ',')
    This of course implies that your table has the same columns, in the same order as the csv files and that each column is the correct data type to accept the incoming data.
    If you continue to have issues getting your data into SQL Server Express, please post in one of these two forums
    [Transact-SQL|http://social.msdn.microsoft.com/Forums/en-US/transactsql/threads]
    [SQL Server Express|http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/threads]
    The Transact-SQL forum has some VERY knowledgeable people (including MVPs and book authors) posing answers.
    I've never posed to the SQL Server Express but I'm sure they can trouble shoot your issues with the Import Export Wizard.
    If you post in one of them, please copy the post link back to this thread you I can continue to to help.
    Jason

  • Use XML as data input for Crystal Report for Eclipse

    Hi,
    I am completely new to crystal report and please kindly forgive me if I ask some stupid questions.
    Actually, I have searched the forum for the topic and found some related threads, but I still want to
    have some responses from crystal report experts on this issue.
    Our developer tool is IBM RAD 7.0 and it has crystal reports tools installed in it. I want to use
    crystal report to solve one of our business solutions. I have the following questions about the
    feasbility of this solution:
    (1). I need to specify data at runtime during report generation. I think using fixed data source
         (for example, SQL query or Stored Procedure) may not fit our needs. I think if crystal report
         can accept XML as input to generate reports at runtime, then it will be perfect. Can CR
         use XML as data source as input?
    (2). Actually, one of our business requirements is to generate a letter. Can CR do a report
          layout such that a letter format can be achieved? If yes, would you let me know the
          report layout name?
    (3). We need to export the report into PDF format, I know CR can do PDF output. But can
          CR be controlled to export this into bytes stream? Or the PDF must be saved into a
          physical file?
    (4) If I need to learn more about CR, which book will you recommend?
    Thanks in advance for your advice,
    Raymond

    Thanks for the help Ted
    Works like a charm now.
    Or atleast my very very simple XML report works.
    Now I just need to play around and see what I can do and what I cant.
    I just want to make sure I understand how this works.
    1) I start of with a XML file (or URL or other data source as explained in your BLOG)
    2) I then have to create blank report which will have its data source set to my XML file.
        This report (rpt file) will always have its data source set to the original XML location
    Can this be dynamically changed, or does a new rpt file need to be created each time
        (or atleast I will have to re-run "CreateXMLInlineSchemaReport" from your BLOG)
    3) I can now use this rpt file as I would any other rpt file but its data source will be the original XML file
       - If I update or change the XML file, the report will dynamically reflect these changes.
    4) To change the data source, I need to recreate a new rpt file as per point 2. Which will now be blank.
    5) Filtering.... if I want to filter the XML data do I use normal parameters. If I want to filter the data before
        I pull it do I need to change anything. In otherwords if I have a XML file with 1000 records, but I only want say
    5 of them, how do I only pull those 5 without first pulling the whole 1000 records. Hope that makes sense.
    As I said I am very new to this so some things still fly over my head, but I do play around abit so hopefully
    will find what I am looking for.
    Cheers
    Darren
    PS any other links to info on creating and running reports of XML data sources would be greatly appriciated

Maybe you are looking for

  • New Content Editor not displaying website with CSS

    I am sure I am doing something wrong, but I just am not sure where to start. I am able to edit my website under the old InContext editor and it displays just fine: However, when I try using the new Content Editor, this is what I see: What am I doing

  • Sync my iCal in between iPhone and Outlook 2010 on Win7

    Hi, I have an iPhone4 running iOS5.1.1 (as of today) and an iCloud account. My iPhone calendar (iCal) is synched with iCloud calendar. My business PC is running Win7 and Outlook 2010. My compagny has selected Google Enterprise to provide all the mail

  • Accessing Other TimeMachine drives

    If you have several TM drives connected, you can now easily browse them by holding down the Option button when you click the new TM icon in the menu bar. Just select "Browse Other Time Machine Disks" Message was edited by: nerowolfe

  • How do I put in my new credit card

    How can I chage my credit card info.

  • After downloading itunes 10.5.2 my playlists are gone

    After downloading itunes 10.5.3 my playlists folder is empty and they are not showing in any other music related folders.  I will not try to sync my ipod to get them back in itunes, for they too may disappear.