Quantcast
Viewing all 893 articles
Browse latest View live

Encoding problem while exporting report to PDF

Hi everyone

 

We have a trouble while exporting Crystal Report with Russian or Lithuanian characters to pdf on web. Some of Lithuanian characters are exported as question marks u201C?u201D. The problem is only if  the web project is running on Linux server. On Windows export and printing works fine.

We have tried both WebSphere Application Server 6.1.0.19 and Sun GlassFish v2.1 installed on Ubuntu 9.04.

 

For the testing purpose we have downloaded u201CAll-In-Oneu201D Eclipse installation (u201CEclipse Ganymede 3.4.1 with Crystal Reports for Eclipseu201D) from businessobjects.com (Crystal Reports for Eclipse version is 2.0.2.r678).

We have done the simplest Crystal Reports Web Project and created a new report with some Lithuanian characters (the report doesn't use any external data source). Then using u201CCrystal Reports->Create Report Viewer JSP...u201D wizard we created standard JSP page with Java code snippets to render report. Then we exported this web project as EAR and run it both on Linux and Windows servers. On Windows server export to pdf works fine, but on Linux not. The same problem is with Russian characters.

 

Could anybody help, how to set charset or encoding used while printing and exporting report to pdf?

 

Thanks in advance

 

Edited by: Judzin on Sep 10, 2009 3:09 PM


Background threads?

Hi all

 

We're currently evaluating CR for use in our swing-based application. Our app has a plugin mechanism, and I'm having some difficulty in getting our plugins unloaded after using the ReportViewerBean. Specifically, it appears that a number of background threads with names like "Background Batch Spiller 0" are started up by the Crystal Reports code, and hang around even after closing the component. The threads appear to still have references to our plugin's classloader through the inheritedAccessControlContext field on the thread. We are not running with a SecurityManager.

 

I believe that I'm calling ReportClientDocument.close() as necessary and also cleaning up the viewer by calling stop() followed by destroy() on it.

 

Is there any way to programatically tell the Crystal code to shut down all its background threads? Or are there any other suggestions?

 

Thanks in advance

 

Tom

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: PermGen space-

hi every one,

 

While iam trying to generate crystal report, iam getting the following error.......

 

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: PermGen space---- Error code:-2147467259 Error code name:failed

 

Exception: java.lang.OutOfMemoryError: PermGen space

 

Please let me know, how to overcome this problem?

 

Edited by: abhishek.c1984 on Jun 23, 2009 2:00 PM

Crystal Report JRC and JNDI problem

I need to convert one of our internal web application from using Crystal Report Server 10 RAS to using Crystal Report XI Java Component (JRC). I found several examples from SAP/BusinessObjects but am stuck with a database connectivity problem.

 

The basic enviornment info:

JBoss 4.0.3 SP1

Crystal Report JRC XI

Windows XP/Server 2003

JDK 1.5.x

MS SQL Server 2005

 

The error I am getting is "Error finding JNDI name (xxx)", although the application is already using the same JNDI and was able to display data on the web.

 

I added debug code:

 

                Context initialContext = null;

                try {

                    initialContext = new InitialContext();

                    DataSource ds = (DataSource) initialContext.lookup("java:MYAPP");

                    String t = ds.toString();

                    log.debug(t);

                } catch (NamingException e) {

                    log.error(e);

                }

 

I was able to get the data source successfully. The actual report file uses JDBC with JNDI named as "MYAPP". When I call the viewer, it gives

 

Error finding JNDI name (MYAPP)

 

message.

 

Any comment or help would be appreciated.

 

Thanks.

CRJ SDK

Hi!  The "Crystal Report Java runtime component" is available as a separate download to "SAP Crystal Reports, Version for Eclipse".  So where can I find the javadoc for the API and the Development Guide for the 12.2.216 release of the runtime libraries?

does crystal report refresh when opened from java web application automatically?

Hi,

 

I have developed a web application using java crystal report apis. The web application loads up from a war file and I have jsps that render a crystal report (.rpt) in the browser. My question is, everytime the crystal report loads up, does it refresh the latest data from the data source ?

 

Thanks in advance.

Crystal libraries for jdk 1.8

Hi All,

 

    We have recently upgraded our project from java 1.6 to 1.8. After the upgrade we are seeing few errors while exporting using crystal. We use the 12.2.2 version of the libraries. Details are as below,

 
CrystalCommon2-12.2.2.jar

CrystalReportsRuntime-12.2.2.jar

DatabaseConnectors-12.2.2.jar

jrecrom-12.2.2.jar

keycodeDecoder-12.2.2.jar

QueryBuilder-12.2.2..jar

JDBInterface-12.2.2.jar

logging-12.2.2.jar.

 

Can you please let us know if there are specific libraries or patches available for java 1.8. Please find the error logs attached.

 

Thanks,

Arvind.

 

 

 

 

 

 

java: Is it possible to register own fonts in crystal reports (needed for embedding in pdf)

Hi @all,

 

afaik fonts will be automatically embedded in pdf if the font is available for the jvm.

 

So copy my fonts (e.g. mscorefonts on linux or barcode-fonts) into the jvm works as expected - pdf is created and printable on linux and windows.

 

Because I don't want to copy the fonts after each update I've created a method to load additional fonts from a folder.

 

  /**

   * Register custom fonts.

   * @param theFontDirectory the directory to load fonts from

   */

  private void registerFonts(final File theFontDirectory)

  {

    if (!theFontDirectory.isDirectory())

      return;

    try

    {

      final GraphicsEnvironment _ge = GraphicsEnvironment.getLocalGraphicsEnvironment();

      for (final File _f : FileUtil.findFiles(theFontDirectory, null, true))

      {

        if (FileUtil.getFilenameEnding(_f.getName()).toLowerCase().equals("ttf"))

        {

          try

          {

            LoggerFactory.getDefaultLogger().info("register font: " + _f.getAbsolutePath());

            final Font _font = Font.createFont(Font.TRUETYPE_FONT, _f);

            _ge.registerFont(_font);

          }

          catch (Exception _e)

          {

            LoggerFactory.getDefaultLogger().log(java.util.logging.Level.SEVERE,

                "error registering font " + _f.getAbsolutePath(), _e);

          }

        }

      }

    }

    catch (Exception _e)

    {

      LoggerFactory.getDefaultLogger().log(java.util.logging.Level.SEVERE, "error registering fonts", _e);

    }

  }

 

This works as expected but unfortunately this does not embed the fonts into the pdf.

 

If I copy the fonts into the jre the fonts are embedded.

 

Now I'm looking for a solution to register my fonts in CR (or somewhere else) to ensure that they will be embedded into the pdf.

 

Has anyone an idea to do this?

 

Markus


java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key Error_InvalidServerName


Hi!

 

We are receving this error message while calling a Crystal report from Java -Weblogic. We are on Weblogic 12c using JDK 1.7

 

We are getting  this error only on 1 server. Its working on 2 other servers .All 3 servers have a similar configuration. Looks like there is a small difference in environments that we are unable to trace. We have exhaused all possible reasons. Does any have suggestions ?  Here's the error messsage

 

 

GenerateReport: Report Name:SitePerformanceReport

  1. java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key Error_InvalidServerName

        at java.util.ResourceBundle.getObject(ResourceBundle.java:395)

        at java.util.ResourceBundle.getObject(ResourceBundle.java:392)

        at java.util.ResourceBundle.getString(ResourceBundle.java:355)

        at com.crystaldecisions.client.helper.ResourceManager.getString(Unknown Source)

        at com.crystaldecisions.client.helper.SDKResourceManager.getString(Unknown Source)

        at com.crystaldecisions.proxy.remoteagent.TCPIPCommunicationAdapter.connect(Unknown Source)

        at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)

        at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.int(Unknown Source)

        at com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initialize(Unknown Source)

        at com.crystaldecisions.sdk.occa.report.application.ClientDocument.for(Unknown Source)

        at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.for(Unknown Source)

        at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Unknown Source)

        at com.bms.bivr.businesslayer.report.GenerateReports.getSitePerformanceReport(GenerateReports.java:299)

        at com.bms.bivr.action.GenerateReportAction.execute(GenerateReportAction.java:112)

        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)

        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)

        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)

        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)

        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:567)

        at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:263)

        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)

        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)

        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)

        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)

        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)

        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)

        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

        at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)

        at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)

        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)

        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)

        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)

        at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)

        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

