Skip to Content
avatar image
Former Member

Database logon for Oracle.

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 16, 2008 at 11:59 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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