CR-XI How to prefil Default Parameter value in code

I am setting parameter default value(s) in VB6 code.  When the report is launched the default parameter is in the list but not selected.  The user has to manually select the value instead of just accepting the default value and pressing enter key to launch the report.  I would like parameters to prefil with default values like they did in Crystal version 7 when using the OCX.
I am using CR XI and VB6.  I am passing a default parameter by using .
<report object>.ParameterFields(1).AddDefaultValue
If I use <report object>.ParameterFields(1).AddCurrentValue the parameter then the report viewer knows the parameter value and the form does not display the value incase the user desires to change it.
My Question is how can I display the parameter and prefill with the default value.  When I use "AddDefaultValue" like above the parameter will be in the dropdown but will be blank when the form opens.  This requires the user to use the mouse and click the dropdown to display the default value.  I would prefer the default show in the dropdown so the user just has to press the enter key to launch the report (if the user wants to accept all default values).
If this is not possible with the current viewer class then maybe the development team can include in future updates. 
Thanking you all in advance.

Hi Brent,
The document you linked is for the Enterprise Product.  As Jonathan stated, the RDC for XIR2 is supported for use in VB6, you do not have to have .NET.  This can be found in the Crystal Reports supported Platform document found here:
[http://resources.businessobjects.com/support/communitycs/TechnicalPapers/cr_xi_r2_supported_platforms_windows_sp3.pdf|http://resources.businessobjects.com/support/communitycs/TechnicalPapers/cr_xi_r2_supported_platforms_windows_sp3.pdf]
Crystal Report XIR2 is the last version that has the RDC.

Similar Messages

  • How to use different default parameter value for different report subscriptions

    In ssrs is it possible to define different default parameter values for different subscriptions? In the following example I have a report which has two subscriptions with different start date and end date values:
    Report name – Testsubscription.rdl
    Subscription-1
    Input parameter (default values):
    start_date = first day of current Month
    end_date = till date
    Subscription-2
    Input parameter (default values):
    start_date = first day of current Quarter
    end_date = till date
    I know an alternative way of doing this would be to copy the rdl file with a different name but I am curious whether this can be done within a single report definition file. I am using SQL Server 2008 R2 Standard Edition.
    Thanks!
    spp

    Hi sppdba,
    As per my understanding, there is a report with two parameter: start_date and end_date, you want to configure subscription for the report, and set different default values for start date and end date. And you want to know if it is possible to achieve you
    goal by using a single report definition file.
    Since you are using SQL Server 2008 R2 Standard Edition, we need to achieve your goal by configuring two subscriptions for the report. For detail information, please refer to the following steps:
      1. In design surface, right click start_date and open Parameter Properties dialog box.
      2. In General pane, type Name and Prompt, set Data Type to Date/Time.
      3. Click Available Values in left pane, select Specify Values.
      4. Click Add button, in Label text box, type “First day of Current Month”, click (fx) button in Value section, then type the expression like below:
    =DateSerial(Year(Now()), Month(Now()), 1)
      5. Click Add button, in Label text box, type “First day of Current Quarter”, click (fx) button in Value section, then type the expression like below, then click OK.
    =DateSerial(Year(Now()), (3*DatePart("q",Now()))-2, 1)
      6. Right click end_date and open Parameter Properties dialog box.
      7. In Available Values pane, select Specify Values.
      8. Click Add button, in Label text box, type “Today”, click (fx) button in Value section, then type the expression =Today(), then click OK.
    Now that the parameters are created, we need to configure subscription for the report. For detail information, please follow these steps:
      1. Open Report Manager, and locate the report for which you want to create a new subscription.
      2. Hover over the report, and click the drop-down arrow.
      3. In the drop-down menu, click Manage. This opens the General properties page for the report.
      4. Select the Subscriptions tab, and then click New Subscription.
      5. Select the delivery extension and data source for the subscription.
      6. Select a method of delivery, then choose report delivery options.
      7. Specify conditions that cause the subscription to process and delivery to occur.
      8. Set start_date to First day of Current Month, end_date to Today, then click OK.
      9. Create a new subscription as step4 to 7, set start_date to First day of Current Quarter, end_date to Today, then click OK.
    The following screenshots are for your reference:
    For detail information about Creating Standard Subscriptions, please refer to the following document:
    http://msdn.microsoft.com/en-us/data/ms156307(v=sql.105)
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • Crystal Reports 9 and SQL Server 2005 default parameter values

    We're using Crystal Reports 9 and upgraded from SQL Server 2000 to SQL Server 2005.
    I'm noticing a very weird problem which I wonder if anyone else has experienced (and hopefully found a resolution for). It appears that in using Crystal with SQL Server 2005 stored procedures, if we have default parameter values in the stored procedures, the default parameter values get completely ignored if you pass in a NULL value from Crystal!
    For example, if you have a stored procedure that begins like this:
    ALTER          Procedure [dbo].[StoredProcedure]
    @Param1 VarChar(200) = '',
    @Param2 VarChar(200) = ''
    AS ...
    both @Param1 and @Param2 have a default value of an empty string, and therefore should become empty strings if nothing (NULL values) gets passed in for them.
    But, like I said, what I'm finding is that with Crystal calling the stored procedure with NULL @Param1 and @Param2 values, they never become empty strings, but rather remain as NULLs.
    This was never a problem with SQL 2000.
    Very perplexing. Anyone else every experience this?
    Thank you.

    Please ignore my earlier post -- answered my own question.
    NULL parameter values do not get replaced by default values in SQL -- that is normal behavior in both SQL 2000 and SQL 2005. Just goes to show, that no many how many years programming experience you have, you can still get tripped up sometimes : (

  • How to capture a parameter value in SQL QUERY of scale marker using GO URL

    Hi,
    Can any one please tell me how to capture the parameter value from go url inside Where clause of Scale Marker.
    I am trying to sift the position of scale marker based on SQL Query.
    Thanks-Bhaskar Gouda.
    Edited by: 961171 on Sep 25, 2012 12:33 AM

    Since this is a synchronous interface, where source is a soap(proxy) call and target is JDBC in the first mapping both of them are request scenarios.
    Source Structure:
    RootNode
        Request             1...unbounded
           No_of_Days   1.1 String
    Target Structure:
    RootNode
       Statement
         TableName
             Action mapped to SQL_QUERY
            Access -  SELECT DISTINCT AL.EC_NO,DP.DATE_TO_FORMAL FROM T_APPLICATION_LIST AL,(SELECT DE.EC_NO AS "EC_NO", DE.PACKAGE_NO AS "PACKAGE_NO",PC.DATE_TO_FORMAL AS "DATE_TO_FORMAL" FROM DAICYO_ECNO DE,PACKAGECTL PC WHERE DE.PACKAGE_NO = PC.PACKAGE_NO AND PC.DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$'))) DP WHERE AL.EC_NO IN  (SELECT EC_NO FROM DAICYO_ECNO WHERE PACKAGE_NO IN (SELECT PACKAGE_NO FROM PACKAGECTL WHERE DATE_TO_FORMAL > (TRUNC(SYSDATE) - to_number('$No_Of_DAYS$')))) AND (AL.FAMILY = ''  or  '' is null and AL.FAMILY is not null ) and DP.EC_NO = AL.EC_NO ORDER BY DATE_TO_FORMAL
         Key
          No_Of_Days   1..1 String
    In Return I am expecting a JDBC response from the Oracle Database as:
    Source Structure:
    RootNode
      STATEMENT_response   1...unbounded
         row                               0...undbounded
           EC_NO                        1..1   String
    Target Structure:
    RootNode
      RESPONSE
        row
         EC_NO                     1..1     String

  • How to change timeout parameter value in Oracle 10g R2

    Anyone knows how to change timeout parameter value in Oracle 10g Database R2?

    Waheed Azhar wrote:
    actually i am getting ORA-01013 exception which directly relates to the timeout value but i think it's hidden parameter...What makes you think it's a hidden parameter?
    A search of MetaLink for that error turns up a number of hits, most of which a very situational specific. Exactly what are you doing when you get this error? Are you connecting over an ODBC connection? Are you getting it on a connection request? At db shutdown? During a long-running query?

  • How to set default date value to a field on screen

    How to set default date value to a field on screen and allow users to modify it ....

    Hello,
    In the PAI module, you need to save the changes to the database using the command MODIFY.
    Follow an example:
    Create or change a message in database table T100. If there is no message with the number 100 in the MYMSGCLASS message class in English, it will be created. Otherwise only the text is changed.
    DATA message_wa TYPE t100.
    message_wa-sprsl = 'EN'.
    message_wa-arbgb = 'MYMSGCLASS'.
    message_wa-msgnr =  '100'.
    message_wa-text =  'Some new message ...'.
    MODIFY t100 FROM message_wa.
    Regards.

  • Dynamic default parameter value

    Hi,
    I'm running Oracle BI Discoverer Plus 10g (10.1.2.45.46c)
    Is it possible to make the default parameter value dynamic ?
    In my case I want the default parametervalue to be set to the week before actual week.
    Eg if I'm running the report during this week it would be set default to '2005W43',
    running the report during next week it would be set default to '2005W44' and so on...
    Have tried to assign the default value with "TO_CHAR(SYSDATE-7,'RRRR')||'W'||TO_CHAR(SYSDATE-7,'IW')"
    Note the enduser must have the possibility to change from the default week to some other week.
    Any ideas ?
    /Sam
    Message was edited by:
    [email protected]

    Post Author: synapsevampire
    CA Forum: General
    A common solution is to use a Union All in a query to get the ...All and the dynamic values using a Command Object.
    select '...All' from tableUNION ALLselect field from table
    -k

  • How can i find the value category code in CJVC

    Hi Gurus
    how can i find the value category code in CJVC and which tables its stored.can any one tell me.please please

    Read TPIK3 in an internal table, then search COEP-KSTAR in this table, with KSTAR between TPIK3-KSTRF and TPIK3-KSTRT, and other keys like Controlling Area and application/component (eg "PS" in project-system as in CJVC or "PM" in Maintenance as in IW33, multiple application use this table). You can also use a FM like PS_FIND_ACPOS_FOR_KSTAR.
    Regards,
    Raymond

  • How to suppress "enter parameter values" screen in crystal reports for Visu

    Hi,
        I am passing parameters to the report through program.  But still the "Enter Parameter Values" Dialog is shown every time I run the application.  Code used to pass parameters is given below:
                    rptCBBookRpt objRptCBBook = new rptCBBookRpt();
                    objRptCBBook.SetParameterValue("@Branch", strBranch);
                    objRptCBBook.SetParameterValue("@CoName", mdlFinIF.objCommon.CoName);
                    objRptCBBook.SetParameterValue("@Heading", strHeading);
                    objRptCBBook.SetParameterValue("@UserInfo", mdlFinIF.objCommon.ReportInfo());
    How can I suppress the "Enter Parameter Values" dialog.  Please help.
    Cris Evan

    Well, no. But this being a community, not technical support, you may get a response, perhaps even an actual answer, or you may not...
    If you are not getting a response or an answer, you may want to consider obtaining a dedicated support here:
    http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369
    Look at samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Check out the [Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23] - it will apply to your version of CR...
    And of course, developer help files.
    - Ludek

  • How can i pass parameter values from html to a shell script

    Hi Guys...
    I had a requirement where i need to execute a sql statement and print the output in HTML page. This report has parameters to enter. So i created a HTML form which accepts parameters. When the submit button is pressed, the action tag in the form invokes unix shell script file. It will open sqlplus and run the sql script file .sql and print the output in the HTML page.
    sql script contains the query and some set options which prints the output in HTML page. Like "SET MARKUP HTML ON"... The query has some parameters like "select * from emp where empno = &&empnumber. I will use the same name "empnumber" while created the HTML parameter form like " <input type = "text" name="empnumber" size="10" align="left">.
    user sees this parameter form and enters some value in to that empno text box.
    My question is how can i catch these parameter values in a shell script and pass it to the sql script to execute it.
    Help Appreciated
    Thanx

    This is a A Bad Idea (tm). This type of CGI processing is old and were (and still is) full of security holes. Very easy to inject stuff (Unix commands and SQL) into it.. To get those parameters into SQL*Plus requires using Unix shell commands to process it - and something like a backquote allows all kinds of nasty stuff to be injected. The Unix shell was never designed to be used as a secure CGI environment.
    There are far better and far superior alternatives. Perl (with Perl_DBI) and PHP (using Zend Core for Oracle) come to mind as web scripting languages.
    Even easier is using HTMLDB. Very few moving parts. Is free. Supports Oracle 9.2 and 10G.

  • Can I use calculated value as default parameter value?

    Discoverer version:
    Oracle BI Discoverer 11g (9.0.4.00.00)
    Oracle Business Intelligence Discoverer Plus 11g (11.1.1.3.0)
    Discoverer Model - 11.1.1.3.0
    Discoverer Server - 11.1.1.3.0
    End User Layer - 5.1.1.0.0.0
    End User Layer Library - 11.1.1.3.0
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    Java Virtual Machine: Sun Microsystems Inc. 1.6.0_29
    JVM Memory Available: 9286KB out of 43728KB
    Operating System: x86 Windows 7 6.1
    Can I have a pre-calculated value in the value selection box E.g. a date value that is calculated from a function that getting current finanical year from a item.
    That is, when 'Edition Parameter value' window pop up, a calculated value exists instead of a blank field.
    Edited by: 901005 on Dec 8, 2011 6:12 PM

    Hello
    Your friend is wrong - this functionality has never existed. Perhaps your friend is getting confused over the ability to define a fixed default value which has always been there.
    Sorry about this.
    Michael

  • How to get dynamic paramete value in the context node?

    Hi, experts,
    There are some attributes in the node context(ee_node) that contained the attribute named "ANSSA" in the view(test_view) in the WDA for abap. In the method WDDOMODIFYVIEW of the view(test_view), there is dynamically string , ex."ANSSA". How can I get the value of the "ANSSA" from the node(ee_node)?
    I try to use the following code to get the value in the method WDDOMODIFYVIEW of the view(test_view):
    Method wddomodifyview.
    *importing   para    type   string.
      data:
        Node_Ee_Address                     type ref to If_Wd_Context_Node,
        Elem_Ee_Address                     type ref to If_Wd_Context_Element.
    navigate from <CONTEXT> to <EE_ADDRESS> via lead selection
      Node_Ee_Address = wd_Context->get_Child_Node( Name = IF_ADDR_AUTO_DISP_VIEW=>wdctx_Ee_Address ).
    get element via lead selection
      Elem_Ee_Address = Node_Ee_Address->get_Element(  ).
    get single attribute
      Elem_Ee_Address->get_Attribute(
        exporting
          Name =  para
        importing
          Value = ??? ).
    But I don't know how to replace the "???"   .
    endmethod
    I don't know how to replace the "???"  in the method wddomodifyview? Do you give me some hint for it?
    You can reply back to me via e-mail if you think we should discuss this internally at [email protected] or [email protected]
    Thanks.
    Best regards,
    tao

    Hello Neha,
    Thank you for your help in advance.
    I am very sorry that the above method name ought to be "modifyview", not "wddomodifyview"(I write the error word in the question so that I am very sorry.). I am very sorry the error method name occuring your misunderstand.
    The "para" is the transfered parameter that it is supposed to represent the name of "ANSSA". Actually, the "para" may represent other attribute in the node context, ex. "ENDDA"(date type) attribute.
    I don't write such code in the method modifyview: lv_anssa like ls_ee_node-anssa. Because I am not sure that the  "para"  represent the name of "ANSSA", and the "para" may represent other attribute in the node context, ex. "ENDDA"(date type) attribute.  The  "para" is only the transfered parameter from other method for representing the name of attribute.
    Method modifyview.
    *importing para type string.
    DATA:
    lo_nd_ee_node type ref to if_wd_context_node,
    lo_el_ee_node type ref to if_wd_context_element,
    ls_ee_node type wd_this->element_ee_node.
    I cann't write such code. Because I am not sure that the para represent the name of "ANSSA"******************
    data lv_anssa like ls_ee_node-anssa.
    lo_nd_ee_node = wd_context->get_child_node( name = wd_this->wdctx_ee_node ).
    lo_el_ee_node = lo_nd_ee_node->get_element( ).
    lo_el_ee_node->get_attribute(
    exporting
    name = para
    importing
    value = ??? ).
    endmethod.
    I don't know how to replace the "???". Do you give me more hints?
    Thanks a million.
    Regards,
    Neha

  • How to do Default context value For DFF in OAF

    Dear all,
    I want to do Default context value For DFF in OAF for seeded page, pls let me know how to do.
    Regards,
    Hanimi

    Hi Hanimi,
    In controller use code
    *dffBean.setFlexContext(pageContext,"+YOUR-LIST-VALUE+");*
    *dffBean.setAttributeValue(OAWebBeanConstants.READ_ONLY_ATTR, new Boolean(false));*
    Thanks
    Jegan

  • How to pass the parameter values to the stored procedure from java code?

    I have a stored procedure written in sqlplus as below:
    create procedure spInsertCategory (propertyid number, category varchar2, create_user varchar2, create_date date) AS BEGIN Insert into property (propertyid, category,create_user,create_date) values (propertyid , category, create_user, create_date); END spInsertCategory;
    I am trying to insert a new row into the database using the stored procedure.
    I have called the above procedure in my java code as below:
    CallableStatement sp = null;
    sp = conn.prepareCall("{call spInsertCategory(?, ?, ?, ?)}");
    How should I pass the values [propertyid, category, create_user, create_date) from java to the stored procedure?[i.e., parameters]
    Kindly guide me as I am new to java..

    Java-Queries wrote:
    I have a stored procedure written in sqlplus as below:FYI. sqlplus is a tool from Oracle that provides a user interface to the database. Although it has its own syntax what you posted is actually PL/SQL.

  • How to disable "Enter Parameter Values" for optional paramters?

    I'm having issues getting the Crystal Reports .NET Viewer to suppress the "Enter Parameter Values" dialog for optional parameters.  I have templates created using Crystal Reports 2008 and am linking against the CR for VS 2010 runtime.
    Within the report template the optional paramter has "Optional Prompt" set to "True".  This particular parameter also allows multiple values and is used in record selection.  Within the record selection it is using HasValue().
    It seems the parameter is set up properly as I have other parameters that are set within the code that are not prompted for.  If I pass in the optional parameter through the code the "Enter Paramater Values" dialog also does not appear and the report is generated correctly.  All of the parameters are set using ParameterFields and they are set before the ReportSource is set.
    Looking through the .NET API documentation it seems like the CrystalReportViewer should have an "EnableParameterPrompt" property that would do what I want however it doesn't seem to be a valid parameter as I get compile errors when I try to use it...  Not sure if it matters or not but I am using managed C++ and our application is built using Visual Studio 2005.  Could that maybe have something to do with it?
    Thanks,
    -Ben

    OK, I'm going to answer my own question as with a little more digging I was able to find out that I needed to set some stuff on the report document to specify that there are no values.  Still not sure why "EnableParameterPrompt" is not valid for me though as it seems like that would work as well.  At any rate here is what I needed to do:
    ReportDocument->ParameterFields[<Optional Parameter Name>]->CurrentValues->Clear();
    ReportDocument->ParameterFields[<Optional Parameter Name>]->CurrentValues->IsNoValue = true;
    -Ben

Maybe you are looking for