can't find resource for bundle java.util.PropertyResourceBundle, key Error_InvalidServerName JBOSS

Hi I am creating an application which opens a rpt file when you perform in windows and JBOSS working properly but when I step on Red Hat and JBoss shows me the following error.

 

 

Can not find resource for bundle java.util.PropertyResourceBundle, key Error_InvalidServerName

 

my code:

 

            reportClientDoc.open("reportes/" + reporte1 + ".rpt", 0);

 

in that line is not going.

isInReadOnlyArea

error is WARN  [com.businessobjects.reports.reportconverter.v12.V12Converter] UNSUPPORTED: Section property not supported: isInReadOnlyArea

 

Seems like its part of com.crystaldecisions12.reports.reportdefinition\Sectionproperties.class but not part of the conversion libraries.

 

I am assuming that this is related to the Read only section check box in a report

 

Is the problem that the report has that checked or that a library needs an update to support this feature.

 

Kevin McManus

How to switch database connection at runtime in crystal reports using java swing

Please help. I am developing a swing application that can open reports made using crystal reports xi. What Im trying to do is to open a report and pass the connection info to that report so that I can dynamically change the database of the report. But for some reason it is not working and the report still produces the information from the database that it was initially set up. Can someone please tell me what I did wrong?  Btw when I try using  com.crystaldecisions.sdk.occa.report.application.ReportClientDocument, I get a server not found error. But when I try to use import com.crystaldecisions.reports.sdk.ReportClientDocument; It's not working. I am not sure what a report server is and I dont think I set it up on my computer. Please help. Here is my code:

 

