CRVS2010 Beta - Help with parameters

Could somone help:  I have created a CR which uses two static parameter fields for 'DateFrom' and 'DateTo' on the report.  The parameters are passed to an ASP.NET web page via a query string, and then I use Dim Fromdate As String = Request.QueryString("from") etc to send the parameter via code.  The problem I'm having is this.  The DateFrom and DateTo values are being sent to the report ( I simply use them in the report header to display the from and to dates selected by the user for the report ) and the report display's as expected.  But when you click 'Next' in the multipage report, the report prompts with a parameter popup box to reenter the dates.  Once you enter the values, you can page back and forth without any more interuptions.   Note:  I'm using Visual Studio 2010 with the latest install of crystal report's for VS 2010.
Would anyone know what I have set wrong?  Here is the code that I use to populat the report.
Dim reportpath As String = ""
        reportpath = Server.MapPath("myreport.rpt")
        Dim Fromdate As String = Request.QueryString("from")
        Dim Todate As String = Request.QueryString("to")
        Dim crParameterDiscreteValue As ParameterDiscreteValue
        Dim crParameterFieldDefinitions As ParameterFieldDefinitions
        Dim crParameterFieldLocation As ParameterFieldDefinition
        Dim crParameterValues As ParameterValues
        Try
            Dim conStr As String = System.Configuration.ConfigurationManager.AppSettings("dbconnect")
            Dim sqlConnection As New SqlConnection("server=myserver;uid=fakeuser;pwd=fakepass;database=fakedatabase")
            Dim Command As SqlCommand = New SqlCommand()
            Command.Connection = sqlConnection
            Command.CommandText = "sp_stored_proc"
            Command.CommandType = CommandType.StoredProcedure
            Dim Parameter1 As SqlParameter = New SqlParameter("@fromdate", CType(Fromdate, Date))
            Parameter1.Direction = ParameterDirection.Input
            Parameter1.DbType = DbType.Date
            Dim Parameter2 As SqlParameter = New SqlParameter("@todate", CType(Todate, Date))
            Parameter2.Direction = ParameterDirection.Input
            Parameter2.DbType = DbType.Date
            Command.Parameters.Add(Parameter1)
            Command.Parameters.Add(Parameter2)
            Dim Adapter As SqlDataAdapter = New SqlDataAdapter(Command)
            Dim ds As New ReportDs1
            Adapter.Fill(ds, "Report1")
            Dim cr As New ReportDocument
            cr.Load(reportpath)
            cr.SetDataSource(ds.Tables("Report1"))
            CrystalReportViewer1.ReportSource = cr
            crParameterFieldDefinitions = cr.DataDefinition.ParameterFields
            crParameterFieldLocation = crParameterFieldDefinitions.Item("@fromdate")
            crParameterValues = crParameterFieldLocation.CurrentValues
            crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
            crParameterDiscreteValue.Value = Fromdate
            crParameterValues.Add(crParameterDiscreteValue)
            crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
            crParameterFieldLocation = crParameterFieldDefinitions.Item("@todate")
            crParameterValues = crParameterFieldLocation.CurrentValues
            crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
            crParameterDiscreteValue.Value = Todate
            crParameterValues.Add(crParameterDiscreteValue)
            crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
Edited by: Don Williams on Oct 8, 2010 11:50 AM

For those interested, I figured out what was happening.  There is a new question  added to the parameter property's when adding/editing report parameters called "Show On Viewer Panel".  This needs to be set to "DO NOT SHOW" to disable the prompts for passed in via code.
Dave.

