Passing arguements into a report

I am very new to Crystal Reports. I downloaded the eclipse distribution, ran the example tutorial video, and smiled when I got it all working.
My question is this. I want to pass an argument from the JSP page to the report. Is there a way to do this? And how would I catch that argument in one of the functions I created in Java?
My JSP file:
<crviewer:viewer reportSourceType="reportingComponent" viewerName="ShowReport-viewer" reportSourceVar="ShowReport" isOwnPage="true">
     <crviewer:report reportName="ShowReport.rpt" />
</crviewer:viewer>
Thanks!
Robert

<p>Hi Robert,</p><p>   I am glad to hear that you were able to find the information you were looking for. I will pass on your kind feedback to the Diamond team.  </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a>          </p>

Similar Messages

  • Why I can't pass parameters into CR from VB6

    I want to Pass parameters into crystal report from VB6.
    But whatever I try, it don't work Fine,
    always Show the message "This field name is not known".
    Crystal Report::
    Parameter: a.@cmpy;
                       b.@p1
    formula:
    a. If {?@cmpy} ="USA" or {?@cmpy} ="usa" then
          "This is test 1 sentences"
       else if {?@cmpy}="TWD" or {?@cmpy} = "twd"  then
          "This is test 2 sentences"
    b. if trim({?@p1})="1" then "This is test 3 sentences"  
    VB::
    Public oApp As New CRAXDDRT.Application
    Public oRpt As CRAXDDRT.Report
    oRpt.ParameterFields(1).ClearCurrentValueAndRange
    oRpt.ParameterFields(2).ClearCurrentValueAndRange
    oRpt.ParameterFields(1).AddCurrentValue ("TWD")
    oRpt.ParameterFields(2).AddCurrentValue ("1")  
    I had trid to use "IsCurrentValueSet" function to check whether parameter was set or not, and It responsed "Ture",so I so confused about it.
    Anyone know about this??
    ps. I had trid other way that change the formula indirectly, although it can work fine, but it isn't a right way to solve my problem.
    Edited by: DeanLai on Jun 22, 2010 8:54 AM

    I Find something.
    First I tried to add parameter and wanted to see these value on Report.
    So I inserted {?@cmpy} and {?@p1} into report, and used VB code
    "oRpt.ParameterFields(1).AddCurrentValue ("TWD")" and "oRpt.ParameterFields(2).AddCurrentValue ("1")",
    then ran the process, but it didn't display any value on report,
    so why it couldn't pass value into parameter??
    then I tried other way which was to add new parameter, and used the same way to pass
    value into parameter, then it can display value on report.
    So the different between these is {?@cmpy} and {?@p1} which come from
    Stores Procedure.
    While I set Database in crystal report, set all value into Store Procedure's
    parameter(the window about "Enter Parameter Values"), then it automatic come out the DB columns and parameter(SP parameter)
    , course include {?@cmpy} and {?@p1}.
    Do this problem cause my question?
    Can we pass value into parameter which come from SP parameter??
    Can we use these parameter into forumla??
    Edited by: DeanLai on Jun 30, 2010 11:56 AM

  • How to pass in a parameter into a report viewer on a jsp - and hidden

    Hi, I've built a php application and am using the java environment to enable the crystal report/viewer.  The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report viewer loading a report file with hidden parameters so to not expose other customer data (it's a shared database for multiple customers) preferably loaded from php using maybe the php java bridge. Would anyone happen to have any sample code or any guidance?
    <%@ page contentType="text/html; charset=UTF-8"
       pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer"%>
    <%
    // just a test to grab rpt name from GET
    String rptFile = "report_files/" + request.getParameter("rpt");
    %>
    <crviewer:viewer reportSourceType="reportingComponent" viewerName=""
    isOwnPage="true">
       <crviewer:report reportName="<%= rptFile %>" />
    </crviewer:viewer>
    Many thanks in advance!
    Mark

    I am not aware of any html tags you can pass to the viewer for parameter values.  Normally, you would load the report in code and then use the SDK with the report object to pass parameter values.

  • How to pass bind variable into oracle reports 6i - Parameter form

    Hello All,
    I want to pass bind variable into Oracle Reports 6I - Parameters.
    I have tried out that but got the below error :-
    rep-0781 : Bind variables are not allowed in the select statement
    Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
    Thanks
    HARSH SHAH

    Hi,
    may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
    but u can full fill user requirement using oracle forms
    create a form as like as report parameter window
    then create parameter list and run report
    PROCEDURE Run_Emp_Report IS
      pl_id ParamList;
    BEGIN
      pl_id := Get_Parameter_List('tmpdata');
      IF NOT Id_Null(pl_id) THEN
        Destroy_Parameter_List( pl_id );
      END IF;
      pl_id := Create_Parameter_List('tmpdata');
      Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
      Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;
    thanks
    mostafiz mitul
    Dhaka Bangladesh

  • How to pass bind variable in report

    I'm trying to add tables and chart based of the value selected by the user using the filters.
    l_param_values := MGMT_IP_PARAM_VALUE_LIST();
    l_param_values.extend(13);
    l_param_values(1) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.sqlStatement',
    'SELECT TO_DATE(TO_CHAR (alloc.timestamp, ''MON RR''),''MON RR'') AS CALENDAR_MONTH,ROUND(AVG(alloc.avg_size_mb/1024),2) AS SIZE_GB,ROUND(AVG(used.avg_used_mb/1024), 2) AS USED_GB,
    ROUND (AVG ((alloc.avg_size_mb - used.avg_used_mb )/1024), 2) AS FREE_GB
    FROM
    (SELECT m.metric_column AS metric_column,m.rollup_timestamp AS timestamp,sum (m.average) AS avg_size_mb
    FROM
    mgmt$metric_daily m, mgmt$target_type t
    WHERE t.target_name LIKE ??EMIP_BIND_PARAMNAME??
    AND (t.target_type = ''rac_database''
    OR (t.target_type = ''oracle_database'' AND t.TYPE_QUALIFIER3 != ''RACINST''))
    AND m.target_guid = t.target_guid AND m.metric_guid = t.metric_guid AND t.metric_name = ''tbspAllocation''
    AND (t.metric_column = ''spaceAllocated'')
    and m.rollup_timestamp >= ??EMIP_BIND_START_DATE??
    and m.rollup_timestamp <= ??EMIP_BIND_END_DATE??
    GROUP BY m.rollup_timestamp, m.metric_column) alloc,
    ( SELECT m.metric_column AS metric_column, m.rollup_timestamp AS timestamp, sum (m.average) AS avg_used_mb
    FROM mgmt$metric_daily m, mgmt$target_type t
    WHERE t.target_name = ??EMIP_BIND_PARAMNAME??
    AND (t.target_type = ''rac_database''
    OR (t.target_type = ''oracle_database'' AND t.TYPE_QUALIFIER3 != ''RACINST''))
    AND m.target_guid = t.target_guid AND m.metric_guid = t.metric_guid AND t.metric_name = ''tbspAllocation''
    AND (t.metric_column = ''spaceUsed'')
    and m.rollup_timestamp >= ??EMIP_BIND_START_DATE??
    and m.rollup_timestamp <= ??EMIP_BIND_END_DATE??
    GROUP BY m.rollup_timestamp, m.metric_column) used
    WHERE alloc.timestamp = used.timestamp
    GROUP BY TO_CHAR (alloc.timestamp, ''MON RR'') order by 1');
    l_param_values(2) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterNames','NAME');
    l_param_values(3) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterPromptNAME','Database Name');
    l_param_values(4) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterTipNAME','Filter on the target names');
    l_param_values(5) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterPromptTYPE','Target Type');
    l_param_values(6) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterTipTYPE','Filter on the target types');
    l_param_values(7) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterStartEmpty', 'yes');
    l_param_values(8) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterEmptyTableHeaders','Calender Month, Size GB,Used GB,Free GB');
    l_param_values(9) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterSqlNAME',
    'select distinct t.target_name from mgmt$target t where (t.target_type = ''rac_database'' OR (t.target_type = ''oracle_database'' AND t.TYPE_QUALIFIER3 != ''RACINST'')) order by 1');
    l_param_values(10) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.numberOfColumnsShowed','4');
    l_param_values(11) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterHeaderText','DB Filter');
    l_param_values(12) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterTipText','My Tip Text');
    l_param_values(13) := MGMT_IP_PARAM_VALUE_RECORD (
    'oracle.sysman.eml.ip.render.elem.TableRender.filterButtonText','Get Growth');
    l_element_guid := mgmt_ip.add_element_to_report_def (
    p_report_guid => l_report_guid,
    p_element_name_nlsid => 'user_table_from_sql',
    p_element_type_nlsid => 'any_target_type',
    p_header_nlsid => 'Select DB for 6 Month Growth Summary',
    p_element_order => 1,
    p_element_row => 1,
    p_parameters => l_param_values,
    p_targets => null);
    Is there a way to pass the EMIP_BIND_PARAMNAME to a new element added to the report ?

    The report framework dev response was that the code was not designed for this use case (e.g. a report filter bind parameter used in multiple report elements). They said it is possible that this may work by chance (go ahead and try to pass the same filter parameters into other report elements and see what happens). If that does not work then you can work with your Oracle support contact to file an enhancement request.
    Edited by: cfowler on May 20, 2010 2:46 PM

  • Passing Parameter from Main report to SQL command-based subreport

    I am trying to cut down the run time of my reports and have recently figured out how to write SQL commands to limit the data by filtering prior to being pulled into the reports.  However, many of my reports rely on multiple sub reports, which can cause a dramatic 'drag' on the report.
    I am trying to filter the SQL command used in my sub report by passing the group parameter, which is selected by the user in the main report, to the sub report's SQL command.  Without this parameter, the sub report has to sort through a lot more data than it would with this parameter, making the run time extremely slow.
    Any suggestions on how I can accomplish this?
    Thanks for any help you can provide,
    Marlene Allen
    Crystal Reports Developer
    Crystal Reports Professional;
    Product Type: Full;
    Product Version 11.5

    Hi Marlene,
    I don't believe you can pass a CR parameter to a Command object.
    I suggest replacing all of the Command Objects with a Stored Procedure so all of the data filtering is done server side. DB servers are much more proficient at collecting the data and filtering than CR will ever be. It will also allow you to replace subreports to also speed up your report processing. All depends on your layout of course but something to look at.
    Thank you
    Don

  • JRC with JavaBeans datasrc - how to pass params into javabean.getResultSet?

    Hi.
    I'm developing javabeans data sources for crystal reports for the java/JRC engine.  I've seen the document entitled Javabeans Connectivity for Crystal.  It TALKS ABOUT passing params into the methods that return java.sql.ResultSets but there is absolutely no example code anywhere that I can find on how to do it.
    What I don't understand is:  Since the JRC engine is basically controlling the instantiation of the javabean, other than calling some type of fetch method in the constructor, how the heck am I supposed to pass in db connection info and a sql string? 
    Anybody got sample code for how to call/where to call parameters that I would put in a custom getResultSet method??
    Thanks.

    I don't think that a Connection Pool class would be an ideal candidate for becoming a JavaBean. One of the most prevalent use of a JavaBean class it to use it as a data object to collect data from your presentation layer (viz. HTML form) and transfer it to your business layer. If the request parameter names match the Bean's property names, a bean can automatically get these values and initialize itself even though it has a zero argument ctor. Then a Bean could call methods in the business layer to do some processing, to persist itself etc.

  • Passing array into resultset

    hi,
    is it possible to pass an array into a resultset? if yes please indicate how.
    thank you all in advance

    Hi,
    Sorry for the confusion, here's what I'm trying to accomplish.
    I'm trying to create a report in Crystal Report and use Java as data source. My Java application needs to generate some value and pass them to the report as parameters. After some research I've found that I can use a Java Bean class as data source for Crystal Report that returns a ResultSet. Therefore I'm trying to pass some values in my Java app into the Bean class as array and convert them to a ResultSet for Crystal Report.
    If you know of a different way please let me know, otherwise, this is what I meant by passing array into resultset.
    thanks for your reply,

  • Passing Data into Subreport

    Hello,
    I am using Crystal 10. I am wondering if it is possible to pass data from a report into a subreport for calculations.
    Thank you.

    Hi Sabian,
    You can pull sub report information and use in main report, while getting the data from sub report to main please take care of the following :
    --Your sub report should be placed above your calculations in main report. ie. after processing of your sub report only you get data into your main report.
    --While writing formulas in sub report or in main report you will have to use Whileprintingrecords; to get get data into your shared variables. Eg:
    Whileprintingrecords;
    shared numbervar x;
    x:=x+fieldvalue;
    --When you create a formula in sub report it should be plced on your sub report, use the same variable name while creating a formula in main report.
    Make sure that the shared variable which you are calling in the main report should be in the below section of the sub report. If you want to pass the sub report to the main report in the same section then insert section below the sub report
    Hope this helps
    Regards,
    Shweta

  • Pass query to the report through form

    Hello everybody...
    I m using forms and reports 6i.
    I create query through form depends on user selection.
    Means user select specified columns from specific table. And finally i create complete query.
    Now i wanna pass that query to report builder and wants to generate automatic report depends on that query.
    Can anybody have idea how to do this?
    How to pass query from form and generate report.
    If any1 knows then please help me

    You should pass all columns but with separator character i.e.:
    supl_cd||';'|| supl_name ||';' city ||';'|| add1 ||';'|| add2 ||';'|| pincode ||';'|| country my_column
    You should also pass column names if you want and get them back using the same procedure.
    Procedure for retrieving should use instr,loop and srw.do_sql, if you don't know what is SRW built in package, then take a look in report's help. That's a pity that there is nothing similar in forms. You can use dynamic select to pass values exactly to the report's variables:
    for i in 1..10 loop
    srw.do_sql('select '||i||' into :cp_'||i||' from dual');
    end loop;
    Jakub Flejmer

  • Passing parameters to QBE Reports?

    I currently have an SQL Report that I filter dynamically with parameters from the page. I would like to be able to use this same functionality with a QBE Report that the client can more easily specify.
    Is it possible to pass parameters to QBE Reports? If so, how?
    Thanks,
    Mark

    As Chetan has correctly suggested, it will be better to use a table to store
    the emp no and their pin against their login session ids.
    You can have a table as :-
    create table emp_pin (
    session_id integer,
    emp_no integer,
    emp_pin integer,
    constraint emp_pin_fk1 foreign key (session_id) references <portal_schema>.wwctx_sso_session$(id) on delete cascade
    When a user logs into portal, a session_id is created and this session_id is
    deleted when the user logs out. The delete cascade rule will clean up your
    table entry when the user logs out.
    You can get this session_id using the <portal_schema>.wwctx_api.get_sessionid function.
    Now you need to create 2 functions that would return the emp_no and emp_pin.
    You can then use these functions in the sql query of your reports. This way you
    need not use bind variables at all.
    Example:-
    create or replace function get_empno(p_sess_id in integer)
    return varchar2
    is
    l_empno varchar2(2000);
    begin
    select emp_no
    into l_empno
    where session_id = p_sess_id;
    return l_empno;
    end;
    create or replace function get_emp_pin(p_sess_id in integer)
    return varchar2
    is
    l_emp_pin varchar2(2000);
    begin
    select emp_pin
    into l_emp_pin
    where session_id = p_sess_id;
    return l_emp_pin;
    end;
    Now, these functions can be used in SQL query of your reports as :-
    select <col1>, <col2>, <col3>
    from <table>
    where empno = get_empno(<portal_schema>.wwctx_api.get_sessionid)
    and emp_pin = get_emp_pin(<portal_schema>.wwctx_api.get_sessionid)
    and ....
    In a form, you can use these functions to set the default values of the empno,
    emp_pin fields.

  • Help Needed in passing parameter to cryst report

    Hello everyone, I am trying to create a report for a single record and as such am trying to pass parameters to a crystal report but I am not sure exactly how to do this. This is my own method that I am employeeing. I do not want to create a data table and put all the info I need in there and then base a report off of it. I do not want to deal with loops and arrays right now. I just want to pass for example parameter JuvenileID = 1 to my crystal report, then create a command under the database expert and set the parameter for my command to the parameter I passed my crystal report. How would I go about in doing this? I am using VS 2010 C#. This is a windows application. I have a dataentry form that is already populated with the info needed for the report. I just need to pass all the controls.text values to the report and populate it that way.

    I'm not sure if I fully understand the issue, but since you have all the data you need in a data entry form that is already populated, why don't you simple create an ADO .NET Dataset and pass that to the report? Much easier to implement, faster execution with the small amount of data you have and less code.
    Dataset sample app is here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    More info on datasets is here:
    [1511438 - How to use datasets to pass data to crystal reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533313331333433333338%7D.do].
    - Ludek

  • How to pass parameters into Function module : CLOI_PUT_SIGN_IN_FRONT

    Hello friends,
    I am displaying values ie, amounts in the screen using write statements here i have to display the
    sign left side , i am using  Function module   'CLOI_PUT_SIGN_IN_FRONT'    
    Does anybody help me - How to pass paramter into this Function module.
    Regards,
    Phaneendra

    If you look to the code of the function module, you can see it is condensing the value.
    I would make a copy of this function, and remove the condense lines to give the result you want.
      data: text1(1) type c.
      search value for '-'.
      if sy-subrc = 0 and sy-fdpos <> 0.
        split value at '-' into value text1.
        condense value.
        concatenate '-' value into value.
      else.
        condense value.
      endif.

  • Passing a value from Report A to B when B is in a different Subject Area

    I had posted a question previously on how to pass the Dept # from Report A to B when B i in a different Subject Area. The question was:
    Report A is a table on the Dashboard that shows Actual vs Budget results by Department. I want the user to click on the Department and be navigated to report B that shows the detail transactions that make up the Actual results. Report A and B are from different underlying subject areas. Thus when I navigate to report B, I see ALL departments, and not the one I clicked on in Report A to bring up Report B. How can I limit the results in Report B to be just the respective cell I clicked on in Report A?
    I got great advice from Nico on how to use the GO URL, but I can only get that to work if the 2 reports in question are from the same data model. In my case they are NOT.
    The GO URL seems to be working, as it does open up Report B when I click on the Department field in Report A, but it does not pass the Department number to Report B, even though reprot B has that field "as prompted".
    Can anyone definitively indicate whether what I'm trying to do is not possible in BI EE?

    Read this from Venkat... I think this will be helpful in understanding prompts, both the column prompts (Answers) type and the dashboard prompts. Very useful, I think.
    http://oraclebizint.wordpress.com/2008/04/30/oracle-bi-ee-101332-understanding-dashboard-prompts-passing-prompts-to-multiple-subject-areas-aliases/

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

Maybe you are looking for

  • Low resolution photos from Revel

    Hi, I hope this is the correct forum and that this question has not already been delt. I have search but dont find any solution. I have decided to stop using dropbox "camera upload" and switch to Adobe Revel. I seams to work great except for the fact

  • How do you Delete a Record using Form with submit button?

    Hi, The table REGISTRATION has two feilds, FULL_NAME and USER_GROUP. I created a form that has a drop down of all the FULL_NAME values that allows the user to select the record that they want to delete. I got the drop down to work and created the Del

  • Weblogic/Java Transaction error...

    Hi, have you ever seen an error like this? <Dec 15, 2001 2:08:05 AM PST> <Error> <JTA> <Resource weblogic.jdbc.jts.Connection was not assigned to any of these servers: wladm > <Dec 15, 2001 2:08:05 AM PST> <Error> <EJB> <Exception during commit of tr

  • CF Card Access over OTG

    Hi, Has anyone being successful in accessing a compact flash (CF) card using any OTG cable? If yes, can you tell me how you did it? Which cable you used? Thanks in advance, Partha

  • HTTP_POST string length

    I am trying to use the fm HTTP_POST.  I am having some success, but my receiver want the name value pairs string to come to them with no carriage returns.  It looks like this fm wants to break it into 200 characters max.  Does anyone know if there is