import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
ReportClientDocument rpt =  new ReportClientDocument();        rpt.open(reportPath+fileName, 0);        Fields fields = null;                IConnectionInfo connInfo = rpt.getDatabaseController().getConnectionInfos(null).getConnectionInfo(0);                 PropertyBag innerProp = connInfo.getAttributes();            innerProp.clear();                        PropertyBag propertyBag = new PropertyBag();            propertyBag.put("Server Type", "JDBC (JNDI)");            propertyBag.put("Database DLL", "crdb_jdbc.dll");            propertyBag.put("Database Class Name", "com.mysql.jdbc.Driver");            propertyBag.put("Use JDBC", "true");            propertyBag.put("Server Name", DBConnect.getServer());            propertyBag.put("Generic JDBC Driver Behavior", "No");            propertyBag.put("URI", "!com.mysql.jdbc.Driver!jdbc:mysql://"+DBConnect.getServer()+":"+DBConnect.getPort()+"/"+DBConnect.getDatabase()+"!ServerType=29!QuoteChar=`");                    connInfo.setAttributes(innerProp);            connInfo.setPassword(DBConnect.getPassword());            connInfo.setUserName(DBConnect.getUsername());                                                        int replaceParams = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;        rpt.getDatabaseController().replaceConnection(rpt.getDatabaseController().getConnectionInfos(null).getConnectionInfo(0), connInfo, fields, replaceParams);

How do you run Crystal Reports from C#-Script?

Hello,

Last month our company upgrade from Crystal 11 to Crystal 14.1.2.1121

 

Image may be NSFW.
Clik here to view.
Crystal.png

This upgrade broke the existing VB script which was used to generate nightly reports on each active job. If I understand correctly, the new version of Crystal can no longer be called from VB script. I do not own a copy of Visual Studio. What are my choices for re-writing this VB program?

 

It seems like I should be able to use a program called CS-Script which is build on top of Microsoft Common Runtime Library, but I don't have any documentation on how to get Crystal working without Visual Studio. I do not need to view the report.. I simply want to export it to a PDF.

 

This is what I have so far in my CS-Script:

 

using System;

using System.Web;

using System.Windows.Forms;

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Web;

using CrystalDecisions.Shared;

 

 

public class Script

{

    const string usage = "Usage: Export Crystal Report";

 

 

    static public void Main(string[] args)