Similar Messages

  • HR_BEN_GET_PLAN_COST - Need help with parameters

    function hr_ben_get_plan_cost.
    *"*"Local interface:
    *"  IMPORTING
    *"     VALUE(EE_BENEFIT_DATA) LIKE  RPBENEEDAT STRUCTURE  RPBENEEDAT
    *"     VALUE(BPLAN) LIKE  T5UBA-BPLAN
    *"     VALUE(BCOST) LIKE  T5UBH-BCOST
    *"     VALUE(DATUM) LIKE  SY-DATUM
    *"     VALUE(COVER) LIKE  T74FC-COVAM DEFAULT 0
    *"     VALUE(OUT_CURRE) LIKE  T5UD3-CURRE
    *"     VALUE(OUT_PERIOD) LIKE  T5UBH-PERIO
    *"     VALUE(PERIO_DATE) LIKE  T549Q-BEGDA OPTIONAL
    *"     VALUE(IS_COBRA) TYPE  C DEFAULT ' '
    *"     VALUE(REACTION) LIKE  SY-MSGTY
    *"  EXPORTING
    *"     VALUE(EECST) LIKE  T5UBI-EECST
    *"     VALUE(PTCST) LIKE  T5UBI-PTCST
    *"     VALUE(ERCST) LIKE  T5UBI-ERCST
    *"     VALUE(ACCST) LIKE  T5UBI-ACCST
    *"     VALUE(IMINC) LIKE  T5UBI-IMINC
    *"     VALUE(FLXCR) LIKE  T5UBA-FLXCR
    *"     VALUE(SUBRC) LIKE  SY-SUBRC
    *"  TABLES
    *"      ERROR_TABLE STRUCTURE  RPBENERR
    I'm not sure what to pass to the following parameters:
    DATUM
    OUT_CURRE
    OUT_PERIOD
    PERIO-DATE
    Your assistance is greatly appreciated!

    Hello,
    You can use the FM like example below:
    *& Report  YRA_HEALTH_PLAN_DETAILS
    report  yra_health_plan_details no standard page heading line-size 255..
    Type-pools declarations
    type-pools: slis.
    Declare the Logical Database Node ( Pernr )
    tables: pernr,
            t500p,
            t529u,
            t501t,
            q0167,
            t5ubb,              "Benefit health option/dependent coverage assignment
            rpbeneedat.    "Benefit reference structure for function modules
    Mention the various infotypes to be used .
    infotypes: 0000,
               0001,
               0002,
               0008,
               0041,
               0167.
    Declare the Structures
    types: begin of t_final,                      "Structure for final Alv display
           pernr type pernr_d,                    "Employee id
           nachn type pad_nachn,                  "Last name
           vorna type pad_vorna,                  "First name
           perid type prdni,                      "Social Security Number
           name1 type pbtxt,                      "Personal Area
           kostl type kostl,                      "Cost Center
           text1 type text40,                     "Employment Status
           ptext type pgtxt,                      "Employee Group
           divgv type divgv,                      "Working Hours
           gbdat type gbdat,                      "Birth Date
           dat01 type dardt,                      "Hire Date
           dat02 type dardt,                      "Re Hire Date
           pltyp type ben_type,                   "Benefit Plan Type
           bplan type ben_plan,                   "Benefit Plan
           depcv type ben_depcov,                 "Dependent Coverage
           eecst type ben_eecost,                 "Benefit Employee Cost Amount
           ptcst type ben_ptcst,                  "Benefits Additional Employee Post-Tax Costs
           iminc type ben_iminc,                  "Benefits Imputed Income
           end of t_final.
    data: ee_benefit_data    like rpbeneedat,
          error_table        like rpbenerr occurs 0,
          h5ubb              like t5ubb,
          subrc              like sy-subrc.
    constants: no_msg      type sy-msgty value 'N',
               error_msg   type sy-msgty value 'E'.  .
    Declare the internal tables
    data:  t_data type standard table of t_final with header line,     " Output Internal Table
           s_data type t_final.                                        " Workarea for output itab
    data : fieldcatalog type slis_t_fieldcat_alv with header line,     "Fieldcatalog itab
           i_fieldcatalog type slis_fieldcat_alv,                      " Fieldcatalog header
           i_event      type slis_t_event,                             " table for events
           t_event      type slis_alv_event,                           " structure for events
           i_header     type slis_t_listheader,                        " FOR HEADER
           t_header     type slis_listheader.
    Declare Variables
    data: v_repid type sy-repid.
    I N I T I A L I Z A T I O N
      v_repid = sy-repid.
    START  OF  SELECTION
    start-of-selection.
    get pernr.
    rp-provide-from-last p0000 space pn-begda pn-endda.
      if p0000-stat2 ne '3'.                                " Process only active employees
        reject.
      endif.
      rp-provide-from-last p0001 space pn-begda pn-endda.
      if pnp-sw-found = 1.
        s_data-pernr = p0001-pernr.
        s_data-kostl = p0001-kostl.
      endif.
      rp-provide-from-last p0002 space pn-begda pn-endda.
      if pnp-sw-found = 1.
        s_data-nachn = p0002-nachn.
        s_data-vorna = p0002-vorna.
        s_data-perid = p0002-perid.
        s_data-gbdat = p0002-gbdat.
      endif.
    select single name1 from t500p into s_data-name1 where persa = p0001-werks.
      select single text1 from t529u into s_data-text1 where statn = 2 and statv = p0000-stat2.
      select single ptext from t501t into s_data-ptext where persg = p0001-persg.
      rp-provide-from-last p0008 space pn-begda pn-endda.
      if pnp-sw-found = 1.
        s_data-divgv = p0008-divgv.
      endif.
      rp-provide-from-last p0041 space pn-begda pn-endda.
      if pnp-sw-found = 1.
        s_data-dat01 = p0041-dat01.
        s_data-dat02 = p0041-dat02.
      endif.
      rp-provide-from-last p0167 space pn-begda pn-endda.
      if pnp-sw-found = 1.
       s_data-begda = p0167-begda.
       s_data-endda = p0167-endda.
        s_data-pltyp = p0167-pltyp.
        s_data-bplan = p0167-bplan.
        s_data-depcv = p0167-depcv.
       endif.
    form dynpro_fields.
      data: eeper like q0167-eeper.                                         .
    get cost date
      if q0167-cstdt is initial.
        call function 'HR_BEN_GET_KEY_DATE'
             exporting
                  begda       = p0167-begda
                  endda       = p0167-endda
                  reaction    = no_msg
             importing
                  keydt       = q0167-cstdt
             tables
                  error_table = error_table.
      else.
        if q0167-cstdt < p0167-begda.
          q0167-cstdt = p0167-begda.
        endif.
        if q0167-cstdt > p0167-endda.
          q0167-cstdt = p0167-endda.
        endif.
      endif.
    get employees pay frequency
      call function 'HR_BEN_GET_PLAN_PERIOD'
           exporting
                pernr         = p0167-pernr
                barea         = p0167-barea
                bplan         = p0167-bplan
                validity_date = q0167-cstdt
                reaction      = no_msg
           importing
                plan_period   = eeper
                subrc         = subrc
           tables
                error_table   = error_table.
    get currency for calculated amounts
      call function 'HR_BEN_GET_CURRENCY'
           exporting
                barea       = p0167-barea
                datum       = q0167-cstdt
                reaction    = no_msg
           importing
                currency    = q0167-curr1
                subrc       = subrc
           tables
                error_table = error_table.
      move q0167-curr1 to q0167-curr2.
      move q0167-curr1 to q0167-curr3.
      move q0167-curr1 to q0167-curr6.
      move q0167-curr1 to q0167-curr7.
    get cost formula
      perform re5ubb(sapfben0) tables error_table
                                using p0167-barea
                                      p0167-bplan
                                      p0167-bopti
                                      p0167-depcv
                                      q0167-cstdt
                                      no_msg
                             changing h5ubb
                                      subrc.
    calculate benefit cost
      call function 'HR_BEN_GET_PLAN_COST'
           exporting
                ee_benefit_data = ee_benefit_data
                bplan           = p0167-bplan
                bcost           = h5ubb-bcost
                datum           = q0167-cstdt
                out_period      = q0167-eeper
                out_curre       = q0167-curr1
                reaction        = no_msg
           importing
                eecst           = q0167-eecst
                ptcst           = q0167-ptcst
                ercst           = q0167-ercst
                accst           = q0167-accst
                iminc           = q0167-iminc
                flxcr           = q0167-flxcr
                subrc           = subrc
           tables
                error_table     = error_table.
        s_data-eecst = q0167-eecst.
        s_data-ptcst = q0167-ptcst.
        s_data-iminc = q0167-iminc.
        append s_data to t_data.
        clear s_data.
    ENDIF.
      end-of-selection.
    PERFORM download.
      perform alv_display.
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    form alv_display .
    IF t_data IS NOT INITIAL.
      perform build_fieldcatalog.
      perform event_cat using i_event.
      perform define_alv.
    ENDIF.
    endform.                    " ALV_DISPLAY
    *&      Form  event_cat
          text
         -->P_I_EVENT  text
    form event_cat  using  p_i_event type slis_t_event.
      refresh p_i_event.
      data : s_i_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        importing
          et_events = p_i_event.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      read table p_i_event with key name = slis_ev_top_of_page into t_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to t_event-form.
        modify p_i_event from t_event index sy-tabix transporting form.
      endif.
    endform.                    " event_cat
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog .
      define m_fieldcat.
        clear i_fieldcatalog.
        i_fieldcatalog-tabname   = 'T_DATA'.
        i_fieldcatalog-fieldname = &1.
        i_fieldcatalog-just = 'L'.
        i_fieldcatalog-outputlen  = &2.
        i_fieldcatalog-seltext_l = &3.
       I_FIELDCATALOG-COL_POS = &4.
        append i_fieldcatalog to fieldcatalog.
        clear i_fieldcatalog.
      end-of-definition.
      m_fieldcat: 'PERNR'  '08' 'Personnel No'.
      m_fieldcat: 'NACHN'  '40' 'Last Name' .
      m_fieldcat: 'VORNA'  '40' 'First name' .
      m_fieldcat: 'PERID'  '20' 'Social Security No.' .
      m_fieldcat: 'NAME1'  '30' 'Personal Area ' .
      m_fieldcat: 'KOSTL'  '10' 'Cost Center' .
      m_fieldcat: 'TEXT1'  '20' 'Employment Status'.
      m_fieldcat: 'PTEXT'  '20' 'Employment Group' .
      m_fieldcat: 'DIVGV'  '04' 'Working Hours'.
      m_fieldcat: 'GBDAT'  '08' 'Birthdate' .
      m_fieldcat: 'DAT01'  '08' 'Hire Date'      .
      m_fieldcat: 'DAT02'  '08' 'Re-Hire Date'    .
      m_fieldcat: 'PLTYP'  '04' 'Plan Type'   .
      m_fieldcat: 'BPLAN'  '04' 'Benefit Plan'.
      m_fieldcat: 'DEPCV'  '10' 'Dependent Coverage'      .
      m_fieldcat: 'EECST'  '10' 'Benefit Employee Cost Amount'.
      m_fieldcat: 'PTCST'  '10' 'Benefits Additional Employee Post-Tax Costs'.
      m_fieldcat: 'IMINC'  '10' 'Benefits Imputed Income'      .
    endform.                    " build_fieldcatalog
    *&      Form  define_alv
          text
    form define_alv.
      call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_GRID_TITLE                      =
      IS_LAYOUT                         =
         it_fieldcat                       = fieldcatalog[]
         it_events                         = i_event[]
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = t_data
       exceptions
         program_error                     = 1
         others                            = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " define_alv
    *&      Form  TOP_OF_PAGE
          text
    form top_of_page  .
    LIST HEADING LINE: TYPE H
      clear t_header.
      t_header-typ  = 'H'.
      t_header-info = 'Health Plan Details'.
      append t_header to i_header.
    STATUS LINE: TYPE S
      clear t_header.
      t_header-typ  = 'S'.
      t_header-key  = 'Date Of Run'.
      t_header-info = sy-datum.
      append t_header to i_header.
    ACTION LINE: TYPE A
      clear t_header.
      t_header-typ  = 'A'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      t_header-info = text-002.
      append t_header to i_header.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary       = i_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    endform.                    "TOP_OF_PAGE
    Hope it helps.
    Thanks,
    Jayant Sahu.

  • CRVS2010 Beta - Report with many tables

    Hi,
    I was developing my application first with a test Database with few tables. Now that I am changing to the actual database (with about 200 tables) I noticed that the ReportDocument takes a really long time to load when I tried to access the DataDefinition for the first time.
    Is there one way to avoid this?? The tables are all there because I need to have the option the select the table that I wanna use in the application, but after this I just use the table chosen and the linked tables in the Report.
    thanks

    OK where to start...
    First the act of adding 200 tables, and I assume none of them are linked is the first problem you are going to have. CR is a relational database reporting tool. Not linking tables generates multiple SELECT statements.
    If you only need one or two then use RAS to add the tables and then the fields, Bascially you are creating the report designer for your users. All of the user interface needs to be created by you.
    There may be one option that could help but what you are doing is likely never going to be fast....
    Open regedit32.exe and go to:
    HKEY_CURRENT_USER\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports Designer Component\DatabaseOptions
    In there you'll find a key called - DoAutoSmartLinking
    Set the value to No
    What that key does is when a report is open CR tries to link all tables and all fields.
    Good luck
    Don

  • CRVS2010 Beta - Reports with JDBC or JavaBean datasource

    There is a reason why you can not  find crdb_jdbc.dll C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86...
    1) No previous versions of CR that bundled with .NET (CR 10.2, CR 10.5) included crdb_jdbc.dll
    2) CRVS2010 is essentially an equivalent to a bundle (more below)
    3) You can not simply copy version 12 dll and hope it will work with another version of CR - this will certainly not work and I am actually surprised that the dll even loads... additionally, I suspect this may be breaking licensing agreements.
    I will ask Program Management what their view is on  the driver with respect to CRVS2010 and post their reply here. But at this time, I suspect the answer will not be particularly positive...
    Ludek

    Hi Ludek,
    Thanks for that. I was fairly sure it was never going to work (especially with the version differences), but just wanted to get the question asked.
    I'll go back to my CR2008 environment and try to get it working on there - hopefully I'll have more luck.
    At some point we will want to upgrade to VS2010 and, if that means we need to convert all the reports to ODBC/ADO .NET datasources, it's likely to be later rather than sooner!
    Any more info you discover on this would be gratefully received.
    Many thanks,
    Darran Smith

  • CRVS2010 Beta - Problems with printing Crystal Reports for VS 2010

    Good afternoon,
    We have the following problem, we used the version of Crystal Reports that came integrated with visual studio for several years. But we are migrating to the version of Visual Studio 2010, and we are using the version of Crystal Reports for this same version, running on screen is correct, and run all the reports, but in print there is a failure we could not solve. Our customers use printers dot matrix as the "Epson LX300 +", but when you print the report leaves the impression defective in the previous version of Visual Studio 2005 "The impression is quite clear, we have attempted to overcome this problem with the options of PrintMode with activex and pdf in the CrystalReportViewer, and RenderingDPI option with multiple values. Obviously when using other types of printers such as laser or inkjet printing is perfect, but due to cost our customers use the printers mentioned. The server where the application is Windows server 2008 and client computers are windows xp, windows 7, windows vista. As network hardware and printers are working properly, and from other applications and from the other server with versions of Crystal Reports If anyone knows how to solve this problem I would like to receive support and ideas.
    Thanks
    Subject modified as per the sticky post at the top of this forum; [Crystal Reports for Visual Studio 2010 Beta - read before posting|Crystal Reports for Visual Studio 2010 Beta - read before posting;
    Edited by: Ludek Uher on Oct 11, 2010 3:42 PM

    I have a question about printing reports. We are using VS2008 and the CR reportviewer with printmode = ActiveX. Many of our users absolutely hate the number of steps they must go through and the time it takes to print a Crystal Report when printmode = PDF. In our environment several times per day, we need to produce hard copies of reports for legal reasons. Making the users first render the report, then had it off to Adobe to print simply takes too much time which is why we are using the ActiveX print control.
    We recently started looking at VS2010 and discovered the issue with the unbundling of Crystal Reports. We have not downloaded CR for VS2010 yet.
    My question is this: for VS2010, what happened to the ActiveX print control? I read somewhere that it was going to become some WPF-type thing but there weren't many details about that. So when a user clicks on the print button in the Crystal Report Viewer intended for VS2010, what can they expect? Can they still print straight to a printer (is there something that gives them this capabitliy like the Active X print control did?), or has that capability been deprecated and they have to go through PDF? Thanks in advance for any information you can give me.

  • N00b is in ddesperate need of some SQL help with parameters

    SO I am trying to create a report that will allow the operator to select an application name (appname from table) which I have working as a ripoff of the AdventureWorks db for passing parameters (stored procedure);
    USE [Test]
    GO
    /****** Object:  StoredProcedure [dbo].[App_Get]    Script Date: 2/19/2015 9:40:58 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[App_Get]
    @GetName NVARCHAR(500)
    AS
    BEGIN
    ;WITH CTE1
    AS
    SELECT CAST(('<i><j>' + REPLACE(@GetName, ',', '</j></i><i><j>') + '</j></i>' ) AS XML) CSV
    ),CTE2
    AS
    SELECT CAST(i.query('./text()') AS VARCHAR(100))CSV
    FROM CTE1
    CROSS APPLY CSV.nodes('/i/j') As x(i)
    SELECT * FROM ae_apps
    WHERE appname IN (SELECT * FROM CTE2)
    END
    AND I have the script that will allow me to pull the information from the multiple tables;
    select ae_login.usrid, ae_login.usrnam, ae_login.fullnam, ae_audit.tsstamp, ae_audit.eventid, ae_agdesc.description, ae_audit.appid, ae_apps.appname
     FROM ae_login, ae_audit, ae_agdesc, ae_apps
     WHERE ae_login.usrid = ae_audit.usrid
     AND ae_audit.eventid = ae_agdesc.eventid
    AND ae_audit.appid = ae_apps.appid
    order by ae_audit.appid, ae_audit.tsstamp
    BUT I do not know how to tie that selected parameter (appname) from the dropdown list.  Essentially I want the operator to select the (appname) and have the report generate the audit information from script above for just that selected (appname). 
    Any Thoughts would be appreciated.

    Hi cnelsonaa27,
    According to your description, you want to add parameter to the report, then users can select an application name from the parameter drop down list when they preview the report, but you don’t know how to tie the dataset and parameter, right?
    To achieve the goal, please refer to the following steps:
      1. In design surface, in Report Data pane, right-click Data Sources and click Add Data Source.
      2. Type data source name, select Embedded connection, then type select Type and type connection string, or select a shared data source.
      3.Right-click Datasets and click Add Dataset.
      4.Select Use a dataset embedded in my report, the default name is Dataset1, then select data source you added in step2, then copy the query to Query text box:
    select ae_login.usrid, ae_login.usrnam, ae_login.fullnam, ae_audit.tsstamp, ae_audit.eventid, ae_agdesc.description, ae_audit.appid, ae_apps.appname
    FROM ae_login, ae_audit, ae_agdesc, ae_apps
    WHERE ae_login.usrid = ae_audit.usrid
    AND ae_audit.eventid = ae_agdesc.eventid
    AND ae_audit.appid = ae_apps.appid
    order by ae_audit.appid, ae_audit.tsstamp
      5.Right-click Datasets and click Add Dataset.
      6.The default name is Dataset2, select data source from drop down list, then copy the query used to create parameter to Query text box.
      7.Right-click Parameters and click Add parameter, type parameter name and prompt.
      8.Click Available Values in left pane, select Get values from a query, select Dataset2 from Dataset drop down list, select appname as Value field, select appname as Label field.
      9.Right-click Dataset1 to open Dataset Properties dialog box, click Filters in left pane, click Add button.
      10.Select appname from Expression drop down list, set Operator to =, then set value to [@ParameterName], click OK.
    For more information about Adding Parameters to a Report, please refer to the following document:
    https://technet.microsoft.com/en-us/library/aa337432%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Need help with parameterizing query

    Hello,
    Database Version: 11gR1
    I have created a materialized view in my database which stores the moving average of Amount and Cummulative Amount for different customers for different months. The moving average window period is 6 months..i.e., If my base table has data for a customer for a period of 1 year(JAN07-DEC07), then in the materialized view the average values will be stored for each customer as follows:
    JAN-07 --Avg(JAN-07)
    FEB-07 --Avg(JAN-07, FEB-07)
    MAR-07--Avg(JAN-07,FEB-07,MAR-07)
    APR-07--Avg(JAN-07,FEB-07,MAR-07,APR-07)
    MAY-07--Avg(JAN-07,FEB-07,MAR-07,APR-07,MAY-07)
    JUN-07--Avg(JAN-07,FEB-07,MAR-07,APR-07,MAY-07,JUN-07)
    JUL-07--Avg(FEB-07,MAR-07,APR-07,MAY-07,JUN-07,JUL-07)
    AUG-07--Avg(MAR-07,APR-07,MAY-07,JUN-07,JUL-07,AUG-07)
    SEP-07--Avg(APR-07,MAY-07,JUN-07,JUL-07,AUG-07,SEP-07)
    OCT-07--Avg(MAY-07,JUN-07,JUL-07,AUG-07,SEP-07,OCT-07)
    NOV-07--Avg(JUN-07,JUL-07,AUG-07,SEP-07,OCT-07,NOV-07)
    DEC-07--Avg(JUL-07,AUG-07,SEP-07,OCT-07,NOV-07,DEC-07)
    Actually i need the values only from the month of July...i.e., avg values for the month of July, Aug, Sep, Oct..and so..But i dont want to hard code the date value in my Materialized view Query..Because as of now the data in my base table is till Dec-07..but it may increase also..So if i hard code the value to what i require now, then in future i may again have to change the query..
    So my question is, Is there any way by which i can parameterize the date values in my materialized view query, so that my materialized view stores the data for date only which i require..
    One more problem is as and when my base table grows, my materialized table would also grow if i dont parameterize the date in the query. So i need to avoid that also..
    One solution what i thought of is to keep data in my base tables only for the required period.i.e., when i want the average values for the month of July, then the data in my base table will be only from Feb-07 to Jul-07, and for the month of Aug data will be only from Mar-07 to Aug-07 and so...So that when i refresh my MV, there will be only six months data, and the number of rows in my MV will be constant and hence the MV size also will be constant..
    Is there any way by which i can schedule to delete the data from my base table as when month changes..I want it to be done automatically when month gets changed..So if anybody knows of a way to do it, Please help me...
    It will be of great help..

    Hi,
    You're creating a materialized view with one row for every combination of customer_id and month, but you don't really want all those rows. What you really want are just the rows where month=target_month, and you (wisely) don't want to hard-code "month=target_month" into the WHERE-clause of the view definition. Is that right?
    If so, you can create a one-row table called param, which has a column for storing the target_month. Your view can do a scalar sub-query or a cross-join to get the value from the param table to use in its WHERE-clause.

  • CRVS2010 Beta - Problems with CR for VS2010

    I just installed Crystal Reports for VS2010 beta2, but I can't create a new crystal report from the VS2010.
    It only displays a .mht file that informed "Crystal Reports for Visual Studio 2010 is a free download and so on..."
    I guess it is a matter of language: my SO and VS2010 versions are both in italian.
    Do you have any suggestion or should I wait november when the final CR version wil be available? (and this final version will have the Italian localization? )
    Thank you for the answer
    Carlos
    Edited by: Don Williams on Sep 24, 2010 6:30 AM

    Second, the solution is it's BETA and is ONLY supported for English only OS's, is what you are going to find. Only option is to wait until it goes GA and supports all languages. Or set your OS to English and then you can use it.
    If you had done a search and read the various posts before posting this same question again you would have got your answer right away.
    Thank you
    Don

  • CRVS2010 Beta - help setting embedded field programatically

    I have a report where the details section spits out names that come from two fields: FIRSTNAME and LASTNAME.
    They are displayed in a textobject with embedded fields []. I need to highlight only the last name if it equals "Smith." I have accomplished this by right-clicking the and "Format Embedded Field" and next to the underline checkbox write a formula that says:
    IF {REPORTS.LASTNAME} = "SMITH" THEN
    True
    My question is, how can I set this formula programatically? I need "SMITH" to be a variable set by the vb.net program. I cannot figure out how to reference an embedded field within a textobject.
    thanks.
    Updated the subject accordingly
    Edited by: Don Williams on Sep 24, 2010 9:54 PM

    Thanks for taking my question. I am using VS 2010, and the CR and assemblies that came standard with it, 14.0.2.
    Meantime I came up with a workaround:
    I created a new input parameter called LASTNAME_IN and I can set that programatically. Then I modified the formula to read:
    IF {REPORTS.LASTNAME} =  {?LASTNAME_IN} THEN
    True
    and this functions as I wish. However this is incredibly manual  (I have to go back and add this parameter to each and every report) and it would be much easier to just be able to reference in the program.
    thanks again.
    Edited by: Chaseshaw on Sep 25, 2010 12:13 AM

  • CRVS2010 Beta - Help Wanted for VS2010 and CR!

    I have been having a hard time getting CR to appear in the VS2010 Ultimate toolbox. I have set the target to Framework 4.0 and installed the CR4VS2010 program but the CR viewer is not showing.
    The problem is worsened by the fact that I am new to CR anyway.
    I really have been banging my head against a brick wall.
    Is there anyway to check the actual installation of CR? The Control Panel says 2008 was installed. Are there any tips about VS2010 and CR working?
    Also are there any books about VS2010 and CR? I saw a lot of CR books but there were not about VS2010.
    Thanks.
    Edited by: Ludek Uher on Jun 17, 2010 8:34 AM

    Solution: re-installed cr4VS2010 and then checked Control Panel to ensure Crystal Reports 2010 was installed. The installation is very long and I think before it had not fully installed as especially the progress bar shows 100% but the installing continues.

  • CRVS2010 Beta - Hyperlinks don't work in textobjects

    I just wanted to report a bug that will hopefully get fixed in the November version of Crystal Reports for Visual Studio 2010.
    HyperLinks do not work!  they cut off any url with a querystring in it.
    Note: I can create one in five seconds in the versions of CR that comes with both Visual Studio 2005 and 2008. 
    Dave.
    Subject modified as per the sticky post at the top of this forum; [Crystal Reports for Visual Studio 2010 Beta - read before posting|Crystal Reports for Visual Studio 2010 Beta - read before posting;
    Edited by: Ludek Uher on Sep 22, 2010 4:13 PM

    I believe this is the same issue as in [CRVS2010 Beta - Problem with HyperLink and Parameters|CRVS2010 Beta - Problem with HyperLink and Parameters;. The issue is also reported in [this|Re: CRVS2010 Beta - Hyperlink translator dropping parm; thread.
    I am not able to reproduce the issue with URL to Yahoo, or Google, etc. If you can provide a publicly available URL that duplicates the issue, I will re-test.
    Ludek

  • CRVS2010 Beta - embedded report not showing

    I have a large number of reports which I have written for a client over the years with various versions of Crystal (starting with V5 I think).
    Currently they are running Crystal Enterprise X but have made the decision that they wish to shift to Visual Studio.
    I have been attempting to cut my teeth on re-writing reports in Visual studio and am struggling.  I then decided to port the existing crystal reports across from the Enterprise environment to Visual Studio.
    I have the CRVS2010 Beta installed with the 64-bit runtime on a Server 2008 platform.
    I have testing simpler Crystal Reports within Visual Studio (File | New | Project | Crystal Reports Application) and the simplest seem to publish with no difficulty.
    However I have just attempted to bring a report containing a sub-report and while the end result seemed to publish fine with no errors, only the main report output shows when the published Visual studio application is run.
    I haven't been able to find anything on this in the forum, so would greatly appreciate it if anyone can offer some assistance.
    Slightly off-topic, I have noted that when the Crystal Report is imported into the Visual Studio designer the database seems to get dropped.  I then have to reconnect via ODBC and re-select the tables after which things seem to run fine.  Is this to be expected ?
    Many thanks

    I have been checking further on this issue.
    If I take the report in a fully functional state saved out of Crystal X and import it into the Visual Studio 2010 environment, the functionality of the subreport appears compromised.
    Out of interest (and remembering that the report has been upgraded from Crystal X) I located the Crystal component in the Visual Studio project folder and opened it within Crystal X.  The subreport now no longer runs under the original Crystal X report writer.
    Something appears to have happened between Crystal X and CRVS2010 Beta.
    I'll have a look and see if I can identify what has happened to it.

  • I cann't execute javac with parameters. please help !!

    Hi All!!
    I can't understand how to execute application or bat file (javac.exe for example) WITH parameters correctly.
    I can execute javac.exe or bat file - WITHOUT parameters :
    Process p = Runtime.getRuntime().exec(WIN_PATH + " " + WIN_FLAG + " " + "javac.exe");
    But I can't execute correctly the command like:
    "javac.exe -classpath C:\Alex; Test.java"
    I tried to use exec(str,env[]) and exec(cmd[]) methods, but there were different errors as a result :(((
    How can I execute the command "javac.exe -classpath C:\Alex; Test.java" ? Is it possible?
    Please help me by a good idea.
    Thank you.

    right you are! That's why we use "\\" instead "\" :)
    If i try to execute this command -
    cmd=WIN_PATH + " " + WIN_FLAG + " " + "c:/j2sdk1.4.0/deleteMe/javac.exe -classpath C:/WORK/jboss-3.0.3/client/jboss-j2ee.jar;S:/Alexander/jars/sys.jar;S:/Alexander/jars/ejb_conf_dev.jar;S:/Alexander/jars/; C:/j2sdk1.4.0/deleteMe/aaBean.java";
    my OS Windows 2000 returns na error - "Error opening icon..."
    What's wrong?
    Thank you...

  • Please help me in resolving the URL with parameters.

    Hello,
    Please help me in resolving the URL with parameters. If desformat is pdf, a pop up message �Acrobat Reader could not open �pa034922.fdf� because it is either not a supported file type or because the file has been corrupted���.
    if desformat is html or xml, the following URL is working.
    our requirement, report should be in pdf format.
    http://servername:7778/dev60cgi/rwcgi60?server=Rep60_mclaren&&userid=bizsystest/test@business&destype=cache&desformat=pdf&report=salary_dept.rdf&p_dept_list=''ABE','ASE','CE','CHE','CS','DE','DIAL','ECE','ERC','IE','ME','PTE','ARC','ASE1''&p_status_list=''ACP','AD','AP','ATP','D','FE','HD','INS','P','RP','S','TF','TP','TS','ST','GS','O''&p_sex=''M','F''&p_order_by='Name'&p_totals='NO'
    Thanks in advance,
    Usha

    We've seen this bug on machines running IE6 with a certain security patch (I forget its number). There's a thread in the Metalink reports forum about it. It appears to be somewhat tied to another problem where IE runs the report twice (you can see that in Showjobs. You're seeing the problem in 6i; I believe it persists in 9i.
    The workarounds are (1) set Acrobat so it doesn't open within IE or (2) switch to a different browser, like Netscape. For workaround 1, Start Acrobat Reader, Choose File -> Preferences -> General, Uncheck Web Browser Integration
    There's some evidence that it occurs more often with urls that include single quote characters. I think it's worse with XP, but I don't have any proof.
    If you check Adobe's site, you will see this isn't just an Oracle Reports problem. I think we're waiting for Microsoft on this one, so don't hold your breath for a quick fix.
    -- jim

  • What init parameters will help with the OBIEE performance..?

    Hi All
    By any chance does any one have info on What init parameters will help with the OBIEE performance..?
    Thanks

    fast=true ;-)
    What performance is causing you a problem? Data retrieval, general UI navigation? Its a massive area to cover. Can you be more specific?

Maybe you are looking for

  • How to upgrade ipod touch 4th generation ios

    I have a 4th gen. iPod Touch (bought for Christmas last year) and just got my kids Touches for Christmas this year.  Under Settings/General, the kids' Touches have an option for Software Update, but on last year's Touch, there is no such option.  It

  • Can I make a bootcamp Partition on the HDD on an iMac 21.5" with SSD and HDD

    I am planning to buy an iMac 21.5" . I am not sure yet, whether to get one with ssd and hdd pre-installed. But I would like to, cause it's much faster. In the manual of the boot camp it says that if you have more than one internal hard drive and you

  • How to upgrage report files from VS2005 to VS 2010

    Hi all, we have some VS 2005 report files( 10.2 ) which need to be edited by VS 2010. The code files behind seem to have different formats. How to convert a old report file to its new format? thanks, Clara 

  • When i open my Safari, it closes after 5 seconds.

    I have installed a toolbar, which i think is the problem, but it closes before i'm able to remove it.. When it closes it says something like "Safari suddenly closed while using the ct_plugins-pluginmodule" but to me its in norwegian so its probably n

  • Most efficient way to import pictures into different albums?

    Hello, It seems like I have run into a little unpractical trouble. My problem is that I have a lot (really, a lot) of folders on my harddrive filled with images that I wish to import into iPhoto. In iPhoto, they would be put into albums namned after