Set parameters input automatically in my report and connection to my base

Hello
this my programmes , it work it's ok ( see bottom of the page )
Now i have a rapport rpt with a input edit (example number customer )
I want by my file jsp that the number customer display automatically
in my rapport rpt ( variable string or integer or date) and after validate automaticcaly
and connection to my database automartically ( database oracle 8 user and paswword)
(by example with my url , i pass a parameters input and automatically i will see
the rapport rpt ) it's possible , How to make in jsp ?
thanks to help me
regards
Michel
Ps : Notes fresh  for the connection in my database oracle
i have modified CrystalReportViewer.jsp but i have an message
"Information is needed before this report can be processed " why ?
<%@ page import="com.crystaldecisions.report.web.viewer.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
<%
CrystalReportViewer viewer = new CrystalReportViewer();
ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo connInfo1 = new ConnectionInfo();
connInfo1.setUserName("user");
connInfo1.setPassword("pass");
viewer.refresh();
Object reportSource = session.getAttribute("reportSource");
viewer.setReportSource(reportSource);
viewer.setDatabaseLogonInfos(connInfos);
viewer.setEnableLogonPrompt(false);
viewer.processHttpRequest(request, response,getServletConfig().getServletContext(), out);
viewer.dispose();
%>
this programmes are ok (but now i search to display a variable on my report)
via url
http://pa-81b36a7e9d/businessobjects/enterprise11/desktoplaunch/opendoc/view_report.jsp?sdoc=axeriatest&user=Administrator&pass=&cms=pa-81b36a7e9d
CrystalReportViewer.jsp
<%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
<%
     CrystalReportViewer viewer = new CrystalReportViewer();
     viewer.setName("CrystalReportViewer");
    viewer.setOwnPage(true);
    //Enable Active-X print mode. 
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    //Obtain report source of the report that the viewer will display.   
    Object reportSource = session.getAttribute("reportSource");
    viewer.setReportSource(reportSource);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
%>
view_report.jsp
<%
Applies to Versions:     XI
Creation Date:     Febuary 28 2005
Description:
                         This sample to demonstrates how to view a Crystal Report on demand in
    *                         the zero-client DHTML viewer. 
Author:               CW.
%>
<%@ page import = "com.crystaldecisions.sdk.occa.infostore.*,
                   com.crystaldecisions.sdk.plugin.desktop.common.*,
                   com.crystaldecisions.sdk.framework.*,
                   com.crystaldecisions.sdk.occa.security.*,
                   com.crystaldecisions.sdk.exception.SDKException,
                   com.crystaldecisions.sdk.occa.managedreports.IReportSourceFactory,
                   java.util.Locale,
                   com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"
