[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Crystal Reports and Logging with the JRC DB Failure

Posted on 2005-04-25
4
Medium Priority
?
510 Views
Last Modified: 2012-06-22
I am using the JRC.  I downloaded DataDirect JDBC libraries and successfully was able to create a report in Crystal Designer.

I used the following jdbc params in designer.

jdbc url:  jdbc:datadirect:oracle:\\192.168.160.2;SID=o
jdbc driver:  com.ddtek.jdbc.oracle.OracleDriver

The designer connected and displayed table and data succesfully.

Now when I go to run the report in my jsp, I get database login failure.

I don't understand because I  set IConnectionInfo OK.

What could be going wrong?


<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
<%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.ConnectionInfo"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.ConnectionInfos"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.IConnectionInfo"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2"%>
<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
<%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
<%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
<netui:html>
<head>
<title>
Web Application Page
</title>
</head>
<body>
<p>
<%try
{
String report = "report1.rpt";
IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report,request.getLocale());

CrystalReportViewer viewer = new CrystalReportViewer();
ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo connInfo = new ConnectionInfo();
connInfo.setUserName("scott");
connInfo.setPassword("tiger");

connInfos.add(connInfo);

viewer.setOwnPage(true);
viewer.setReportSource(reportSource);
viewer.setDatabaseLogonInfos(connInfos);
viewer.setEnableLogonPrompt(false);
viewer.setZoomFactor(100);
viewer.setHasSearchButton(false);
viewer.setHasLogo(false);
viewer.setHasPrintButton(true);
viewer.setDisplayGroupTree(false);

viewer.refresh();
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
viewer.dispose();
}
catch(Exception e)
{
System.out.print(e.getMessage());
}
%>
</p>
</body>
</netui:html>
 
0
Comment
Question by:lcor
  • 2
4 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 13861182
I believe you have to set the logon info to the report not the viewer.

mlmcc
0
 

Author Comment

by:lcor
ID: 13867058
Yes, login information is stored in the report using Crystal Designer.

Well, thanks for at least trying!
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 13871240
Glad i could help

mlmcc
0
 
LVL 11

Expert Comment

by:Isisagate
ID: 14363388
I had a bunch of problems similar to the one you are describing.  I finally found luck with using an ODBC connection when using the designer and using a JDBC connection with the same name as the DSN that I used for the ODBC connection.

Good luck.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question