on 10-16-2008 7:44 AM
I have created the project on a basis-Crystal reports web project for Eclipse.
At report viewing in a web to be requested connection to Oracle.
the report you reguested reguires information.
Databese logon
User ID
Password
As I understand connection it is necessary to register in a file Crystal-Report1-viewer.jsp.
Here Crystal-Report1-viewer.jsp structure.
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>
<crviewer:viewer reportSourceType="reportingComponent" viewerName="CrystalReport1-viewer" reportSourceVar="CrystalReport1"
isOwnPage="true"displayToolbarRefreshButton="true">
<crviewer:report reportName="CrystalReport1.rpt"/>
</crviewer:viewer>
Prompt as it is necessary to register connection to Oracle?
Hello,
Do you want to set database credentials from the code ?
In that case, we need to set database credentials from the code itself.
Could you please clarify your requirement ?
Thanks,
Chinmay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://boc.sdn.sap.com/node/418 might give you a few pointers, or atleast point you in the correct direction
(Hope thats the cirrect address, if you you will find more links on that page)
Initializing database logon information
http://www.ibm.com/developerworks/rational/library/06/1017_bajaj/Snap23.jpg (Example)
Crystal-Report1-viewer.jsp
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer" %>
<crviewer:viewer reportSourceType="reportingComponent" viewerName="CrystalReport1-viewer" reportSourceVar="CrystalReport1"
isOwnPage="true"displayToolbarRefreshButton="true">
<crviewer:report reportName="CrystalReport1.rpt"/>
<%@page import="com.crystaldecisions.reports.sdk.*"%>
<%@page import="com.crystaldecisions.sdk.occa.report.data.*"%>
<%@page import="com.crystaldecisions.report.web.viewer.*"%>
<%
Object reportSource = session.getAttribute("reportSource");
if(reportSource== null)
{
ReportClienDocument reportClientDoc = new ReportClientDocument ();
Sring report = "/CrystalReport1.rpt";
reportClienDoc.open(report,0);
reportSource = reportClientDoc.getReportSource();
session.setAttribute("reportSource", reportSource);
}
ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo connInfo1 = new ConnectioInfo();
connInfo1.setUserName("login");
connInfo1.setPassword("Password");
connInfos.add(connInfo1);
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
viewer.setEnableLogonPrompt(false);
viewer.setDatabaseLogonInfos(connInfos);
viewer.setOwnPage(true);
viewer.ProcessHttpRaguest(reguest,response,getServletConfig().getServletContext(),out);
%>
</crviewer:viewer>
i corrected have written?
Edited by: savo-iolo on Oct 17, 2008 7:38 AM
Edited by: savo-iolo on Oct 17, 2008 7:39 AM
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.