%>
<%@ include file = "logonform.jsp" %>
<%
     String cms             = request.getParameter("cms");
     String user             = request.getParameter("user");
     String pass             = request.getParameter("pass");
     String sdocName       = request.getParameter("sdoc");
     try {
         //If logon information is required, display the logonForm and exit.
          //Create a special logon form that requests 2 Report Names
          //(code for LogonForm class is included).
          LogonForm logonform = new LogonForm(response, request, LogonForm.REPORT_NAME);
          //if (logonform.display_if_needed()) return;
          // ici doit recuperer le nom du document
          logonform.reportname[0] =  sdocName ; //"diagramme";
          //Log in.
          IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon(user,pass,cms,"secEnterprise");
         //Grab the InfoStore from the httpsession
         IInfoStore infoStore = (IInfoStore)enterpriseSession.getService("", "InfoStore");
         //Query for the report object in the CMS.  See the Developer Reference guide for more information the query language. 
         IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query("SELECT TOP 1 * " +
                                                                                 "FROM CI_INFOOBJECTS " +
                                                                            "WHERE SI_PROGID = 'CrystalEnterprise.Report' AND SI_INSTANCE=0 AND SI_NAME='" + logonform.reportname[0] + "'" );
         if (oInfoObjects.size() > 0) {
              //Retrieve the latest instance of the report
              IInfoObject oInfoObject = (IInfoObject) oInfoObjects.get(0);
              //Use the PS report factory to obtain a report source that will be processed on the Page Server.   
              IReportSourceFactory factoryPS = (IReportSourceFactory)enterpriseSession.getService("PSReportFactory");
              Object reportSource = factoryPS.openReportSource((oInfoObject), Locale.ENGLISH);
              session.setAttribute("reportSource", reportSource);
              //View the report in the standard DHTML viewer.        
              response.sendRedirect("CrystalReportViewer.jsp");
         else {
              out.println("Report " + logonform.reportname[0] + " not found.");     
    catch(SDKException sdkEx) {
          out.println(sdkEx);  
%>
logonform.jsp
<%!
/**************************** class LogonForm ***************************
This logon form is used to gather the logon information needed
to login to Enterprise
private class LogonForm {
     HttpServletResponse response;
     HttpServletRequest request;
     int num_reports_needed = 1;
     String[] reportname;
     public static final int NONE = 0;
     public static final int REPORT_NAME = 1;
     public static final int REPORT_NAME_X2 = 2;
Constructor - Save the response and request objects
     LogonForm(HttpServletResponse response, HttpServletRequest request)
          //this.response = response;
          //this.request = request;
Constructor with options - Add some optional boxes to request other
                           input from the user such as reportnames.
     LogonForm(HttpServletResponse response, HttpServletRequest request, int extra_requests) {
          this.response = response;
          this.request = request;
          switch (extra_requests) {
               case NONE:
                    break;
               case REPORT_NAME:
                    num_reports_needed = 1;
                    reportname = new String[1];
                    break;
               case REPORT_NAME_X2:
                    num_reports_needed = 2;
                    reportname = new String[2];
                    break;
%>

oh thanks but i have an error on this example  Viewingview_report_parameters
but where is my connection to my database in file jsp ?
thanks
windows
CMS  NAme  = MyCMS
user = myuser
pass = password
aut = enterprise
doc = my doc
ok
after enter values : i Put my values
ok
after click on button view report this is error
Etat HTTP 500 -
type Rapport d'exception
message
description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
exception
org.apache.jasper.JasperException
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
cause mère
java.lang.NullPointerException
     org.apache.jsp.opendoc.CrystalReportViewer_jsp._jspService(CrystalReportViewer_jsp.java:80)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/5.0.27.
Apache Tomcat/5.0.27

Similar Messages

  • Information Broadcasting ( Automatically execute a report and e-mail it)

    Hi,
    Can BEx Automatically execute a report and e-mail it. The requirement is to Execute a Report periodically  and send the report in <b>EXCEL SHEET</b> format to the given e-mail ID.
    I have tried configuring it in HTML format.... but I need it EXCEL format.
    Waiting for help from the SDN community...
    Thanks in Advance.....

    Hi,
    You can send the workbook automatically when you schedule thru information broadcaster.
    But you have to install precalculation server for distributing workbook..
    Have a look at OSS note 760775 ..
    Hope it helps..
    Regards,
    Siva.

  • Automatic scheduling of report and send the output  to user via email

    Good Morning,
    Please i need to scheduled report and send the output via email in Discoverer . Please can someone assist in how to achieve this ?

    Hi,
    You cannot schedule and email a Discoverer report using standard Discoverer scheduling. You have to use a third party scheduler and Discoverer Desktop running on a windows PC.
    This presentation has some more details on how to do this.
    Rod West

  • Crystal Reports and connecting to multiple tables in a dataset - I'm Going Crazy!!

    This is my first application, first report and first everything.  Wouldn't you know the report I am trying to produce is probably more difficult!!  What is happening is that I have a form(screen) up in my application with the information displayed on it from a recrod in a table that I want to put on a report to be view and/or printed and eventually down the road I want to incorporate a signature.  One step at a time though, here is what I have accomplished.  I have created the report, I have gotten it to display in the viewer but it will not push the data from the table that I want displayed.  It only displays the text that I have typed on the form.  This is a Visual Basic application created in Visual Studio 2005 using a SQL database.  If you need more information then just ask and I will try to fumble through and tell you what I know.  (Oh and to top it off............I am also trying to get information to display from other tables also (codes connected to descriptions etc.))
    Any help would be really appreciated as I have went through tutorials, read white papers, tech notes and anything else I can find but I just can't get it to work!!
    Thanks!

    You do need to give more information. To better help, we would need to know the database, when you say SQL do you mean SQL Server, how you created the dataset, whether there are multiple tables in a single dataset or multiple datasets, etc.
    The report appears to be running so the underlying issue as you know will likely be the dataset. You may want to confirm the dataset does in fact have data in it.  Returning a simple count will let you know there are rows. If you used the components rather than code to create the objects you can also see the data returned in the fill process.
    Once you know you have data in the dataset, you can check your reports connection to the dataset.
    Just hang in there... the problem is probably a simple fix. I am sure others will follow on with more suggestions.
    Regards,
    John W.

  • Creating Report and connecting to database

    Hi I am trying to create a report using Crystal Reports and VB.net, However when I use the database expert to connect to the database I get
    the error code 0xbe9, cannot open the database.
    It sometimes work and sometimes do not.
    Please help
    Regards
    Navin

    Hi Navin
    1) What version of CR - please be precise. If this is a stand-alone designer go to "Help | ABout...". If this is a CR bundle for VS, quote the version of crpe32.dll.
    2) What version of .NET?
    3) What database?
    4) How are you connecting to the database?
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow me on Twitter

  • SQL Developer: View menu selections Reports and Connections not working

    Downloaded latest SQL Developer May 9 updated version and my dropdown selections from the View menu for Connections, and View Reports do not work. However, Snippets does appear when selected. Hate to lose some of the User Defined reports I had created. Any help would be appreciated.

    Don't know if I get what you're saying: the entries Connections and Reports from the View menu don't work?
    On top of the connection tree, if you get one, aren't there the two tabs with these options?
    If you're unable to view the whole tree, you're installation would be corrupted. Install from scratch in a separate folder, first without migration to see if that resolves the issue. Then you could do the same with migration to retrieve all previous settings and connections.
    K.

  • [Interface] - Passing variety parameters/input to PL/SQL report

    Hi,
    I've the PL/SQL report which can allow passing in the parameter, i use '&'.
    the report is given to the end user who do not have the IDE for PL/SQL. the machanism of the report is generated into the spool file and import into excel format.
    now i am wondering how to create a tool using SQL or PL/SQL to allow the end user to choose the parameter(s) dynamically and passing into the PL/SQL to generate the report based on the input selected.
    the parameters like below:
    package code :
    week no :
    year :
    department :
    all the above parameters, the data would be selected from the existing lookup table. the user is allow to select more than 1 input for specified parameter for instance i want to spool report for week 1 until week 5.
    pls advise any solution on this topic. thanks

    hi scoot,
    thank for reply.
    yep, i'm using sql*plus and also sql navigator 4.0 .
    the user don't have the software to interact. i'm thinking of build an simple interface using VB and passing in the parameter then initiate the sql*plus to run the program in background mode.
    but if you have any other solution which not need to use other software to wirte such program , pls let me know immediately. thank

  • HT1386 I set up my iPhone 4S on my mates PC, can i set up iTunes on my laptop now and connect my phone

    Help

    Well, if it were easy to get around this, there wouldn't be much point in having a restrictions passcode to begin with. You can try something like this to extract your messages, from your backup:
    http://www.iphonebackupextractor.com/
    Then achieve them on your computer.

  • Automating Generation of reports and mailing it.

    Hi,
    How do I automate generation of reports and mail it through the Oracle Server. The messaging system being implemented out here is Lotus Domino Server 4.6
    Regards,
    Alka Mishra.

    Can you tell me more how to create store procedure UTL_HTTP or give me example and why I need to create a DB table with a DB trigger and give example too.
    can I send to Internet email (if I have email address) or Unix mail only?
    Thank you very much
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by The Oracle Reports team:
    Assuming you are using Developer 1.6.1 or later and version 7.3 or later of Oracle database
    1. set up the Reports server for web reporting (see whitepaper on configuring reports server available on otn for more info, and of course the doc).
    2. Write a set of stored procedures that use UTL_HTTP to send an HTTP request to the Reports server. You can specify all the parameters to run a report on the URL (incl. running and mailling a report).
    3. Create a DB table with a DB trigger that call the pacakged procedure you just wrote. Now every time a row is inserted (for example) into the table, a report can be run and the output mailed.
    This will be made much easier/simpler in Reports 7 - but that is a way off.
    Regards
    The Oracle Reports Team http://technet.oracle.com <HR></BLOCKQUOTE>
    null

  • How to set defalt parameter(s) for Crystal Report in CRS

    Hi everybody,
        I am new to Crystal Report designing and Crystal Report Server. My problem is; I had created one Crystal Report with sub-reports and some parameters. I had given default value for those parameters. These parameters are there in main report and linked with sub-reports. After that I deployed it in the Crystal Report Server.
        Now i want to schedule the report. while scheduling the report, I want to run the report using default parameter(s). If I Clicked on Schedule button, it is giving "report failed" error. And in parameter list it is showing "No parameters". Why this is happening? Is this default behaviour of Crystal Report Server? Can anybody please suggest me how can I give default values for a report automatically?(using Crystal Report Server)
    Thanks in Advance.
    Jithesh

    Not sure if I understand the question correctly or not.  It sounds like you have a main report, with a sub-report and a value is being passed from the main to the sub-report.
    When you say you created some parameters, are those parameters in the sub-report or main report?
    If it were me I would create a parameter in the main report, and a parameter in the sub report.  Have the two reports link on the two parameters. 
    When you go to schedule the job, set the default value in the cmc under process/parameters. 
    Let me know if this answers your question.  I tend to not fully understand the problem often times.
    Good luck!
    Rody

  • Can i pass plsql table as parameter in a report and display the values

    Hi.I have a form with five text items.
    Also inside the form I have a button and when I push the button the trigger fires(WHEN BUTTON PRESSED) and the values of the form passed and display in the report.Is it possible to have in the form a detail for example with three rows and three columns and with some way(mayby as plsql table) pass all the parameters from the form to report and then display in the report?I asume the report is a tabular report.
    Thanks in advance Panagiotis.

    Hi Nigel,
    By default, SharePoint will display folder icon for document sets in the search results.
    If you need to change this icon in search results, then you can modify the display template for document sets.
    http://blogs.technet.com/b/tothesharepoint/archive/2013/09/04/understand-how-search-results-are-displayed-in-sharepoint-server-2013.aspx
    How did you set query in the Result Source?
    I tested the query below in the result source in my environment, and it worked fine.
    {searchTerms}ContentTypeID:0x0120D520*
    I recommend to check if the document sets have been crawled in crawl log.
    If not, please run a full crawl in Search Service Application and then check the results.
    Best regards.
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Crystal report(Can i link sub report and main report Compulsorily) - invalid path

    hi.
    i need small clarification.
    i am developing one Crystal report
    main report i took it from rdr1 one table...
    report is working fine..
    Sub report i took it from inv1 one table.
    i have not linked any fields from these tables.
    May be it is having links in b1..
    but in my other report both the tables.... from main report  and sub report does not have any relation.
    My Questions is..
    Can i Compulsorily link fields to main report...
    if both does not have any relation what should i do...
    i took two tables.
    main report rdr1
    sub report inv1...
    if i  run the report it is asking two parameters one is for sub report and other one for main report working find in crystal report.
    but...i want to run the report in b1.
    while importing i am getting the error (Plz have a look on below image)
    if i choose any other report it is importing  fine...
    Clearly i am mentioning i dont want to link both tables there is no links between two reports...
    in this scenario can develop  a report..
    I need your Valuable suggestions.
    here below u can find my developed sample report...
    http://www.megafileupload.com/en/file/544758/NewReport-rpt.html

    hi.
    If i try only i am getting the error..
    out side if i run i am able to run the crystal report but
    in b1 i am not able to import the report.
    you can also try my report
    from below link u can get my simple report.
    if u find any mistake what i have done plz inform me..
    http://megafileupload.com/en/file/544806/NewReport85-rpt.html

  • Re: Tax Report and P&L Report's Sales total not matching

    Hi,
    My Total Sales Input in the tax report and my total sales in the P&L for a period doesnt match. I persume they both should match as all Tax inputs are sales. I have checked for manual journals into sales account but there are no manual journals.
    Any suggestions as to where the differnaces could be located.
    Regards

    HI,
    No I have not made any queries, but using the standard SAP tax report which is under Fianancial Reports - Accounting - Tax - Tax Report. Selected posting date as the date range for the period and Transaction types and selected all transaction types from the listing.
    Regards

  • Crystal Reports and BW Query- Translation

    Hello,
    I'm trying to use Crystal reports with BW Query in the Hebrew Language.
    When i open the Crystal Reports and connect to SAP I'm putting the Hebrew language key in the logon screen. When the crystal report starts i can see the reports info objects but without the Hebrew description. I can see that in the formula fields the Language key is selected but shouldnt i get the info objects description as well?
    Thanks,
    David

    Hi David,
    when I create a new report (using the SAP toolbar) I always get the descriptions for the info objects on the field explorer according to the language I set when I logon on into the SAP system my query resides in. I tried with both english and german language and it works fine. I assume you have installed the hebrew language pack for CR and that the hebrew descriptions are maintained in your SAP system. I also assume that you are talking about creating a report here and not opening an existing one though. In this case the language at creation time defines which descriptions are displayed.
    If the above assumptions are valid, then you may face a hebrew language specific problem here. Opening a support case would probably make sense.
    Regards,
    Stratos

  • Set Parameters in sub reports - can't know which parameter is in sub report

    Hi,
    I am trying to set parameters in reports that some time build from sub reports, the only input that I got is the parameters name(key) and there values.
    What I need is a way to retrieve the parameters from report and set them by the parameter name(key) with it's value.(when I am handle the case of parameter in sub report)
    and hope it's work!!
    any idea how to do this?
    My code is below, and I am using CR/VS2008.
    Thanks,
    Amos
    public class reportGenerator
        public reportGenerator(string reportTemplate, string reportResults, ListDictionary parameters)
            //Instantiate variables
            ReportDocument reportDocument = new ReportDocument();
            reportDocument.Load(reportTemplate);
            // Database Access
            ConnectionInfo connectionInfo = new ConnectionInfo();
            connectionInfo.ServerName = "ServerName";
            connectionInfo.DatabaseName = "DBName";
            connectionInfo.UserID = "UserId";
            connectionInfo.Password = "UserPassword";
            connectionInfo.IntegratedSecurity = false;
            SetDBLogonForReport(connectionInfo, reportDocument);
            reportDocument.SetDatabaseLogon("UserId", "UserPassword", "ServerName", "DBName", false);
            double Num = 0;
            bool isNum = false;
            ParameterDiscreteValue paramValue;
            foreach (System.Collections.DictionaryEntry param in parameters)
                isNum = double.TryParse((string)param.Value, out Num);
                if (isNum)
                    paramValue = new ParameterDiscreteValue();
                    paramValue.Value = Convert.ToDecimal(param.Value);
                    reportDocument.SetParameterValue((string)param.Key, paramValue.Value);
                else
                    reportDocument.SetParameterValue((string)param.Key, param.Value);
            reportDocument.SaveAs(reportResults, true);
        private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            Tables tables = reportDocument.Database.Tables;
            foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                tableLogonInfo.ConnectionInfo = connectionInfo;
                table.ApplyLogOnInfo(tableLogonInfo);

    You should review the SDK guide online because it answers all your questions.
    The [SetParameterValue |http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_net_doc/doc/crsdk_net_doc/html/crlrfCrystalDecisionsCrystalReportsEngineReportDocumentSetParameterValueTopic2.htm]method is overloaded 3 times. One of the overloads takes the name of the parameter, its value, and the name of the subreport it is in.
    public virtual void SetParameterValue(   string name,    object value,    string subreport);
    [Reading and Setting Discrete Parameters|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_net_doc/doc/crsdk_net_doc/html/crtsktutorialsrdparametersdiscreteintro.htm]

Maybe you are looking for