    {

        //System.Diagnostics.Debug.Assert(false) ;

 

 

        if (args.Length == 1 && (args[0] == "?" || args[0] == "/?" || args[0] == "-?" || args[0].ToLower() == "help"))

        {

            Console.WriteLine(usage);

        }

        else

        {

 

                    // apparently the viewer object is only available in Visual Studio

            //CrystalReportViewer crystalReportViewer1 = new CrystalReportViewer();

            ReportDocument cryRpt = new ReportDocument();

            cryRpt.Load(@"JobInfoForm.rpt");

            //crystalReportViewer1.ReportSource = cryRpt;

            //cryRpt.InitReport;

            //cryRpt.ExportToDisk(ExportFormatType formatType, String fileName);

 

 

            cryRpt.ExportToDisk(31, @"C:\share\jif.pdf");

            MessageBox.Show("Export Finished");

       }

  }

}

 

This code fails with the following two errors when I try to run it:

 

c:\Share\crystal_JIF3.cs(30,13): error CS1502: The best overloaded method match for 'CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType, string)' has some invalid arguments

 

c:\Share\crystal_JIF3.cs(30,33): error CS1503: Argument 1: cannot convert from 'int' to 'CrystalDecisions.Shared.ExportFormatType'

 

 

 

Here is the old VB Script which no longer works as of the latest version of Crystal.

 

Sub Crystal_export(jobno)

'Called from exp_Job The purpose is to Export JobInfo Report

'Is called for every Job.

 

 

  Dim Appn

  Dim Report

  Dim FSO

  Dim Path

  Dim ReportName

  Dim OutputFile

  Dim DiskFilePath

  Dim ParamOne

  Dim Param1Name

  Dim dbproperties

  Dim FileFormat

  Dim FullOutputPath

  

  On Error goto 0

 

  '**********************************************************************************************

  'Define variables

  '**********************************************************************************************

  ReportName = "JobInfoForm.rpt"

  DiskFilePath = "C:\Share\JobInfo\"

  OutputFile = jobno

  FileFormat = ".PDF"

  Param1Name = "Job"

  ParamOne = jobno 'ex:"150-14-4003"

 

  '**********************************************************************************************

  'Open report

  '**********************************************************************************************

  Set FSO = CreateObject("Scripting.FileSystemObject")

  Set Appn = CreateObject("CrystalRuntime.Application")

  Set Report = Appn.OpenReport(ReportName)

  Path = OutputFile '& "_" & Year(Now) & Month(Now) & Day(Now) &

            Hour(Now) & Minute(Now) & Second(Now)

  FullOutputPath = DiskFilePath & Path & FileFormat

 

  '**********************************************************************************************

  'Report parameters

  '**********************************************************************************************

  Set dbproperties = Report.Database.Tables.Item(1).ConnectionProperties

    dbproperties("User ID") = "??"

    dbproperties("Password") = "??" 

  Report.DiscardSavedData

 

  Report.ParameterFields.GetItemByName("Job").AddCurrentValue Left(ParamOne,11)

  Report.EnableParameterPrompting = False

 

  '**********************************************************************************************

  'Report Format & Export

  '**********************************************************************************************

  'Report.ExportOptions.HTMLFileName = FullOutputPath

  Report.ExportOptions.FormatType = 31

  'FormatType: 31 = PDF, 36 = XLS, 14 = DOC, 32 = HTML40, 4 =RichText

 

  Report.ExportOptions.DestinationType = 1 ' crEDTDiskFile

  Report.ExportOptions.PDFExportAllPages = True

  Report.ExportOptions.DiskFileName = FullOutputPath

  Report.Export (False)

 

  '**********************************************************************************************

  'Object clean-up

  '**********************************************************************************************

  Set FSO = Nothing

  Set Appn = Nothing

  Set Report = Nothing

End Sub

 

Thank you for your time and consideration

-Rob

Set the record selection formula on Crystal Reports using the Java API

I was doing some research on how to set the record selection formula on Crystal Reports using the Java API and noticed that there are 3 methods with which you can do this:

 

1. Using the IFilter interface as shown in this example provided by SAP:

// Set the filter string to be used as the Record Filter

String freeEditingFilter = "{Customer.Country} = 'Canada'";

// Retrieve the record filter for the Data Definition Controller

IFilter iFilter = clientDoc.getDataDefController().getDataDefinition().getRecordFilter();

// Set the filter to free editing text filter string

iFilter.setFreeEditingText(freeEditingFilter);

// Modify the filter through the Record Filter Controller to the report

clientDoc.getDataDefController().getRecordFilterController().modify(iFilter);

 

