Optional Parameters in a linked SubReport

Hi All,
I'm trying to get something to work, but can't figure out how to do it ! I think that possibly optional parameters will do the trick.
I have a report that is based on a SQL Server stored procedure takes about 20 parameters and is used as a sub report to display header information on what was selected for the report that it is linked to.
For example, there is a "Supplier Report" that takes SupplierID, CategoryID and Sub CategoryID. These parameters are linked to parameters in the stored procedure in the header sub-report which then goes off to the database to get the descriptions for those IDs and displays them. This is standard across all reports. Now, other reports may not use the Category ID and Sub CategoryID, so in those reports, a value of -1 is passed to the header sub-report and in the logic for the header sub report, those sections are hidden.
At the moment, to set the values as -1, I just have a formula in the main report called DummyXXXID which returns -1. For example if CategoryID and SubCategoryID were not used I would have DummyCategoryID and DummySubCategoryID. This works fine.
However, as more reports are created, the header sub-report gets more parameters to display the descriptions of, which means I have to go  back and add 'dummy' formulas to all the other reports that use the header sub-report. e.g. If I have a new report that takes 'WidgetID' as a parameter, the underlying stored procedure for the header report gets @WidgetID as a new parameter and returns a new column of Widget Information to be displayed in the header. I then have to add a DummyWidgetID set to -1 to all reports that don't use the WidgetID parameter so that the header of those reports doesn't try and show Widget information.
What I'd like to do is have the sub report default to -1 (or other values as appropriate to indicate no value) for all parameters in it. In that way, if I add a new parameters to the header sub-report, existing reports will not have to be changed and sub-report links refreshed, since the new parameters in the sub report will have default values.
Is this possible ?? I can't seem to set the parameters in the sub-report to "optional prompt"= true, as they are all fixed at false and there is no drop down to change them.
I hope that makes sense !

Moving to the Design Forum, not an DB question.

