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

Similar Messages

  • 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 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.

  • 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

  • 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.

  • Need Help: Dynamically displaying parameter values for a procedure.

    Problem Statement: Generic Code should display the parameter values dynamically by taking "package name" and "procedure name" as inputs and the values needs to be obtained from the parameters of the wrapper procedure.
    Example:
    a) Let us assume that there is an application package called customer.
    create or replace package spec customer
    as
    begin
    TYPE cust_in_rec_type IS RECORD
    cust_id NUMBER,
    ,cust_name VARCHAR2(25) );
    TYPE cust_role_rec_type IS RECORD
    (cust_id NUMBER,
    role_type VARCHAR2(20)
    TYPE role_tbl_type IS TABLE OF cust_role_rec_type INDEX BY BINARY_INTEGER;
    Procedure create_customer
    p_code in varchar2
    ,p_cust_rec cust_in_rec_type
    ,p_cust_roles role_tbl_type
    end;
    b) Let us assume that we need to test the create customer procedure in the package.For that various test cases needs to be executed.
    c) We have created a testing package as mentioned below.
    create or replace package body customer_test
    as
    begin
    -- signature of this wrapper is exactly same as create_customer procedure.
    procedure create_customer_wrapper
    p_code in varchar2
    ,p_cust_rec customer.cust_in_rec_type
    ,p_cust_roles customer.role_tbl_type
    as
    begin
    //<<<<<---Need to display parameter values dynamically for each test case-->>>>>
    Since the signature of this wrapper procedure is similar to actual app procedure, we can get all the parameter definition for this procedure using ALL_ARGUMENTS table as mentioned below.
    //<<
    select * from ALL_ARGUMENTS where package_name = CUSTOMER' and object_name = 'CREATE_CUSTOMER'
    but the problem is there are other procedures exists inside customer package like update_customer, add_address so need to have generalized code that is independent of each procedure inside the package.
    Is there any way to achieve this.
    Any help is appreciated.
    // >>>>
    create_customer
    p_code => p_code
    ,p_cust_rec => p_cust_rec
    ,p_cust_roles => p_cust_roles
    end;
    procedure testcase1
    as
    l_cust_rec customer.cust_in_rec_type ;
    l_cust_roles customer.role_tbl_type;
    begin
    l_cust_rec.cust_id := 1;
    l_cust_rec.cust_name := 'ABC';
    l_cust_roles(1).cust_id := 1;
    l_cust_roles(1).role_type := 'Role1';
    create_customer_wrapper
    p_code => 'code1'
    ,p_cust_rec => l_cust_rec
    ,p_cust_roles => l_cust_role
    end;
    procedure testcase2
    as
    l_cust_rec customer.cust_in_rec_type ;
    l_cust_roles customer.role_tbl_type;
    begin
    l_cust_rec.cust_id := 2;
    l_cust_rec.cust_name := 'DEF';
    l_cust_roles(1).cust_id := 2;
    l_cust_roles(1).role_type := 'Role2';
    create_customer_wrapper
    p_code => 'code2'
    ,p_cust_rec => l_cust_rec
    ,p_cust_roles => l_cust_role
    end;
    end;

    Not possible to dynamically in a procedure, deal with the parameter values passed by a caller. There is no struct or interface that a procedure can use to ask the run-time to give it the value of the 1st or 2nd or n parameter.
    There could perhaps be some undocumented/unsupported method - as debugging code (<i>DBMS_DEBUG</i>) is able to dynamically reference a variable (see Get_Value() function). But debugging requires a primary session (the debug session) and the target session (session being debugged).
    So easy answer is no - the complex answer is.. well, complex as the basic functionality for this do exists in Oracle in its DBMS_DEBUG feature, but only from a special debug session.
    The easiest way would be to generate the wrapper itself, dynamically. This allows your to generate code that displays the parameter values and add whatever other code needed into the wrapper. The following example demonstrates the basics of this approach:
    SQL> -- // our application proc called FooProc
    SQL> create or replace procedure FooProc( d date, n number, s varchar2 ) is
      2  begin
      3          -- // do some stuff
      4          null;
      5  end;
      6  /
    Procedure created.
    SQL>
    SQL> create or replace type TArgument is object(
      2          name            varchar2(30),
      3          datatype        varchar2(30)
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type TArgumentList is table of TArgument;
      2  /
    Type created.
    SQL>
    SQL> -- // create a proc that creates wrappers dynamically
    SQL> create or replace procedure GenerateWrapper( procName varchar2 ) is
      2          procCode        varchar2(32767);
      3          argList         TArgumentList;
      4  begin
      5          select
      6                  TArgument( argument_name, data_type )
      7                          bulk collect into
      8                  argList
      9          from    user_arguments
    10          where   object_name = upper(procName)
    11          order by position;
    12 
    13          procCode := 'create or replace procedure Test'||procName||'( ';
    14          for i in 1..argList.Count
    15          loop
    16                  procCode := procCode||argList(i).name||' '||argList(i).datatype;
    17                  if i < argList.Count then
    18                          procCode := procCode||', ';
    19                  end if;
    20          end loop;
    21 
    22          procCode := procCode||') as begin ';
    23          procCode := procCode||'DBMS_OUTPUT.put_line( '''||procName||''' ); ';
    24 
    25          for i in 1..argList.Count
    26          loop
    27                  procCode := procCode||'DBMS_OUTPUT.put_line( '''||argList(i).name||'=''||'||argList(i).name||' ); ';
    28          end loop;
    29 
    30          -- // similarly, a call to the real proc can be added into the test wrapper
    31          procCode := procCode||'end;';
    32 
    33          execute immediate procCode;
    34  end;
    35  /
    Procedure created.
    SQL>
    SQL> -- // generate a wrapper for a FooProc
    SQL> exec GenerateWrapper( 'FooProc' );
    PL/SQL procedure successfully completed.
    SQL>
    SQL> -- // call the FooProc wrapper
    SQL> exec TestFooProc( sysdate, 100, 'Hello World' )
    FooProc
    D=2011-01-07 13:11:32
    N=100
    S=Hello World
    PL/SQL procedure successfully completed.
    SQL>

  • How to pass the dynamic request parameter value $fieldName:IsSelected for framework folder service FLD_PROPAGATE?

    Hello All,
    I created a WSDL for Framework folder service FLD_PROPAGATE  and FLD_PROPAGATE service has following two required request parameter:
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate
    So, I am facing issue in passing the parameter $fieldName:isSelected.
    I tried to pass the request parameter as mentioned below in SOAP UI request payload but still this is not working and error message is: "Unable to propagate. Please select at least one field to propagate"
    <csx:fSecurityGroup:IsSelected>1</csx:fSecurityGroup:IsSelected>
    <csx:fFolderGUID>C7F5CBB4E54A790E21E18CE378B16EEB</csx:fFolderGUID>
    <csx:fSecurityGroup>Public</csx:fSecurityGroup>
    Could you please suggest for the correct way to pass these parameter values? If anyone have sample WSDL for this service please share?
    Here is the complete service definition:
    FLD_PROPAGATE
    Service that propagates metadata down through the folder structure in Folders.
    Service Class: intradoc.folders.FoldersService
    Location: IdcHomeDir/resources/frameworkfolders_service.htm
    Required Service Parameters
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate

    Hello All,
    I created a WSDL for Framework folder service FLD_PROPAGATE  and FLD_PROPAGATE service has following two required request parameter:
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate
    So, I am facing issue in passing the parameter $fieldName:isSelected.
    I tried to pass the request parameter as mentioned below in SOAP UI request payload but still this is not working and error message is: "Unable to propagate. Please select at least one field to propagate"
    <csx:fSecurityGroup:IsSelected>1</csx:fSecurityGroup:IsSelected>
    <csx:fFolderGUID>C7F5CBB4E54A790E21E18CE378B16EEB</csx:fFolderGUID>
    <csx:fSecurityGroup>Public</csx:fSecurityGroup>
    Could you please suggest for the correct way to pass these parameter values? If anyone have sample WSDL for this service please share?
    Here is the complete service definition:
    FLD_PROPAGATE
    Service that propagates metadata down through the folder structure in Folders.
    Service Class: intradoc.folders.FoldersService
    Location: IdcHomeDir/resources/frameworkfolders_service.htm
    Required Service Parameters
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate

  • "Dynamic" Default Parameter

    How would one tell a Flash Component that has a Parameter,
    that is viewable through the Parameters tab, to use a variable that
    has been passed through to the swf via the url? For example, my
    Flash component has a Default Filename parameter that shows up in
    the Parameters tab, but I want to set that to be the value that is
    passed in
    http://url/myflashfile.swf?filename=myfilname
    Many thanks.

    Gary,
    > Thank you for responding. I'm using AS2. I still have
    some
    > confusion. In your example the passed in variable is
    OrangeJuice.
    > But what if on the next user it is HashBrowns?
    If the actual name of the external variable changes, then of
    course
    you'll have to update your ActionScript to look for the new
    variable. Does
    that make sense?
    > I'm looking for a way to drop in the passed in variable,
    let's call it
    > BreakfastItem, into the components parameter panel. So
    in my
    > mind I want to be able to put in #breakfastitem# ... in
    the
    > components parameters tab, and have the Flash
    automatically
    > populate the parameter with the actual value that is
    passed
    > in.
    Based on what you're typed, it looks like the name of your
    variable is
    breakfastitem, whose string value might be "orange juice" or
    "hash browns"
    (or whatever) ... which means you'll put breakfastitem
    (without the pound
    signs) into your parameters panel -- and that assumes that
    the FlashVars
    variable (the incoming variable) is named breakfastitem.
    If, for some reason, the Parameters panel doesn't agree with
    dynamic
    data, then give your component an instance name (see the
    Parameters panel or
    Property inspector) use dot notation, as I showed earlier.
    If this still isn't clear, keep asking. :) What you're after
    is
    certainly doable, and I'm happy to keep rewording my
    suggestions until thay
    make sense.
    David Stiller
    Contributor, How to Cheat in Flash CS3
    http://tinyurl.com/2cp6na
    "Luck is the residue of good design."

  • Data model: single quote in default parameter value

    Hello,
    when I assign a default value to a parameter in my Data model, which includes a single quote (i.e. "It's a default value"), then the single quote is escaped with a backslash (i.e. "It\'s a default value") when I open the report associated with the data model. How can I get rid of the escape character when opening a report?
    Regards,
    Jure

    Hi Yogini,
    Thanks for your reply.
    When the customer name is selected, discoverer reports automatically enclose the customer names in single quotes. like 'ABC LTD', 'ABC's INC',
    I know how to change this single quote format. Also we don't want user to change the parameter selection criteria once selected.
    Also related to double quotes isn't it doubles are treated as column names in the SQL query and can not be used for any other purpose.
    Apologies, I haven't tried this but I think it will not work. Have you tried this with discoverer viewer.
    As mentioned intrusting things is when a customer name with single quote is selected in discoverer Plus it automatically formats the filter criteria to look like ['ABC LTD', 'ABC''s INC'] but this thing doesn't happen in viewer.
    I think this is a bug in discoverer viewer and think there must be some patch available to correct this problem.
    Sorry, don't have a solution yet but will certainly update the thread once I get the solution.
    Also please keep looking for a solution and let me know as well.
    Thanks a lot in advance.
    Best Regards,
    Manish

  • Saved default Parameter values not appearing in Run Time version of report

    I've created a report in Crystal 2008 and set up a number of parameters. I supplied each of them with a default value. I check it out in Crystal Reports and a nice looking window opens up that shows all my parameters with the default values. I save the report and open it within our application and upon pressing print, a plain looking box appears that lists my parameters but none of the saved values are included. Is this a problem with my version of Crystal Reports (ver. 12.2.0.290) that I can get an update for to fix; Or, is this a problem with the crviewer.dll that we are running in our application (ver 11.0.0.1282, dated March 8, 2005)?
    I'm worried about updating to the latest Crystal 2008 crviewer.dll because I've read where it is only for reports with Saved Data and that won't work for us. We need the ability to refresh the data on the reports.

    Hi Mike,
    It likely is the viewer causing the problem. 2008 now has cascading parameters and the activex viewer does not support them.
    All I can suggest is you try CR XI R2 which you can upgrade for free, you have to contact CIC to get a keycode to deploy your app, and test again.
    R2 is out of support now so no fixes available...
    http://downloads.businessobjects.com/akdlm/crystalreports/crxir2_sp4_full_bld_0-20008684.exe
    http://downloads.businessobjects.com/akdlm/crystalreports/CRYSTALREPORTS06_0-20008684.EXE
    Thanks
    Don

  • Trying to return query dynamically if parameter value is not null and null

    Hi,
    I wrote a custom code like this....
    Public Shared Function GETSQL(ByVal month as Date, ByVal year as Date, ByVal partyCode as Integer)
    Dim sql1 As String
    Dim sql2 As String
    Dim sql3 As String
    Dim sql4 As String
    If (IsNothing(partyCode)) Then
    sql1 = " select " & vbCrLf
    sql3 = " where " & vbCrLf
    sql3 = sql3 & " Month(SaleHDR.Date)=month " & vbCrLf
    sql3 = sql3 & " and year(SaleHDR.Date)=year " & vbCrLf
    sql4 = " GROUP BY Month(SaleHDR.Date), " & vbCrLf
    sql4 = sql4 & " YEAR(SaleHDR.Date), " & vbCrLf
    sql4 = sql4 & " DAY(SaleHDR.Date), " & vbCrLf
    sql4 = sql4 & " ProductGroup.ProductGroupCode " & vbCrLf
    Else
    sql1 = " select " & vbCrLf
    sql3 = " where " & vbCrLf
    sql3 = sql3 & " Month(SaleHDR.Date)=month " & vbCrLf
    sql3 = sql3 & " and year(SaleHDR.Date)=year " & vbCrLf
    sql3 = sql3 & " and Party.PartyCode=partyCode " & vbCrLf
    sql4 = " GROUP BY Month(SaleHDR.Date), " & vbCrLf
    sql4 = sql4 & " YEAR(SaleHDR.Date), " & vbCrLf
    sql4 = sql4 & " DAY(SaleHDR.Date), " & vbCrLf
    sql4 = sql4 & " ProductGroup.ProductGroupCode " & vbCrLf
    End If
    sql2 = " Month(SaleHDR.Date) as Month, " & vbCrLf
    sql2 = sql2 & " YEAR(SaleHDR.Date)as Year, " & vbCrLf
    sql2 = sql2 & " DAY(SaleHDR.Date) as Day, " & vbCrLf
    sql2 = sql2 & " ProductGroup.ProductGroupCode, " & vbCrLf
    sql2 = sql2 & " SUM(ISNULL(SaleDTL.ProductRate,0)*isnull(SaleDTL.ProductQuantity,0)) as SalesAmount " & vbCrLf
    sql2 = sql2 & " from " & vbCrLf
    sql2 = sql2 & "  SaleDTL " & vbCrLf
    sql2 = sql2 & "  inner Join " & vbCrLf
    sql2 = sql2 & " SaleHDR " & vbCrLf
    sql2 = sql2 & "  ON SaleDTL.Id = SaleHDR.id " & vbCrLf
    sql2 = sql2 & "  inner Join " & vbCrLf
    sql2 = sql2 & "  ProductMaster " & vbCrLf
    sql2 = sql2 & "  ON SaleDTL.ProductId = ProductMaster.ProductID " & vbCrLf
    sql2 = sql2 & "  inner Join" & vbCrLf
    sql2 = sql2 & "  ProductGroup " & vbCrLf
    sql2 = sql2 & "  ON ProductMaster.ProductGroupId = ProductGroup.ProductGroupID " & vbCrLf
    sql2 = sql2 & "  inner Join " & vbCrLf
    sql2 = sql2 & "  Party " & vbCrLf
    sql2 = sql2 & "  ON SaleHDR.PartyId = Party.PartyID " & vbCrLf
    GETSQL = sql1 & sql2 & sql3 & sql4
    End Function
    to use in my project report. I'm just trying to combine two reports(first one without partycode condition, second with a party code condition) into one report by using above custom code.
    then i use this as a query expression in a dataset: Code.GETSQL(Parameters!Month.Value,Parameters!Year.Value,Parameters!PartyCode.Value)
    but when i try to preview the report i'm getting a error saying:
    Cannot set the command text for dataset 'DataSet1'
    Error during processing of the command text expression of dataset 'DataSet1'.
    Can anyone help me here Please!!!
    Very much appreciated if anyone can guide me if there is a other way around.
    Thank you!!

    I think you just need to do this as a SQL query in your data source, and use the condition:
    WHERE (Party.PartyCode = @pPartyCode or @pPartyCode is null)
    I rewrote your vb as t-sql here:
    (if you're using this as a data source, remove the first line where the parameters are declared, as SSRS will create the parameters for you)
    declare @pMonth int, @pYear int, @pPartyCode nvarchar(20)
    select
    month(SaleHDR.[Date]) as [Month],
    year(SaleHDR.[Date]) as [Year],
    day(SaleHDR.[Date]) as [Day],
    ProductGroup.ProductGroupCode,
    SUM(ISNULL(SaleDTL.ProductRate,0)*isnull(SaleDTL.ProductQuantity,0)) as SalesAmount
    from SaleDTL
    inner join SaleHDR ON SaleDTL.Id = SaleHDR.id
    inner join ProductMaster ON SaleDTL.ProductId = ProductMaster.ProductID
    inner join ProductGroup ON ProductMaster.ProductGroupId = ProductGroup.ProductGroupID
    inner join Party ON SaleHDR.PartyId = Party.PartyID
    where
    Month(SaleHDR.[Date])= @pMonth
    and year(SaleHDR.[Date])= @pYear
    and (Party.PartyCode= @pPartyCode or @pPartyCode is null)
    group by month(SaleHDR.[Date]),
    year (SaleHDR.[Date]),
    day (SaleHDR.[Date]),
    ProductGroup.ProductGroupCode

  • Default Parameter Dynamic Values in BIP

    Hi All,
    I have Period Name which is Varchar data Type and has values like JAN-2014, so I want to set the Default Parameter value to previous month dynamically. I tired setting with {$To_Char(Add_Months((Sysdate),-1),'MON-YYYY')$) but it didn't work as I thinking for using this Data Type should be only DATE format.
    Any Help or Thoughts
    Thanks
    SYK

    Hello,
    We are trying to create a BI Publisher Report in Siebel by passing the values dynamically from Siebel field to report. Is it possible to
    1. Pass dynamical values to parameter values of type picklist from Siebel, while executing BI Publisher Reports?
    As far as I am aware, it is not possible to have picklist values to be passed on from Siebel while executng BI Publisher reports.
    2. Select more than one value in the parameter values while executing the report?
    Parameters can have one of the many values defined while generating the report.
    3. How to attach Calendar as a parameter to the report?
    No, one cannot have calender as a parameter to the report. You can define the parameter as a sting and users can enter a date value in that string.
    Thanks
    Swarna

  • Parameter value selected is not getting into paramater variable.

    Hi,
    I have a parameter variable in which there is a list of values(2007,2006,2005,2004).
    By default, parameter value is 2007. But when I select any other value form the list, variable doesnot show that selected value at all. Someday back variable was showing me value , but now its not showing. Please give me some suggestion.
    Thankyou,
    Poonam

    Hi,
    While declaring the Parameter do not assign directly,  i mean Declare the paramter and do not use the DEFAULT option with the parameter, instead of this assign the 2007 value in INITILIZATION event, then ones you select it then the value will come into this parameter
    Regards
    Sudheer

  • Default Parameter Not Working

    Hello,
    I have an SSRS report with a multi value parameter assigned to it. I have also assigned a default value so that when the report is run, the report will initially open based on the default values. However, the report still prompts the user to chose a value
    from the picklist first upon running the report without firing the report based on the default parameter. To add more context, my multi value parameter and default parameter come from two different datasets. I have also based my query to check if values are
    not null as a condition. Any help regarding this would be greatly appreciated!

    I think the issue is your default parameter value is not included among the values returned by your dataset which is used for filling the parameter combo. Thats when it selects nothing and waits for the user selection.
    What you need to do is to tweak the dataset for parameter values population and also include logic to return default value also within it. Then once report runs it will show default value as selected and render the report with it.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How can I set bind parameter as Default Display Value in JHeadstart

    Hi,
    I am using -
    JDeveloper Studio Edition Version 10.1.3.1.0.3984
    JHeadstart Release 10.1.3.1.26
    Can anybody help me for the following:
    I am using a super class of ViewObjectImpl where I am definning a bind parameter (Student ID) using login userid:
    if ("p_std_id".equals(bindParam[0])) {
    sLog.debug("executeQueryForCollection: found bind param p_std_id, setting value to " + studentNumber_from_LDAP);
    bindParam[1] = studentNumber_from_LDAP;
    Then I defined p_std_id in Bind Variables tab in VO Editor and used that in Where clause in the SQL Statement tab.
    This is working fine.
    Now what I want to do is:
    I want to put the value of p_std_id as Default Display Value for a field.
    Can anybody let me know how I can put the value of p_std_id in JHeadstart Application Definition?
    Thanks
    Syed Jabbar
    University of Windsor
    Windsor, ON, Canada

    Hi Jan and Steven,
    Thanks for your reply.
    I need to show the default value in the table layout.
    Steven, could you please give some more hints about EL Expression?
    To obtain the value of p_std_id now and pass it on as bind param, I am using a class extending ViewObjectImpl. Inside that class I am using the following method:
    I'd appreciate if you could help for the EL Expression.
    Thanks
    protected void executeQueryForCollection(Object Object, Object[] bindParams,
    int i) {
    String userId = ((ApplicationModuleImpl)getApplicationModule()).getUserPrincipalName();
    try{
    getLdapInfo(userId);
    catch(Exception e) {
    sLog.debug("executeQueryForCollection: Userid = " + userId);
    if (bindParams != null)
    for (int j = 0; j < bindParams.length; j++)
    Object[] bindParam = (Object[])bindParams[j];
    if ("p_user_id".equals(bindParam[0])) {
    sLog.debug("executeQueryForCollection: found bind param p_user_id, setting value to " + userId);
    bindParam[1] = userId;
    if ("p_emp_id".equals(bindParam[0])) {
    sLog.debug("executeQueryForCollection: found bind param p_emp_id, setting value to " + employeeNumber_from_LDAP);
    bindParam[1] = employeeNumber_from_LDAP;
    if ("p_std_id".equals(bindParam[0])) {
    sLog.debug("executeQueryForCollection: found bind param p_std_id, setting value to " + studentNumber_from_LDAP);
    bindParam[1] = studentNumber_from_LDAP;
    super.executeQueryForCollection(Object, bindParams, i);
    Thanks
    Syed

Maybe you are looking for

  • File Adapter  sync reading error

    I am getting the following error trying to read a pdf file using file adapter <assign name="Assign2"> <copy> <from variable="receiveInput_process_InputVariable" part="filename"/> <to variable="file"/> </copy> <copy> <from variable="receiveInput_proce

  • Adobe acrobat 8.2.2 update wont pdf from Quarkxpress ?

    I just updated adobe acrobat from 8.2.1 to 8.2.2 and suddenly I am unable to print pdf's from Quarkxpress! When I open a quark document and try to pdf it just does nothing and then becomes unresponsive. Does anyone have any ideas on what the problem

  • BAT Import "Subscript out of range"

    I'm attempting to import phones and users with the BAT version 5.0(2) and CCM 4.0. The file is validated fine, but when I do the insert, the browser returns the error dialog: Error Number: -2146828279 Description: Subscript out of range The users the

  • How to move talking person in video from center to far left

    Hello,  I am new to AE, and I have a green screen video that was done, that has a person centered in the video, talking about our website.  Is there a way where I can move that person to the far left, which would leave open space where I can add vari

  • ITunes crashes when i attempt to access certain mp3s from my iphone

    Hi I have put some essential mixes on my iphone which are 2 hours long, and when i right click to edit info or delete them off the iphone library on itunes the program crashes. any ideas?