2. Using the setFormulaText method:

clientDoc.getDataDefController().getRecordFilterController().setFormulaText("{Customer.Country} = 'Canada'");

 

3. Using parameters. Parameters can be passed to the report using code (you can use the addDiscreteParameterValue function in the helper class) or else they can be filled in by the user during runtime

 

I would like to know what the best method to opt for is. From the research carried out so far, I do not believe that using parameters (method 3) is the best option since I do not want to let the user enter the parameter values on screen. Also, I believe that method 1 and method 2 do the same job, however I want to know what the difference between the two methods is?

com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: InternalFormatterException---- Error code:-2147217394 Error code name:missingParameterValueError

Hi,

 

Customer's Domino application runs a Java agent that connects to one of their Crystal Reports .rpt files. The agent passes values to the report's parameter fields then exports a copy of the report as a PDF (saved to the server, then emailed). I get the error at this line:

 

ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)printOutCntrl.export(ReportExportFormat.PDF);

 

Below is the error from their Domino console...

 

 

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error: com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: InternalFormatterException---- Error code:-2147217394 Error code name:missingParameterValueError

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at com.crystaldecisions.reports.sdk.PrintOutputController.export(SourceFile:54)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at JavaAgent.genReport(Unknown Source)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at JavaAgent.processDistributionDocument(Unknown Source)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at JavaAgent.collectDistributionDocs(Unknown Source)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at JavaAgent.NotesMain(Unknown Source)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at lotus.domino.AgentBase.runNotes(Unknown Source)

[12BC:0008-0D14] 03/25/2015 02:08:49 PM  Agent Manager: Agent  error:  at lotus.domino.NotesThread.run(Unknown Source)

 

Any advice/direction is greatly appreciated. Thanks!


crystal report of label size is not printing correctly

Hi,

 

 

we have interated  crystal report CR4E version with our application and facing 2 issue when i am generating crystal reports from application.

 

 

we are  having a crystal report designed for label size. 

 

 

1.

 

While generate the report from application with output as a pdf browser and print to label printer (DYMO Label Writer 400) all the records(for example:7) are getting printed in a single label .

 

when the same report is generated from crystal report software and print to label printer (DYMO prinetr 400) all the records (For example:7 records) it is printing  each record per page (for example :7 pages).

 

 

 

 

2.

 

When i am generating crystal report of label size from my application and  getting the binary data . When  i am sending this binary data to a label printer(DYMO Label writer 400) i am getting an exception "printer's imageable width is too small".

 

 

 

i am using CR4E crystal report version and java 1.5 verison.The paper size of the label printer (DYMO label Writer 400)" 30252 Address"

 

 

 

can any one please help me on this issues.

 

 

Advacne thanks

 

Rajesh

Error during print - Error code:-2147467259 Error code name:failed

Hi,

 

I am sorry if this question was already answer in this forum but I didn't find the answer Image may be NSFW.
Clik here to view.

 

I am trying to use CR XI R2 (11.5.0.313)  with Jboss 5.0.1 GA and get this error:

 

BaseAction.execute(...) elapsed in:408 miliseconds doing the render cockpit operation.

2009-03-24 10:29:34,464 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-12) Periodic recovery - first pass <Tue, 24 Mar 2009 10:29:34>

2009-03-24 10:29:34,464 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-12) StatusModule: first pass

