Crystal Report XI & ReportViewerBean
hi..
I would like to know if ReportViewerBean is compatible with crystal report XI to print the various reports.
I wanted to use Swings & ReportViewerBean on the linux (instead of JRC as my application is not web-based) for various reports management. Is this approach possible?
thanks
ritu
Hello,
If you're asking how to pass database logon information to a Crystal Report at runtime there's a kbase article on the Business Objects support site with code examples. Here's the link:
<http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010371>
This kbase article references the Crystal Reports .NET object model - not the Report Designer Component (RDC) object model. The RDC was never tested in VS.NET and therefore it's not supported in that environment. Additionally, the RDC has been retired with the release of CR2008 so you can not move to a newer release of Crystal Reports without migrating your code to use the CR.NET object model. Now would be a good time to switch.
If you're looking for different information please clarify your question.
Dan
Similar Messages
-
Calling a Crystal Report using the ReportViewerBean
Hello...I am writing a java application to display a Seagate Crystal report using the ReportViewerBean.
The problem I am having is trying to display the report within the viewer.
The following is a sample from my code where I create an instance of the viewer bean.
ReportViewerBean rvb = new ReportViewerBean();
JFrame frame = new JFrame();
frame.setSize(1000,1000);
frame.getContentPane().add(rvb,BorderLayout.CENTER);
frame.show();
rvb.start();
try
String strUrl = "http://localhost:8080/Report1.rpt";
rvb.setReportName(strUrl);
catch(java.beans.PropertyVetoException pve)
System.err.println("Property change vetod");
The Sys-out from the Report Viewer bean is "No reponse from server".
The sysout from my server (Tomcat 3.2.3) is:
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): FileHandler: Ends with \/. D:\jakarta
-tomcat-3.2.3\jakarta-tomcat-3.2.3\webapps\Report1.rpt\
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): 404 R( /Report1.rpt + + null) null
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): FileHandler: Ends with \/. D:\jakarta
-tomcat-3.2.3\jakarta-tomcat-3.2.3\webapps\Report1.rpt\
2001-09-06 09:08:53 - Ctx( /Report1.rpt ): 404 R( /Report1.rpt + + null) null
Any suggestion/help would be greatly appreciated...TYI am getting the same 'No Response from Server' Message.
URL = http://Pepperland/STPARMListing.rpt?viewer=java&vfmt=encp&vgen=728&pversion=3&language=en&promptOnRefresh=1
Parameters = cmd=get_pg&page=1&incomplete_page=1&incomplete_page_count=1&smart_images=1
No response from server.
The WWW service and the Default Web Site are up and running.
I tried configuring the application settings in the IIS MMC but I was unable to determine which .dll to associate with the .rpt extension. -
Error while running Java application using Crystal Reports 2011
Hello,
I would like to ask for your help.
Environment details:
Java based standalone application in Development environment.
Crystal Reports 2011 (no SP applied)
Oracle 11g ( 32 bit client installed)
Win7 64 bit OS.
Workflow:
While running the java application, which will display the reports I am getting the below mentioned error. I guess that is because I am missing the Crystal runtimes (Correct me if I am wrong).
I know that CR2011 do not have any sdks/ jar available for deployment. In this case, which runtimes should I be using? Does installing CR2011 be enough in the development box?
Please provide me the link from which I can download the same.
Let me know if I need to provide more details on this. Any suggestions are most welcome.
Thank You.
Code used:
reportClientDoc = new ReportClientDocument();
System.err.println("Opening the Report ");
reportClientDoc.open(REPORT_PATH, 0);
// this is where the error or exception is thrown
_Error: _
log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.reportdefinition.ReportDocument).
log4j:WARN Please initialize the log4j system properly.
com.crystaldecisions.sdkreport.lib.ReportSDKException: com/businessobjects/reports/jdbinterface/common/DBException---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:286)
at com.businessobjects.sdk.erom.jrc.a.<init>(SourceFile:43)
at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:46)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.<init>(SourceFile:703)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:662)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:632)
at com.crystaldecisions.sdk.report.application.ClientDocument.if(SourceFile:504)
at com.crystaldecisions.sdk.report.application.ClientDocument.open(SourceFile:669)
at com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
at rp.batch.bo.RpJRCExportReport.runReportExport(RpJRCExportReport.java:517)
at rp.batch.bo.RpSchedReportRun.process(RpSchedReportRun.java:163)
at rp.batch.bo.RpSchedReportRun.drive(RpSchedReportRun.java:240)
at rp.batch.bo.RpSchedReportRun.main(RpSchedReportRun.java:265)
Caused by: java.lang.NoClassDefFoundError: com/businessobjects/reports/jdbinterface/common/DBException
at com.crystaldecisions.reports.queryengine.Session.a2(SourceFile:244)
at com.crystaldecisions.reports.datafoundation.DataFoundation.do(SourceFile:376)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.do(SourceFile:111)
at com.crystaldecisions.reports.dataengine.datafoundation.CreateDataConnectionCommand.new(SourceFile:81)
at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:442)
at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:231)
at com.businessobjects.reports.reportconverter.v12.d.m(SourceFile:192)
at com.businessobjects.reports.reportconverter.v12.f.if(SourceFile:210)
at com.businessobjects.reports.reportconverter.v12.V12SaveLoader.a(SourceFile:242)
at com.businessobjects.reports.loader.ReportLoader.a(SourceFile:205)
at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:137)
at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:76)
at com.businessobjects.reports.sdk.requesthandler.ReportDocumentRequestHandler.a(SourceFile:136)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:229)
... 12 more
Caused by: java.lang.ClassNotFoundException: com.businessobjects.reports.jdbinterface.common.DBException
at java.net.URLClassLoader1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.LauncherAppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 28 moreHelp me ...
Ambient:
Crystal Reports Viewer 14.0.0.0
java.vendor = Sun Microsystems Inc.
java.version = 1.6.0_37
os.name = Windows NT (unknown)
os.version = 6.2
os.arch = amd64
Exception:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.sdk.erom.jrc.ReportAgentFactory---- Error code:-2147215357 [CRSDK00000026] Error code name:internal
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ReportSDKException.java:112)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.createDefaultAgent(RemoteAgent.java:1000)
at com.crystaldecisions.sdk.occa.report.application.ClientDocument.initRemoteAgent(ClientDocument.java:770)
at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(ClientDocument.java:961)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.open(ReportClientDocument.java:226)
at src.HelloWorldSwing.createAndShowGUI(HelloWorldSwing.java:54)
at src.HelloWorldSwing.main(HelloWorldSwing.java:24)
Source:
import java.awt.BorderLayout;
import javax.swing.JFrame;
import com.crystaldecisions.ReportViewer.ReportViewerBean;
import com.crystaldecisions.sdk.occa.report.application.DatabaseController;
import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;
import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
public class HelloWorldSwing {
* @param args
public static void main(String[] args) {
HelloWorldSwing pgm = new HelloWorldSwing();
try {
pgm.createAndShowGUI();
} catch (Exception e) {
e.printStackTrace();
//JOptionPane.showMessageDialog(null, e.toString());
* @throws Exception
public void createAndShowGUI() throws Exception {
// Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(false);
// Create and set up the window.
JFrame frame = new JFrame("HelloWorldSwing");
frame.setTitle("Titolo del Report");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ReportViewerBean viewer = new ReportViewerBean();
viewer.init(new String[0], null, null, null);
ReportClientDocument rpt = new ReportClientDocument();
rpt.setReportAppServer(ReportClientDocument.inprocConnectionString); // inproc:jrc
rpt.open("Report.rpt", OpenReportOptions._openAsReadOnly);
IReportSource rptSource = rpt.getReportSource();
viewer.setReportSource(rptSource);
frame.getContentPane().add(viewer, BorderLayout.CENTER);
frame.setSize(1930, 1030);
frame.setVisible(true);
viewer.start(); -
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'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't tested this solution because I don'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'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's blog - http://diamond.businessobjects.com/blog/10</a></p>
-
Swings & crystal reports.
hi
i am working with Crystal Reports & Java swings.
i am able to view a simple report in the viewer using ReportViewerBean. how should i pass parameters to the report. every time i try to view a report which need parameters i get "Please Provide Information" pop-up in the viewer & a "LOGON Failed" message on the console.
i am hardcoding the value of the parameters that i want to pass to my report. i am not using JSP.
what is to be done.
thanksSounds like a problem that is specific to crystal reports, not swing. You should direct your question somewhere with people that know that tool... like, say... the vendor of the product.
-
Compile Project with Maven and Crystal Reports dependencies
Hi.
I'd like to build a java project with maven. That project uses Crystal Reports. I have added all Crystal Reports jar files in the folder lib (from the runtime download) to my maven dependencies. But i get always the following error message.
The import com.crystaldecisions.ReportViewer cannot be resolved
in that package is the ReportViewerBean.class an so i get also the following message.
ReportViewerBean cannot be resolved
I tried several different ways with no success.
im looking foreward for your advice.
thanks.
Edited by: hansmeier_de on Aug 25, 2010 11:20 AMdid you list them in the dependencies in your pom file?
-
How to Call Crystal Reports from Swing Application
Hi All,
I have a requirement for calling Crystal Report from Swing Application. Please let me know how can I do that, and also provide the Source code for calling the crystal report.
Thanks in advance.
Chandrahi
this is the code that i am using in my application which is similar to urs. but i am working with CR XI so make all the neccessary changes.
import java.awt.*;
import javax.swing.*;
import com.crystaldecisions.ReportViewer.*;
import com.crystaldecisions.reports.sdk.*;
import com.crystaldecisions.sdk.occa.report.reportsource.*;
public class HelloSwing
public static void createAndShowGUI()
try
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("HelloWorldSwing");
frame.setTitle( "Testing Reports");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ReportViewerBean viewer = new ReportViewerBean();
viewer.init( new String[0], null, null, null);
ReportClientDocument rpt = new ReportClientDocument();
rpt.open( "report path", 1 );
IReportSource rptSource = rpt.getReportSource();
viewer.setReportSource( rptSource );
frame.getContentPane().add( viewer, BorderLayout.CENTER );
frame.setSize( 700, 500 );
frame.setVisible(true);
viewer.start();
catch ( Exception exception )
System.out.println( exception.toString() );
public static void main(String[] args)
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
there are 23 jar files that u need to import into ur package. but remember that ReportViewerBean should be the first jar file in the list & it should be followed by jrcerom.jar
specify the key in the CRConfig.xml file (which also has to be imported in the package)
u can find these jar files in the common objects folder in your program files.
hope it helps. best of luck -
Hi
I m using NetBeans for Java(Swing+JDBC) development
I wana call Crystal Report file (.rpt) file from Java
I found following source on Sun Forums:-
import java.awt.*;
import javax.swing.*;
import com.crystaldecisions.ReportViewer.*;
// Use these to talk to RAS
import com.crystaldecisions.sdk.occa.report.application.*;
import com.crystaldecisions.sdk.occa.report.reportsource.*;
public class HelloWorldSwing
private static void createAndShowGUI()
try
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(false);
//Create and set up the window.
JFrame frame = new JFrame("HelloWorldSwing");
frame.setTitle( "Testing 1, 2, 3");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ReportViewerBean viewer = new ReportViewerBean();
viewer.init( new String[0], null, null, null);
ReportClientDocument rpt = new ReportClientDocument();
// FLui: set the RAS server if you are using RAS
rpt.setReportAppServer( "localhost" );
rpt.open( "ras://C:\\Reports\\MyReport.rpt", 0 );
IReportSource rptSource = rpt.getReportSource();
viewer.setReportSource( rptSource );
frame.getContentPane().add( viewer, BorderLayout.CENTER );
frame.setSize( 700, 500 );
frame.setVisible(true);
viewer.start();
catch ( Exception exception )
System.out.println( exception.toString() );
public static void main(String[] args)
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
//com.crystaldecisions.ReportViewer.ReportViewerFrame.main( args );
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
}Presently I need ReportViewer.jar
If any one have, please give me at <[email protected]>
Also guide me how we can pass sql & parameters to Crystal Reporthttp://www.google.co.za/search?hl=en&q=%2Bjava+%2B%22crystal+reports%22&meta=
Gives this as the first result:
http://www.businessobjects.com/products/reporting/crystalreports/java/default.asp
You then search the site:
http://www.businessobjects.com/search/?summary=1&client=www_frontend&proxystylesheet=www_frontend&output=xml_no_dtd&lr=lang_en&oe=utf8&ie=utf8&website=&ct=livewww-all&q=java
Which leads you to this page:
http://www.businessobjects.com/products/dev_zone/java/default.asp
Try STFW, RTFM and implement something, then ask a specific question. -
Switching from Microsoft JVM to sun JVM plugin. Problem w crystal reports
Hi,
I am currently in the process of switching off of the microsoft jvm to the sun plugin. I am using the reportviewerbean to view the reports. This works fine in the microsoft JVM, but I am getting a server not found error in the java JVM plugin. Here is the codes that is currently used:
bean = new ReportViewerBean();
if ( reportname.startsWith("/") )
java.net.URL url = this.getDocumentBase();
reportname = url.getProtocol() + "://" + url.getHost() + ":" + url.getPort() + reportname;
add((Component) bean);
((Component) bean).setBounds(0, 0, (int)this.getSize().width, (int)this.getSize().height);
bean.start();
bean.setBackground(Color.gray);
bean.setPromptOnRefresh(false);
bean.setHasGroupTree(false);
bean.setHasPrintButton(true);
//setZoomFactor(100);
bean.setZoomFactor(-2);
Log.debug("In report viewer: setting report parameters: "+reportparameters);
bean.setReportParameter(reportparameters);
* It's important to set the report name last. This tells the Crystal viewer to
* start the report. Otherwise you can get multiple URL requests for the same report.
Log.debug("In report viewer: setting reportname: "+reportname);
bean.setReportName(reportname);
Can anyone tell me what I am doing wrong or what I need to do differently for the SUN environment
ThanksHi
I have started playing with this again my full msg is:
Crystal Report Viewer 1.3.7
java.vendor = Sun Microsystems Inc.
java.version = 1.6.0_05
os.arch = x86
os.version = 5.1
File name = java_plugin1.epf
"java_plugin1.epf" does not exist.
No response from server.
URL = http://localhost:7001/cis/servlets/reports/mgnt/WorkflowDetailReport1.rpt?viewer=java&vfmt=encp&vgen=652&language=en
Parameters = viewer=java_plugin&cmd=get_pg&ttl_info=&page=1&incomplete_page=1&incomplete_page_count=1&pversion=3&promptOnRefresh=0
network: Connecting http://localhost:7001/cis/servlets/reports/mgnt/WorkflowDetailReport1.rpt?viewer=java&vfmt=encp&vgen=652&language=en with proxy=DIRECT
Failed to connect to server.
I have noticed that the viewer is set to equal java and not java_plugin. I am wondering if this is the problem. does anyone know how to change the viewer= ?
thanks,
Marc -
i got a question here... i am now trying to display a sample crystal report (.rpt) on my application. It isn't web based.. it's just a simple java application. i try to call the report and display it using ReportViewerBean which is a viewer in package :
com.seagatesoftware.img.ReportViewer.ReportViewerBean
ReportViewerBean b = new ReportViewerBean(); b.setReportName("http://localhost:8080/?report=file:c:/SAMPLE_REPORTS/BalanceSheet.rpt");
b.setShowGroupTree(false);// Set Show Group Tree to False
b.init();//Show the Frame
it needs a url for the report location and i figure i need to put the report on a server.. currently, i am connecting to a jboss server to save and retrieve database data from mysql.
where should i put the report in the jboss directories? and when my java application runs, (it's an applet actually) i just click "view report" for eg, and it will connect to jboss and jboss will noe wat i am requesting?do i dun need to specify paths? coz how would jboss knows where to retrieve the report from?
currently, i am specifying it to the c: drive.. which is not working..
i got lotsa questions on this.. quite a headache actually coz i am new to jboss... thanx in advance..
=)
chrisQuite a few problems with that appoach,
Firstly crystal enterprise on IIS is required to be installed.
Secondly copy the report into the wwwroot folder on the server.
Try accessing the report through a browser as an unmanged report
eg http://<your server>/BalanceSheet.rpt
This should bring up the report as an HTML page. If this doesnt work you havent got things setup properly and you can forget about attempting to use the ReportViewerBean because it wont work either.
If that works then you can use the viewer to do a
ReportViewerBean b = new ReportViewerBean();
b.setReportName("http://<your server>/BalanceSheet.rpt");
b.setShowGroupTree(false);// Set Show Group Tree to False
b.init();//Show the Frame -
If image file not exist in image path crystal report not open and give me exception error problem
Hi guys my code below show pictures for all employees
code is working but i have proplem
if image not exist in path
crystal report not open and give me exception error image file not exist in path
although the employee no found in database but if image not exist in path when loop crystal report will not open
how to ignore image files not exist in path and open report this is actually what i need
my code below as following
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
FileStream fs = null;
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dr["Image"] = imgbyte;
fs.Dispose();
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
and exception error as belowFirst: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
Second : Drag And drop this image Filed Where I want.
private void LoadReport()
frmCheckWeigher rpt = new frmCheckWeigher();
CryRe_DailyBatch report = new CryRe_DailyBatch();
DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
DataTable dt = GetImageRow(table, "Footer.Jpg");
report.SetDataSource(dt);
crv1.ReportSource = report;
crv1.Refresh();
By this Function I merge My Image data into dataTable
private DataTable GetImageRow(DataTable dt, string ImageName)
try
FileStream fs;
BinaryReader br;
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
else
// if photo does not exist show the nophoto.jpg file
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
// initialise the binary reader from file streamobject
br = new BinaryReader(fs);
// define the byte array of filelength
byte[] imgbyte = new byte[fs.Length + 1];
// read the bytes from the binary reader
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dt.Rows[0]["Image"] = imgbyte;
br.Close();
// close the binary reader
fs.Close();
// close the file stream
catch (Exception ex)
// error handling
MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
return dt;
// Return Datatable After Image Row Insertion
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Sales quote layout rows doubled in crystal report layout
Dear All,
Sales quote layout rows doubled in crystal report layout.
In sales quote layout the rows are doubled. Even in the standard layout. If the quote contains only two rows. Then it is doubled as 4 rows in the crystal report layout.
It is happening in the particular database. Other database are working fine. I request you people to help me to overcome this issue.
Regards,
SivaHi Siva,
If this is regarding CR in SAP B1 then please repost to the SAP Business One Application space.
-Abhilash -
Sale Order Query Print layout/Crystal Report Query required
Hi Experts,
I created a Sale Order. Items included in it are service and material.
(I created a BOM, bound the child material item to the parent service item. Moreover child item will have unit price where as parent item will not have unit price)
I need the report on it please let me know how i can do it.
I tried with below query
select a.DocEntry, a.DocNum, a.CardCode, a.CardName, b.DocEntry,b.ItemCode, b.Dscription, b.Quantity, b.Price, b.LineTotal, a.DocTotal, a.VatSum
from ORDR a inner join RDR1 b on a.DocEntry = b.DocEntry
--and b.TreeType <> 'N'
where a.docnum = '14240621'
output of above query is
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
2493.76
43940.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0001
Material for PROVIDING & LAYING
17.62
2800
49336
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
1980
19908.9
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0002
Material for BM CM INCLUDING CEMENT
10.055
1650
16590.75
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
116.5
7572.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0003
Material for P/APPLYING
65
65
4225
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
31625.05
70618.74
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0004
Material for P& FIXING
2.233
44000
98252
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
3593
10779
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0005
Material for PROVIDING RMC
3
4847
14541
354652
18888.46
and my desired output is
Unit price of both child item and parent item should be display in single column. ie. cumulative in Unit Price Column and Linetotal respectively.
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
5293.76
93276.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
3630
36499.65
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
181.5
11797.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
75625.05
168870.7
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
8440
25320
354652
18888.46
please let me know the update on this.
with regardsHi Nagarajan,
thanks for reply..
1) Yes, i.e i have taken into BomType: Template
2) i did not get any helpful output by using treetype by keeping 'S' and 'N', i kept in comment.
3) Actually MT0001-05 - these are material item- unit prices are fixed. see in attached image
for parent item, unit prices are not fixed. I give the price for them in Sale Order.
I want unit price for parent and child should be summed/cumulative for Sale Order print.
(in my above post, first matrix exactly same as sale order line items plz check it)
Please help me, how i can achieve this by query(for PLd or Crystal report)
With Regards -
SQL Connections remain open after Crystal Report closes
I am wirting an interface to use the crystal report viewer to print reports, connecting to a Progress Open Edge 10.1B database. From our application we declare the application, report, exportoptions and connectionproperties objects and pass these to the crystal reports viewer. Once the report is printed we release the objects and set their variables for null. However we are finding that the SQL connection to the database is remaining connected and we can only release the connection by manually going in a disconnecting.
I have read in forums that people use .dispose or .close to release the connection, however we do not have access to these methods as we do not use .NET. Are there any methods we can use to disconnect these sql connections?Hi Dean,
Moved to the Legacy Application forums. Likely using the RDC as your report engine.
You should still be able to close and dispose of the report objects. They are not specific to .NET.
In VB it would look something like these lines::
crReport.Close
Set CrystalActiveXReportViewer1.ReportSource = Nothing
Set crReport = Nothing
Once the report is closed it should disconnect from the DB. If you close the application does that disconnect?
Have you looked on 4GL's site for info on how to?
Thank you
Don -
Dunning Letter as Crystal Report: What tables? (SAP B1 9.0)
Dear Experts,
I am being asked to revise the Dunning Letters for our clients. The existing PLDs for each Dunning Letter shows most data fields as system variables. The existing Crystal Report for Dunning Letter 1 is a conversion from the PLD and doesn't show table information for most of the report's main items. There are tables in the report but they are standard ones (OADM, OADP, OCRD, OHEM, OSLP). It also includes a "table" called "PLD__ITEMS" which has all the PLD system variables and no B1 table or field/column information.
As I'm just now starting to work with dunning letters, I see that I can't even run this report in Crystal. The PLD__Items datasource prompts me for a file path and class name. Any ideas what one enters here to run the report outside of B1 (from the Crystal report designer)?
The main focus of my question is: Has anyone created a Crystal Report to replicate the Dunning Letter and if so, what tables are involved and how are they connected? If I can create a Dunning Letter entirely in Crystal, I can replicate it across all clients and get the correct fields/columns of data the clients want. The inclusion of the PLD__Items apparently limits my ability to test the results. I would prefer to avoid the PLD limitations.
Thanks for any assistance.Thank you Nagarajan. I have a dunning letter created in Crystal Reports for our client. It is fairly limited in scope, it just has the customer name and address, invoice numbers and dates, amounts due and the text they wanted in it.
I can import it into B1 9.0 and set it as the default for Dunning Letter #1 and it runs, but unlike other formats where there is a DocEntry and/or ObjectID and a ?DocKey@ or ?ObjectId@ parameter, how do I limit the report to just one customer? Typical document layouts run for the document that's on the screen. In the dunning process, the report runs once for every customer when the Dunning Letter Method is set to "One Letter per BP". I have to limit the report to one customer at a time. Right now, each dunning letter based on the Crystal report is identical and it contains all the data for every customer.
So, does anyone have any ideas for what selection criteria needs to be included in the Crystal report to have it select just one customer from the dunning wizard tables? Thanks.
Michael
Edit: I created a ?WizardID@ parameter and a ?CardCode@ parameter to limit the report to a single dunning wizard event and a single customer. While it works fine in Crystal itself, it doesn't work in B1 at all. I had thought that by limiting the report in this way, it would only create dunning letters for a single customer.
Maybe you are looking for
-
I've been trying to incorporate a video in my menu, but despite many tutorials I'm still struggling. Below is my created menu. I've created it so that I can play a video within the large white area that takes up the bottom left corner of the menu. I
-
HT1338 my computer is becoming very slow
My computer is becoming very slow, and hanging alot these days really dont know why.
-
How to view Script Source for Execution Method type = "Spawned" ?
I finded Concurrent Program Executable of "Actual Cost Worker" Concurrent Program Executable Information Executable :CMCTCM Sort Name : CMCTCM Apllication : Oracle Bills of Mateial Description Unified : Cost Manager Execution Method : Spawned Excutio
-
Is there an easy to understand tutorial with all the step to add a component to the "User Defined Extension Functions" pallet. I want to create a function that call a database stored procedure and be able to use it in an xsl map.
-
Dear, We are using oracle 9i with data guard. Today i check the data guard from standby server. I get following message ORA-16525: the Data Guard broker is not yet available ORA-06512: at "SYS.X$DBMS_DRS", line 109 ORA-06512: at line 2 after i run fo