Similar Messages

  • How to pass relative dates (Yesterday, Last week) via Command Parameters in a linked subreport

    I have been struggling with this one and would sure appreciate your help
    I have a report that runs fine but takes to long when running, to optimise it have setup it up as a subreport , created a main report which I linked to it via a relative field ({?ServiceID}) field, this has reduced the report time but I would like to go even further by user selecting date e.g startdate, enddate or relative field eg ‘yesterday’, ‘Last Week’
    I can do the selectable start and end date fine but I’m failing to make use of the ‘Yesterday’,’ last week’ within the command parameters, below is an example of the code I have on the reports select expert but I want a semiliar filtering on the command parameter to avoid the filtering taking place on crystal but straight from the DB.
    IF  {?Relative Date}= "Yesterday" THEN currentdate-1
    ELSE IF {?Relative Date}="Last Week" THEN LastFullWeek

    Good Day Guys,
    Apologies for the late response, I have been looking and trying the different suggestion you pointed out, unfortunately without any success
    Stored Proc
    Nrupal, I tried setting one up but I’m getting a error I cannot seem to get past, below is my condition, any help would be appreciated
    where cd1.Service_ID = @Service_ID
    and cd1.CallStartDt in (
      Case @RelativeDate
      When 'Today' then CONVERT (date, getdate())
      When 'Yesterday' Then DATEADD(DAY,-1,CONVERT (date, getdate()))
      When ‘Last Week’ then between @LastWeekStart and @LastWeekEnd       //sytntax before between, also tried using ‘IN’, same result
      When ‘Last Month’ then between @LastMonthStart and @LastMonthEnd 
    else between @CallStart and @CallEnd
    END )
    End
    Crystal command parameter code
    where cd1.Service_ID in ({?Service_ID}) and
    convert(datetime,cd1.CallStartdt) in (
    Case {?RelativeDate}
    When 'Yesterday' Then GetDate()-1
    else  {?CallStart}
    END)
    Abhilash,
    I have tried both your proposed command parameters but still fail
    I’m getting an invalid column name ‘Yesterday’ error , I’m not sure if Crytsal takes this type of command formatting using the command parameters, would appreciate your help as I would like to stay clear of the SP, unless it’s the only altanative
    Dell
    I will start working in your re
    Thanks Again

  • Urgent help required - linked subreport keeps asking for parameter value

    Greetings,
    I have developed a report in the Crystal Reports bundled with Visual Studio 2005. The data is obtained from a stored procedure. One of the fields in the result set is named "Id".
    I have embedded a subreport in the details row of the main report. The subreport also gets its information from a stored procedure. This stored procedure has one parameter named "OpportunityId". This field is linked to the field named "Id" above. the subreport has been set to supress blank subreports.
    In the development environment and running the executable of the application on the development machine the report works perfectly. The subreport displays as it should and all is well.
    When I deploy the report onto user machines where they have the crystal runtime installed, the report keeps asking for a parameter value for the subreport.
    I cannot get this to stop happening.
    This report is urgently required. PLEASE could someone help me out here.
    I am at my wits end.
    I have attached a zipe file containing the following:
    - the two stored procedure
    - the rpt file
    - a sample report
    - a screen showing the report having just been generated
    Thanks in advance,
    Robert Lancaster

    <p>Hi Robert,</p><p>I see your report template and stored procedures. All seems to be ok. <br /></p><p>The most important is to assign the report parameters for all linked subreports (only one in your case).</p><p> </p><p>Try this (in C#, in VB.NET the code are very similary): </p><p>ReportDocument report = new ReportDocument(@"TopFortyReport.rpt");</p><p>AssignParameters(report, paramCollection);</p><p>// and now assign parameters to all linked subreports </p><p>foreach( CrystalDecisions.CrystalReports.Engine.Section section in report.ReportDefinition.Sections)</p><p>{</p><p>    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject reportObject in section.ReportObjects)<br />    {</p><p>        if (reportObject.Kind == ReportObjectKind.SubreportObject) </p><p>        {</p><p>            SubreportObject subReport = (SubreportObject)reportObject;</p><p>            ReportDocument subDocument = subReport.OpenSubreport(subReport.SubreportName);                                               AssignParameters(subDocument, paramsCollection);</p><p>        }</p><p>} </p><p> </p><p>void AssignParameters(ReportDocument report, object[] paramsCollection)</p><p>{</p><p>    int nParams = paramsCollection.Length;</p><p>    for (int iParamIndex = 0; iParamIndex < nParams; iParamIndex++)</p><p>    {</p><p>        if (report.DataDefinition.ParameterFields[iParamIndex].IsLinked())</p><p>            continue;</p><p>        report.SetParameterValue(iParamIndex, paramsCollection[iParamIndex]);</p><p>    }</p><p>}</p><p> </p><p> </p>

  • How to Create a Linked Subreport in Crystal Report for Enterprise

    Hi All
    I am developing a monthly report grouped by cost centre, I want to create a second table for each cost centre showing year to date, underneath the monthly data for that cost centre.  My thoughts on how to achieve this is to create a linked subreport in the group footer of the cost centre grouping.  However every time I try to set this up the report crashes.  Am I doing something wrong, can this be done in crystal reports for enterprise?  Can anyone give me a pointer on how to set up a linked subreport so that it passes the particular cost centre the report is grouped upon into the subreport so it only shows data relevant to that cost centre?
    Any help will be appreciated as I am going in circles at the moment.
    Thanks
    Neil
    Edited by: SmiddyLad on Feb 6, 2012 2:49 AM

    Hi Neil,
    You are doing right. You can create linked subreport in crystal report for enterprise.  Please refer below link to see the elearning tutorial  in which a simiar scenario is explained step by step. Here its an unlinked subreport. Enable subreport filter to make it linked and try. It should work.
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/200c56fc-5a02-2e10-36a1-ba3d28e31fc2]
    Hope it helps you.
    Regards,
    Nikhil Joy

  • How to create optional parameters in discoverer 10.1.2

    I am new to discoverer, Can any one tell me how to create optional parameters in Discoverer desktop edition in 10.1.2
    I looked at the following thread which says optional parameters can be created in 10.1.2 but doesn't tell how tro create it
    How to create optional parameters in Discoverer
    Thanks in Advance

    Hi.
    In the thread you quoted Michael Armstrong-Smith says that optional parameters can be created in Plus but not in Desktop and that's true.
    So your question "how to create optional parameters in Discoverer desktop" is already answered in that thread.
    Assume that it is a typo and you wanted to ask how to create optional parameters in Plus.
    Then the answer is simple: Just uncheck the "Require users to enter a value" checkbox when creating new parameter.
    Regards Jakub

  • HT1918 why i am not able to see the none option in the payment link?

    why i am not able to see the none option in the payment link?

    Did you create a new account using an email address not used with Apple before?
    Maybe your county does not allow a None.
    I am in the US and created a None account using those instructions.

  • Database Adapter & Optional Parameters?

    I'm working on creating a web service that accepts two parameters. Parameter A is required while parameter B is optional.
    I then need to pass these parameters on to the database adapter that will perform my query. Is it possible to set things up so that parameter B is optional at this stage as well?
    When I turn on XML validation on the domain, an error is thrown because null is not a valid value for the parameter.

    If you use the DB adapter for stored procedures then you have control of the input parameters based on the instance XML that is supplied to the procedure. If a parameter is optional and you don't want to supply a value (i.e. you want the parameter's default value), then simply omit the XML element corresponding to the optional parameter from the instance XML. Note that this only works for optional parameters.

  • Passing select-options parameters type to the class

    Hi All,
    I am creating one class and I want to pass the select-options parameters directly to it like s_plant,s_mtart etc .
    So while specifying these as paramters what type I should give them?
    Rgds,
    Madhuri

    Whatever you finally decide upon, you must have a Data Dictionary definition. So either create one for each type (bukrs, vkorg, etc.) or use a general one like RSELOPTION. However with the general one you have to put extra code in the class to convert back from a CHAR 45 field to your special field.
    Anyway, using the Data Dictionary is fun! So go create as many new tables as you need. In the long term, the work you do in the Data Dictionary is never wasted and it may save you time in the future when you need that structure / table again for a different program.
    Creating these structures and tables is easy if you use shortcuts. For example in local definitions in your program you can code...
    data range1 type range of bukrs.
    or
    data wa_bukrs type bukrs.
    ranges range1 for wa_bukrs.
    either of these gives you the structure... no need to manually type sign, option, low, high...
    What about Global (data dictionary) definitions? yes, there are also shortcuts...
    start transaction SE11, enter range table name in the 'Data' field (e.g. ZMYRANGETAB), Hit Create, choose to create a Table Type... now you are on the blank new Maintain Table Type screen. enter a short text for your new table, then choose
    Edit->Define as ranges table type
    next enter your data element (e.g. BUKRS) under 'data element', hit Save and activate. You just created your range table without manually entering sign, option, low, high...
    But wait there's more... on the same screen you can now (after saving the range table) also enter a structure name such as ZMYRANGE in the field 'structured row type'. Hit Create and you are taken to the Maintain Structure screen where the sign, option, low and high are already populated... add a short description and save and activate... you just created a workarea for your range table.
    You just created a table type ZMYRANGETAB and a structure ZMYRANGE with minimal effort.

  • Non Optional Parameters

    Hello,
    I am trying to design a fillable form for our payroll department to calculate payroll adjustments. I am using a OLEDB Database connection to our SQL Server and grab information from a stored procedure. I want the form to populate certain fields when the user passes the check # parameter to the stored procedure.
    My problem is that I can't figure out how to pass the parameter. When I set up the data connection in the form, I get an error message that "Stored procedure has non-optional parameters".
    How can I design the form to allow the user to pass this parameter before the form loads so that the check informtion is displayed in the form?

    Hi,
    As far as I know InDesign takes flat files or XML. Conversion may be required in database before input.
    Imran

  • XSQL with optional parameters

    I am trying to create an XSQL page that has optional parameters.
    What I mean is, I would like the page to return all records for a query when the following url is used http://myserver.com/my_inventory.xsql
    And I would like the page to return limited records for a query when the following url is used http://myserver.com/my_inventory.xsql?item=123
    I have been trying the following with no success. Any suggestions?
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="rowset2inventorylevel.xsl"?>
    <xsql:if-param name="item" exists="no">
    <xsql:query connection="myconn" tag-case="lower" xmlns:xsql="urn:oracle-xsql">
    select m.item_no
    , m.description
    , m.qty_on_hand
    , nvl(p.gross_wt,0) weight
    from item_master m
    , item_price p
    where m.item_no = p.item_no
    and m.status_flag='A'
    and m.discontinue_flag = 'N'
    order by m.item_no
    </xsql:query>
    </xsql:if-param>
    <xsql:if-param name="item" exists="yes">
    <xsql:query connection="myconn" tag-case="lower" xmlns:xsql="urn:oracle-xsql">
    select m.item_no
    , m.description
    , m.qty_on_hand
    , nvl(p.gross_wt,0) weight
    from item_master m
    , item_price p
    where m.item_no = p.item_no
    and m.status_flag='A'
    and m.discontinue_flag = 'N'
    and m.item_no = ?
    order by m.item_no
    </xsql:query>
    </xsql:if-param>

    The easy, but less optimal way, is to use OR in your where clause:
    rewrite "and m.item_no = ?" to "and m.item_no = ? or ? is null" - and remember to include the parameter twice in bind-params.
    The "right" way to do this, meaning a more optimal access path, is to use stored procedures that returns REF CURSORs. Then in the stored procedure you look for NULL and change the where clause accordingly.

  • Errors (-50) occured when i was using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in my iTunes application on my computer.

    errors (-50) occured when i was using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in my iTunes application on my computer.
    what is it?

    Quoted from the link I provided you with, in your other post.
    These alerts occur due to timeouts or conflicts trying to write a file during download.
    If you encounter this issue while accessing iTunes Store:
    See iTunes 9: "One Moment Please" or "Error (-50)" message when accessing iTunes Store
    If you encounter this issue while while downloading something from the iTunes Store:
    Delete your iTunes Downloads folder, located in:
    Mac OS X:
  ~/Music/iTunes/iTunes Media/Downloads   Note: "iTunes Media" may appear as "iTunes Music. Also, the tilde (~) refers to your Home directory.
    Windows Vista:
  \Users\username\Music\iTunes\iTunes Media\Downloads\
    Windows 7:
  \Users\username\My Music\iTunes\iTunes Media\Downloads\
    Windows XP:
  \Documents and Settings\username\My Documents\My Music\iTunes\iTunes Media\Downloads\
    After locating your iTunes Downloads folder:
    Quit iTunes.
    Delete the Downloads folder on your computer.
    Open iTunes.
    Choose Store > Check for Available Downloads.
    Enter your account name and password.
    If you encounter this issue while while downloading Digital Copies using Windows:
    Use MSCONFIG (directions for Windows XP and Windows Vista/Windows 7) to disable conflicting software.
    If using MSCONFIG steps resolves the issue, you may want to use the System Configuration Utility to turn on the third-party System Services and Startup Items one at a time (restarting your computer after turning on the item or items) to identify which System Service or Startup Item is causing the conflict.
    You can turn all of them back on by selecting the Normal Startup option under the General tab of the System Configuration Utility window, but please note that this may cause the issue to reoccur.
    If you are able to isolate the issue to a particular third-party software, you may wish to contact them to let them know of the conflict.

  • Optional parameters to webservice method over FORM-GET

    Hi.
    I'm developing a proof of concept webservice using Workshop and my test method looks something like this:
         * @common:operation
         * @jws:protocol soap-style="rpc" http-xml="false"
            form-post="true" http-soap="true"
        public void foobar(
            String param1, String param2, String param3)
        }The schema elements I map to the parameters specifies that they are optional.
    There are no problems when using this as a webservice - I'm able to specify these optional parameters (or not). When I invoke this using FORM-GET, it seems that these parameters are all required (although I can specify an empty value).
    E.g. The following works fine:
    http://localhost:7001/TestWebService/Test.jws?param1=abc&param2=def&param3=ghi
    The following works fine and calls my code with param1 being an empty string:
    http://localhost:7001/TestWebService/Test.jws?param1=&param2=def&param3=ghi
    The following returns an error:
    http://localhost:7001/TestWebService/Test.jws?param2=def&param3=ghi
    The error is: "Unable to transform query arguments to Java arguments Parameter 'param1' - No value found"
    Can anyone advise on how to not require the presence of optional parameters using FORM-GET?
    Regards,
    Michael.

    Hi,
    thanks for the quick turn-around. Jdev version that i am using is Studio Edition Version 11.1.1.6.0. And i am using SOAP. Isnt there a way without using a backing bean? I am planning to use it as a portlet. Would'nt creating a backing bean cause a problem in that case?? Also i am confused here . The method that i am dragging is GET_ACCOUNTOperation(Object). I tried passing the hashmap . It gave the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.util.HashMap)
    Rampal

  • Adding parameters to a link

    Using DW 2014.1
    When I attempt to add parameters to a link I get a message that prohibits me from completing the task.
    The page is php and my testing server is php. Even when I tell this prompt that I am using php it won't accept it. If a copy a previously used link with parameters already included it works fine. Can anyone tell me what's going on?

    this is a link that works which I essentially entered by hand:
    updatebook.php?bookindex=<?php echo $row_rsBooks['bookindex']; ?>
    I can't show you the one that doesn't work because the process in dreamweaver to create one doesn't let me create it. Here is the process I have always used (Dreamweaver user since 2001)
    1)  Select the text for the link and begin building the link.
    2) Click the parameters button to get to the next step. Enter a name and when I click on the lightning bolt I get the error describer originally described. Even if I click yes and select php it still won't get past this point.

  • Why is the option to open new links in a new window not available?

    Hi, I'd like to select the option to open new links in a new window instead of new tab but the option is greyed out. Can anyone help me on this, please? I tried to untick "Block popup windows" to see if that would help but it didn't.

    Do you mean the setting in Options > Tab or in the right-click context menu of a link on web pages?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Safari opens links in new tabs, or in pre-existing tabs without giving me the option of opening the link in the same tab.

    Safari opens links in new tabs, or in pre-existing tabs without giving me the option of opening the link in the same tab.
    This has never happened before. Normally I would right-click and select open in new tab. How do I fix it? It's really frustrating.

    Safari > Preferences > Tabs
    "Open pages in tabs instead of windows:"
    Click the box for drop down.
    You have three choices, Never, Automatically and Always.
    Pick  your choice.

Maybe you are looking for