2009-03-24 10:29:34,464 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] (Thread-12) [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass

2009-03-24 10:29:34,464 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] (Thread-12) [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass

2009-03-24 10:29:41,286 ERROR [pt.gedi] (pool-14-thread-3) pt.gedi.base.control.actions.us.os.RelatoriosExtendedAction:parametrosRelatorioInNewThread

Vou gravar o relatorio em /opt/jboss/jbas5/server/default/deploy/siag.war/../../../siag.warTemp/Relatorio1237890581285.rpt

2009-03-24 10:29:41,303 ERROR [pt.gedi] (pool-14-thread-3) pt.gedi.base.services.us.os.Relatorios_ServiceImpl:getRptSource

Vou abrir o relatorio em /opt/jboss/jbas5/server/default/deploy/siag.war/../../../siag.warTemp/Relatorio1237890581285.rpt

2009-03-24 10:29:41,575 ERROR [com.crystaldecisions.reports.reportdefinition] (pool-14-thread-3) Report printer was not valid, switching to default printer.

2009-03-24 10:29:41,585 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (pool-14-thread-3) JRCAgent2 detected an exception: com/crystaldecisions/reports/exportinterface/exceptions/ExportException

2009-03-24 10:29:41,597 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (pool-14-thread-3) JRCAgent2 detected an exception: com/crystaldecisions/reports/exportinterface/exceptions/ExportException

2009-03-24 10:29:41,602 ERROR [pt.gedi] (pool-14-thread-3) pt.gedi.base.control.actions.us.os.RelatoriosExtendedAction:parametrosRelatorioInNewThread

parametrosRelatorio(...) elapsed in:326 miliseconds

2009-03-24 10:29:43,520 ERROR [pt.gedi] (pool-14-thread-5) pt.gedi.base.control.actions.us.os.RelatoriosExtendedAction:generateRelatorioInNewThread

Vou gravar o relatorio em /opt/jboss/jbas5/server/default/deploy/siag.war/../../../siag.warTemp/Relatorio1237890582281.rpt

2009-03-24 10:29:43,528 ERROR [pt.gedi] (pool-14-thread-5) pt.gedi.base.services.us.os.Relatorios_ServiceImpl:getRptSource

Vou abrir o relatorio em /opt/jboss/jbas5/server/default/deploy/siag.war/../../../siag.warTemp/Relatorio1237890582281.rpt

2009-03-24 10:29:43,731 ERROR [com.crystaldecisions.reports.reportdefinition] (pool-14-thread-5) Report printer was not valid, switching to default printer.

2009-03-24 10:29:43,770 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (pool-14-thread-5) JRCAgent3 detected an exception: com/crystaldecisions/reports/exportinterface/exceptions/ExportException

2009-03-24 10:29:43,776 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (pool-14-thread-5) JRCAgent3 detected an exception: com/crystaldecisions/reports/exportinterface/exceptions/ExportException

2009-03-24 10:29:43,854 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (pool-14-thread-5) JRCAgent3 detected an exception: com/crystaldecisions/reports/exportinterface/exceptions/ExportException

2009-03-24 10:29:43,863 ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] (pool-14-thread-5) JRCAgent3 detected an exception: com/crystaldecisions/reports/exportinterface/exceptions/ExportException

2009-03-24 10:29:43,864 ERROR [STDERR] (pool-14-thread-5) com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com/crystaldecisions/reports/exportinterface/exceptions/ExportException---- Error code:-2147467259 Error code name:failed

2009-03-24 10:29:43,864 ERROR [STDERR] (pool-14-thread-5)      at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)

2009-03-24 10:29:43,864 ERROR [STDERR] (pool-14-thread-5)      at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)

2009-03-24 10:29:43,864 ERROR [STDERR] (pool-14-thread-5)      at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

2009-03-24 10:29:43,864 ERROR [STDERR] (pool-14-thread-5)      at pt.gedi.base.services.us.os.ServicoRelatorioServlet.doSomething(ServicoRelatorioServlet.java:109)

2009-03-24 10:29:43,864 ERROR [STDERR] (pool-14-thread-5)      at pt.gedi.base.services.us.os.ServicoRelatorioServlet.doGet(ServicoRelatorioServlet.java:41)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at pt.gedi.base.services.us.os.Relatorios_ServiceImpl.exportToPDF(Relatorios_ServiceImpl.java:1049)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at pt.gedi.base.control.actions.us.os.RelatoriosExtendedAction.generateRelatorioInNewThread(RelatoriosExtendedAction.java:359)

2009-03-24 10:29:43,865 ERROR [STDERR] (pool-14-thread-5)      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at java.lang.reflect.Method.invoke(Method.java:597)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at pt.gedi.base.workerthreads.GenericWorkerThread.doWork(GenericWorkerThread.java:77)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at pt.gedi.base.workerthreads.GenericWorkerThread.run(GenericWorkerThread.java:59)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

2009-03-24 10:29:43,866 ERROR [STDERR] (pool-14-thread-5)      at java.lang.Thread.run(Thread.java:619)

2009-03-24 10:29:43,910 ERROR [pt.gedi] (pool-14-thread-5) pt.gedi.base.control.actions.us.os.RelatoriosExtendedAction:generateRelatorioInNewThread

 

I can print this same CR XI R2 with Jboss 4.2.3 GA and with Jboss 4.0.5 GA using the same jdbc connection settings:

 

<env-entry>

          <env-entry-name>jdbc/Siag</env-entry-name>

          <env-entry-type>java.lang.String</env-entry-type>

          <env-entry-value>

               !oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:@linuxpreprod.gedi.pt:1521:siagdb!user=fct_104prod!password=xxx

          </env-entry-value>

     </env-entry>

 

 

Thanks in advance,

 

Miguel Lamy

Using Excel as Data Source for Crystal Reports (with Java SDK)

Hi,

I already tried to find similar topics here but was more or less unable to fix my problem with the suggestion I found so far.

I would like to create a report with a excel file as data source. All my current attempts fail with the following exception "com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(719):  detected an exception: Error finding JNDI name (E:\SampleSalesData.xls)"

 

This is my current approach:

final ReportClientDocument boReportClientDocument = new ReportClientDocument();
boReportClientDocument.setLocale(Locale.US);
boReportClientDocument.newDocument();
final String fullPathToExcelFile = "E:\\SampleSalesData.xls"
final ConnectionInfo boConnectionInfo = new ConnectionInfo();
final PropertyBag boPropertyBag = boConnectionInfo.getAttributes();
boPropertyBag.put("Server Type", "Access/Excel (DAO)");
boPropertyBag.put("Database Type", "Excel 8.0");
boPropertyBag.put("Database DLL", "crdb_dao.dll");
boPropertyBag.put("System Database Path", "");
boPropertyBag.put("Session UserID", "");
boPropertyBag.put("PreQEServerName", fullPathToExcelFile);
boPropertyBag.put("Database Name", fullPathToExcelFile);
boPropertyBag.put("Server Name", fullPathToExcelFile);
boPropertyBag.put("JNDIOptionalName", fullPathToExcelFile);
boPropertyBag.put("Trusted_Connection", false);
boPropertyBag.put("Use JDBC", false);
boConnectionInfo.setAttributes(boPropertyBag);
// Set the DB Username and Pwd
boConnectionInfo.setUserName(null);
boConnectionInfo.setPassword("");
boConnectionInfo.setKind(ConnectionInfoKind.SQL);
// [...]

 

Once I have added the datasoruce I add a filed to the report and would like to export as PDF (this works fine).

The current StatckTrace looks like this:

2015-09-14 16:35:54,191 ERROR [MAIN] com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(719):  detected an exception: Error finding JNDI name (E:\SampleSalesData.xls)

        at com.crystaldecisions.reports.queryengine.Connection.t4(SourceFile:3024)

        at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:697)

        at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.for(SourceFile:707)

        at com.crystaldecisions.reports.reportdefinition.ReportHelper.a(SourceFile:198)

        at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.long(SourceFile:957)

        at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:635)

        at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1943)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)

        at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)

        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)

        at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

        at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

        at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

        at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

        at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)

        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

        at EXPORT...

 

Any help on how to resolve this Problem is highly appreciated.

 

Thanks,

Crystal Report integation with Java Front end applicatin

Folks,

 

 

We have front end application in JAVA and  we are planning to migrate Crystal Reports 2011 from actuate.

 

Users want us to Integrate Crystal Report Viewer Plugin with front end and use Customize Report Viewer(Opendoc) .

 

Not sure if this is the recommended approach.

 

Pls do share your inputs

 

Regards,

Jyoti

How do you run Crystal Reports from C#-Script?

Hello,

Last month our company upgrade from Crystal 11 to Crystal 14.1.2.1121

 

Image may be NSFW.
Clik here to view.
Crystal.png

This upgrade broke the existing VB script which was used to generate nightly reports on each active job. If I understand correctly, the new version of Crystal can no longer be called from VB script. I do not own a copy of Visual Studio. What are my choices for re-writing this VB program?

 

It seems like I should be able to use a program called CS-Script which is build on top of Microsoft Common Runtime Library, but I don't have any documentation on how to get Crystal working without Visual Studio. I do not need to view the report.. I simply want to export it to a PDF.

 

This is what I have so far in my CS-Script:

 

using System;

using System.Web;

using System.Windows.Forms;

using CrystalDecisions.CrystalReports.Engine;

using CrystalDecisions.Web;

using CrystalDecisions.Shared;

 

 

public class Script

{

    const string usage = "Usage: Export Crystal Report";

 

 

    static public void Main(string[] args)

    {

        //System.Diagnostics.Debug.Assert(false) ;

 

 

        if (args.Length == 1 && (args[0] == "?" || args[0] == "/?" || args[0] == "-?" || args[0].ToLower() == "help"))

        {

            Console.WriteLine(usage);

        }

        else

        {

 

                    // apparently the viewer object is only available in Visual Studio

            //CrystalReportViewer crystalReportViewer1 = new CrystalReportViewer();

            ReportDocument cryRpt = new ReportDocument();

            cryRpt.Load(@"JobInfoForm.rpt");

            //crystalReportViewer1.ReportSource = cryRpt;

            //cryRpt.InitReport;

            //cryRpt.ExportToDisk(ExportFormatType formatType, String fileName);

 

 

            cryRpt.ExportToDisk(31, @"C:\share\jif.pdf");

            MessageBox.Show("Export Finished");

       }

  }

}

 

This code fails with the following two errors when I try to run it:

 

c:\Share\crystal_JIF3.cs(30,13): error CS1502: The best overloaded method match for 'CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(CrystalDecisions.Shared.ExportFormatType, string)' has some invalid arguments

 

c:\Share\crystal_JIF3.cs(30,33): error CS1503: Argument 1: cannot convert from 'int' to 'CrystalDecisions.Shared.ExportFormatType'

 

 

 

Here is the old VB Script which no longer works as of the latest version of Crystal.

 

Sub Crystal_export(jobno)

'Called from exp_Job The purpose is to Export JobInfo Report

'Is called for every Job.

 

 

  Dim Appn

  Dim Report

  Dim FSO

  Dim Path

  Dim ReportName

  Dim OutputFile

  Dim DiskFilePath

  Dim ParamOne

  Dim Param1Name

  Dim dbproperties

  Dim FileFormat

  Dim FullOutputPath

  

  On Error goto 0

 

  '**********************************************************************************************

  'Define variables

  '**********************************************************************************************

  ReportName = "JobInfoForm.rpt"

  DiskFilePath = "C:\Share\JobInfo\"

  OutputFile = jobno

  FileFormat = ".PDF"

  Param1Name = "Job"

  ParamOne = jobno 'ex:"150-14-4003"

 

  '**********************************************************************************************

  'Open report

  '**********************************************************************************************

  Set FSO = CreateObject("Scripting.FileSystemObject")

  Set Appn = CreateObject("CrystalRuntime.Application")

  Set Report = Appn.OpenReport(ReportName)

  Path = OutputFile '& "_" & Year(Now) & Month(Now) & Day(Now) &

            Hour(Now) & Minute(Now) & Second(Now)

  FullOutputPath = DiskFilePath & Path & FileFormat

 

  '**********************************************************************************************

  'Report parameters

  '**********************************************************************************************

  Set dbproperties = Report.Database.Tables.Item(1).ConnectionProperties

    dbproperties("User ID") = "??"

    dbproperties("Password") = "??" 

  Report.DiscardSavedData

 

  Report.ParameterFields.GetItemByName("Job").AddCurrentValue Left(ParamOne,11)

  Report.EnableParameterPrompting = False

 

  '**********************************************************************************************

  'Report Format & Export

  '**********************************************************************************************

  'Report.ExportOptions.HTMLFileName = FullOutputPath

  Report.ExportOptions.FormatType = 31

  'FormatType: 31 = PDF, 36 = XLS, 14 = DOC, 32 = HTML40, 4 =RichText

 

  Report.ExportOptions.DestinationType = 1 ' crEDTDiskFile

  Report.ExportOptions.PDFExportAllPages = True

  Report.ExportOptions.DiskFileName = FullOutputPath

  Report.Export (False)

 

  '**********************************************************************************************

  'Object clean-up

  '**********************************************************************************************

  Set FSO = Nothing

  Set Appn = Nothing

  Set Report = Nothing

End Sub

 

Thank you for your time and consideration

-Rob

Viewing all 893 articles
Browse latest View live