Passing Paramters to sub-report

I need some help with parameters between reports.  I have a master report and a sub-report which is linked to a stored procedure.  The stored procedure used in the sub-report has input parameters defined.
I have a master report which has a two level dynamic prompt.  When one of three companies are selected, the dynamic list of states available for that company is displayed.  I then want to assign the selected list of states to the  parameter in the sub-report.  I have created a shared variable and joined the master reports parameter values into the variable.  In the master the resulting string looks like what I want in the sub-report stored procedure, for example ('WA', 'OR').  However, when I run the report the stored procedure input parameter appears to have no values assigned.
Is there some way to assign the default for the sub-report store procedure parameter to a value from the master report?
Thanks

Sorry, but I am still missing something.  I have a formula which builds the string.
Shared stringVar vStates;
vStates := JOIN({?pCompany - CIS_DIVISION},",");
vStates := "'" + vStates + "'";
vStates := REPLACE (vStates, ",","','");
vStates;
When shown on the report the output is what I want, 'WA','OR'.  But when linked to the SP parameter, no data is returned when more than one state is selected.  Again, when a single value is selected, it works fine.
The input parameter is defined as varchar2 in the SP.

Similar Messages

  • Passing parameters to sub report's stored procedure

    I'm attempting to pass values from the main report to a linked sub report's stored procedure, but I haven't been successful yet.
    I know how to filter the parameters on the return set of the stored procedure, using parameters from the main report. However, I would like the stored procedure executed for each record of the main report, using those values passed.

    I was getting "missing parameter values" trying to send parameters to a stored procedure in the subreport.  Turns out there is a hot fix for my issue.  Not sure if it matches what you're trying to do; you need to give more information on what you've already tried.
    I was using CR XI, and also CR for VS 2005. The problem seems to be fixed with CR VS2005 SP1, for Visual Studio CR.
    Look up under Business Objects Downloads: Crystal Reports > .NET > Hot Fixes
    Files:
    CRRedist2005_x86.msi
    crvs05sp1.exe
    Then open the report again, and re-save it.
    This has fixed the problem for me.
    Good luck!

  • Passing Parameter to sub report from detail section of Main report

    I am new to CR
    I am developing a CR for Clinical Lab Test. My main report have four field i.e
    1. Test Code
    2. Test Name
    3. Result Value
    4. Normal Values
    This report has sub report in Page Footer. When TestCode = 18 or 19 It has to show a normal value table in Page footer of that page. Other wise this table should not appear on page footer.
    Please help me

    Hi Qasim,
    Go in Section Expert and select the page footer.  You will find Suppress in right side of the window, go in formula editor and give the follwoing formula :
    If Testcode<> 18  or Testcode <> 19 Then true
    Thanks,
    Sastry
    Edited by: Sastry Duvvuri on Oct 14, 2008 7:10 PM

  • How to pass the value from Sub report to main report

    I have un report(mainreport) within a subreport(subreport).
    With reporting services, how to pass the value from Sub report to main report?
    thanks

    Hi Alebet,
    With reporting services to pass values from sub report in to main report is not supported directly.
    But there are some workarounds through which you can get this .
    There are two ways to get this.
    1- Put your sub report query into some table. i mean to say through the subreport query get some temporary table.
    2- Using this temporary tables data write some Scala function in the data base.
    3- Now in your main report query return this scala function as a column.
    4- Extract the column value where ever you want in your main report which is getting calculated from the subreport query. so you will be getting the values returned from the subreport in the main report.
    This will definitely work fine as i have done some report in this way.
    Another way of doing is that
    1- prepare another data set with the same query as in sub report in the data tab.
    2- then refer this 2nd dataset in your main report .
    But better way will be the top one.
    Anyway please let me know if you get the solution.
    Thanks
    Mahasweta

  • Crystal Report Viewer - Sub Reports

    Hi Everyone,
                        I'm working with Crystal Reports(V13.0.7) Windows form viewer in VS2012(VB.Net). I have a sub report which is causing problems. I have set the link to the Main report parameter and Sub report. I have a total of 43 parameters getting passed(Main and Sub Reports including). While setting the ReportSource in code, I find that there are 43 parameter fields passed. But i constantly get an error "The parameter is incorrect". An important thing to note is that- Whenever i debug the code, the report gets displayed but it is not so when in release mode. Can anyone help me in this regard. I'm totally frustrated and its been weeks and i haven't solved the issue yet. I have attached the files below (FrmViewer - Used to add and set report source for Main and sub reports) and (Display-AR-REPORT( ) - for passing main report and sub report parameters). The AR.Rpt report

    Hi Sastry,
                   Firstly, thanks for replying to my post. I have checked all the parameters passed, did some changes(Had extra 0's after decimal point), but still no change. The same old Error. As i have mentioned before, Whenever i debug the code, the report gets displayed but it is not so when in release mode. The file (Original Report.png)image is a Perfect report. The report file (MyReport.png)shown below is my report.

  • Display different footer in main report of SSRS based on sub report

    I have a main report in which there are two sub reports and then those two sub reports each contain one sub-subreport.
    The following will give you an idea
    Main Report
    ----->Sub Report 1
    ------------>Sub Sub Report 1
    ----->Sub Report 2
    ------------>Sub Sub Report 1
    I am trying to display name of subreport in footer of main report depending on which subreport user is currently in. So let's say if user is viewing Sub Report 1 then it should display in footer of main report "Sub Report 1" (this is actually coming
    from database and is not like displaying some static text but for the time being ignore this)  
    If user is viewing Sub Sub Report 1 then footer of main report should say "Sub Report 1: Sub Sub Report 1"  
    After searching a bit I found out that:
    1. Sub report footer will not be shown in Main report hence this option is ruled out
    2. You cannot pass parameter from sub report to main report so this option is also ruled out
    But looks like you can use Shared Variables between Sub Report and Main Report. I tried to do this but looks like it doesn't work. Here's what I did:
    In my Sub Report 1, I declared a shared variable as below:
    Public Shared Dim sharedVariable as String = "Sub Report 1"
    Now in my Main Report I wrote the following function in code just to test if it prints it on screen on not.
    Public Function PrintSharedVariable() as String
    Return sharedVariable
    End Function
    But when I run this report, it shows error that sharedVariable is not declared in Main Report. How do I use shared variables and will it work in my case?

    Hi Frank,
    According to your description, you want to show the subreport name in the main report. Right?
    In Reporting Services, all the custom code is only work for the current report. The sharedVariable you created in subreport can't be used in main report. That's the reason why it throws the error because there's no sharedVariable in main report. For your
    requirement, the most effective workaround is having a textbox with go to report Action and passing the report name as parameter back to main report.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Linking Parameters to sub report from main report.

    When we link a formula in a main report to a sub report parameter and then use the sub report parameter in a SQL Command to an Oracle database, the Crystal Report works in Crystal Reports 2008 but not in  CRFE 2.0 SP1. Please help how to do this. I'm restoring the sub report links after changing the database connection info as per Ted's advice in another thread. Please note that I can see and print the parameters being passed in the sub report. It's only that I can not use it in the SQL command.
    We get the following exception
    Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.hyperformix.athens.crystal.CrystalReportEngine.exportCrystalReport(CrystalReportEngine.java:261)
         ... 11 more
    Caused by: java.lang.NullPointerException
         at com.crystaldecisions.reports.reportdefinition.ParameterFieldDefinition.qJ(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.ParameterFieldDefinition.qL(Unknown Source)
         at com.crystaldecisions.reports.dataengine.f.hH(Unknown Source)
         at com.crystaldecisions.reports.dataengine.f.S(Unknown Source)
         at com.crystaldecisions.reports.dataengine.f.hN(Unknown Source)
         at com.crystaldecisions.reports.dataengine.DataSourceManager.int(Unknown Source)
         at com.crystaldecisions.reports.dataengine.DataSourceManager.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.DataSourceManager.if(Unknown Source)
         at com.crystaldecisions.reports.dataengine.y.byte(Unknown Source)
         at com.crystaldecisions.reports.dataengine.y.equals(Unknown Source)
         at com.crystaldecisions.reports.dataengine.i.if(Unknown Source)
         at com.crystaldecisions.reports.dataengine.i.do(Unknown Source)
         at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatterBase.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(Unknown Source)
         at com.crystaldecisions.reports.formatter.export2.a.a(Unknown Source)
         at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    Edited by: balaji va on May 14, 2009 2:55 AM

    Hi Thomas,
    Thanks for the idea but the problem is not that simple, as I'm developing a framework for Crystal Reports 2008 for use at work for future projects. It is not developer-friendly for developers who will use the framework to have a pre-processing just to predict the values they will use for the sub-reports and feed it via the main report (we will not be even sure of the number of parameters to allot for the subreport if that was the case) when all they really needed was a single value.
    e.g. Reports on Departments in a Location (parameter) and the Officers in each Location
    Main Report will query for the Departments in a certain location and other information about it
    Sub report will query for the Officers in the department and their Information (linked to main report via department ID)
    All the developer needed to provide was the Location parameter. I can't make it hard for them so that they need to revise their templates because the new JRC can't process this template. The said template worked in JRC in Crystal Reports XI, that's why I'm thinking there should be a way (I might just have made a mistake or two in what I'm doing in the new JRC). Or is there a bug in the new JRC? I'm hoping for our SAP forum guys here (Ted or other people from SAP) to clear this up.
    Thanks a lot.
    Regards,
    Rizza
    P.S. For snippets of my code, please see JRC for Crystal Reports for Eclipse V2.0 Parameter Problems

  • Is it possible to pass a formula value from a sub-report to a main report

    Hi there,
    Im trying to pass a formula value from a Sub-report back upto into my Main report but the value doesnt seem to be getting passed up. Ive tried it the other way around, that is, passing a value from the main report to the sub-report and that works fine.
    Below is an example of what I am trying to do but it is not working. In my sub-report Ive declared a formula variable as,
    formula name=main_subIntRatePageCount
    Shared NumberVar subIntRatePageCount := TotalPageCount;
    and in the Main report Ive declared the formula variable as,
    formula name=subIntRatePageCount
    Shared NumberVar subIntRatePageCount;
    subIntRatePageCount;
    I want the value assigned to "subIntRatePageCount" in my Sub-Report to be available to my Main report.
    The problem I am trying to solve is that the sub-report is spilling over onto two pages, and I need a way of updating the page display on the main report to reflect this. The page display is of format, "displaying page 1 of  3", but its not taking into account the extra page produced by the sub-report, so it should say "displaying page 1 of 4".

    Also thanks Raghavendra, Asha,
    I've tried adding the "whileprintingrecords" statement but that doesnt seem to make any difference.
    I notice that the subReport is being called from my the GroupFooter section of the main report, and I am trying to reference the variable in the main repot in the Page Footer section. Could it be that the variable hasnt been calculated in the Page Footer by the time I calculate it in sub-Report? I thought Crystal Reports does at least 5 passes over the report evaluating all the formulas before it prints the report?
    The problem Im trying to solve is I need to know how many pages my report will have before its completed, so that i can print the statement "displaying page 1 of X", and X is currently not being calculated correctly because the sub-report is printing onto 2 pages and not 1 so the report thinks I have 1 of X pages and not X+1.
    Regards
    Robert.

  • Passing Multivalued parameter to sub report in SSRS

    Hi Team,
    I tried passing multi valued parameter to sub report in SSRS but the report is blank.
    Rgds,
    Shree

    Hi Shree,
    As per my understanding, the issue is caused by the multiple-value parameters are not passed from the main report to the subreport correctly. Please refer to the steps below to check whether you configure the subreport parameter settings correctly:
    Drag a Subreport control from toolbox to design surface.
    Right-click the Subreport to open the Subreport Properties dialog box, then select the correct report as subreport.
    Click Parameters in the left pane.
    Add parameters as below (Parameter1 is a single-value parameter, Parameter2 is a multi-value parameter in subreport ):
    Name: Parameter1              Value: [@ReportParameter1]
    Name: Parameter2              Value: =Split(join(Parameters!ReportParameter2.Value,","),",")
    Please also directly select or type the same values in subreport to check whether the subreport works well with those parameter values.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Pass parameter from main report to sub report?

    Post Author: nomore
    CA Forum: General
    I have a report which is comparing turnover from present year to previous year.Im trying to make it dynamic - so i have added a parameter to the main report to allow user to enter a year, however I cannot work out how to pass this to the sub report so select records based on this. I have passed the data thruogh a fomula ok (WhilePrintingRecords; Shared NumberVar shYear;)  and that is working spot on.Now i just need to enter that number as a record select paremeter. Also if I try to perform a summary on this field (it never changes, but its just a test) - the 'Insert Summary' option is unavailable, and it doesnt show up as a formula in formula editor.  

    Post Author: V361
    CA Forum: General
    I have CR XI, you want to edit your subreport links, right click the sub, select Change subreport links, you should be able to select your field, and see your parameter listed.  Once you set up the link the sub will run based on whatever link you picked.

  • Passing database command parameter to sub-report

    I'm trying to pass a runtime parameter from a main report to a database command parameter in a sub-report, and having some trouble.
    My main report has parameter fields (Vendor, Manufacturer, etc) that the user selects at runtime - the result set includes Item Code - that part is working fine.  Where I'm having trouble is with linking to the sub-report.  My sub-report has a stored command that takes a parameter (ItemCode) and counts the number of times it's shown up on an invoice.  When I created the command, it asked for a value for the parameter, and won't accept a blank entry.  Now, whenever I try to run the main report, it asks for the ItemCode parameter for the sub-report - which kind of defeats the purpose.  I've tried linking from ?Pm-OITM.ItemCode in the main report, but the Subreport Links window doesn't show the Command parameter to link to.
    How do I take a field from the main report and pass it to a sub-report to be used as a parameter in a stored database command? 
    I'm running CR 2008, and SAP B1 2007 PL 42 on MS SQL 2005, and I'm still pretty new at CR, so details help.
    Thanks.

    Go to change subreport links and add Item Code from main report and then you can see the sureport stored procedure parameter in the Subreport parameters list, select the parameter and do not select any field from subreport.
    You will be able to see the stored procedure parameter in the list only when the Item Code and the parameter are of same data type.
    Regards,
    Raghavendra

  • How to pass the value from sub report to sub report

    how i want get one value from sub report to sub report..
    can i do this one...
    how can get the value.
    i know main report to sub report
    i tried that way but
    value is  0.00 is comming
    Any reasons.

    Hi Try this.
    Create a formula like this in subreport1 (from the report where you want to pass your value)
    Whileprintingrecrods;
    Shared Numbervar x :={subreport1Value};
    Then go to 2nd sub report and Create a formula like this
    Whileprintingrecrods;
    Shared Numbervar x ;
    Note :Your sub report1 should execute before sub report2 .That means sub report1 should be in the above section of sub report2

  • Pass a value from a sub report back to a main report

    This may not be possible but i though i would see if i had any options.
    I have a main report with sales data and a sub report with budget data in the footer. Neither are linked to each other as i do not have a common field.
    I was hoping to bring a value through from the sub report to the main report or vice versa for a calculation. Its just one calc to work out the percent of sales against budget. sales/budget total.
    stuck!
    Any help would be appreciated.

    Thanks for the reply but this has not worked.
    I created a formula field on the main report HEADER @myValue with:
    Whileprintingrecords;
    Shared numbervar myValue:=0;
    Then I created a formula field in the sub report @myValue with:
    Whileprintingrecords;
    Shared numbervar myValue;
    myValue:= {@Budget-Month};
    @budget-month being the field i want to pass through to the main report.
    I placed this formula in the same section as the @budget-month formula field which is in the report footer
    Then i created a formula field @AVG, added it to a new section below the current fields and used the below
    Whileprintingrecords;
    Shared numbervar myValue;
    //calculation using MyValue
    {@myValue}/{@Sales Total}
    I get an error with the @myValue part in this formula "a number or currency amount is required here"
    I did have to change the Shared number from your formula to shared numbervar as number was not accepted. Does that matter?

  • How to pass a 'one of' parameter value to a sub-report

    I'm using CRXI.
    If I have a parameter which is a 'one of', what are my options for passing the values of that parameter to a subreport?
    Specifically I would like to know:
    Is this a good solution: convert the 'one of' parameter to multiple formulas(one forumula for each of the possible values), and then link the subreport to the main report on each of those values?

    Thanks for responding, but I dont think you understood my question.
    Let me ask the question again a little differently, here are my assumptions, maybe they are incorrect.
    1. Parameters are passed to sub reprots by setting the parameter equal to a forumla, and then linking the sub report to main report through the formula.
    2. If the Parameter is a 'one of' (ie can be multiple values), it can only be set equal to a forumula if you make the forumula an array.
    3. You cant link a sub report to a main report on two formulas which are arrays.
    4.Therefore how do you handle this situation?

  • Passing Parameters to Procedure based sub report thru JRC

    Hi
    I am using storedprocedure based main report with a subreport and i am trying to invoke these reports with JRC.
    I am passing parameters to main report then it is asking parameters for subreport then i placed following statement by placing subreport name
    param2.setReportName("detailed_aging_report_wk.rpt");
    but after using this statement it is prompting for main report parameters.
    How i can pass the same parameter values to both main and sub reports?
    Thankyou.

    Here is a snippet code that demonstrates how to pass a parameter to a subreport, you can accommodate it and test it and see if you still have the same behaviour. What you need to do is to add the code to set the parameter of the main report.
    <%
    /* Applies to: XI
    * Date Created: April 4, 2005
    * Description:     This sample demonstrates how to pass parameters to a report that
    *                    contains a subreport using the Crystal Reports Java
    *                    Reporting Component (JRC) SDK.        
    * Author: HP, CW
    try {
         //check to see if the report source already exists
         Object reportSource = session.getAttribute("reportSource");
         //if the report source has not been opened
         if (reportSource == null)
              //---------- Create a ReportClientDocument -------------
              ReportClientDocument oReportClientDocument = new ReportClientDocument();
              //---------- Set the path to the location of the report soruce -------------
              //Open report.
              oReportClientDocument.open("jrc_set_subreport_parameters/jrc_set_subreport_parameters.rpt", 0);
              //Get the report source
              reportSource = oReportClientDocument.getReportSource();
              //Cache report source. 
              //This will be used by the viewer to display the desired report.
              session.setAttribute("reportSource", reportSource);
         //---------- Create the Parameter Field Objects -------------
        //Create a Fields collection object to store the parameter fields in.
        Fields oFields = new Fields();
        //----------- Initialize the parameter fields ----------
        //Set the name and value for each parameter field that is added.
        //Values for parameter fields are represented by a ParameterFieldDiscreteValue
        //or ParameterFieldRangeValue object.
        //NOTE: Be sure to map the names of the parameters and their
        //respective types against the correct type that the parameter
        //field values was defined to accept in Crystal Reports.
        //NUMBER VALUE PARAMETER. 
        Integer numberValue = new Integer("55");
        //STRING VALUE PARAMETER.
        String stringValue = "String parameter value.";
        //BOOLEAN VALUE PARAMETER.
        Boolean booleanValue = new Boolean("true");
        //DATE VALUE PARAMETER.
        Calendar calendar = Calendar.getInstance();
        calendar.set(2004, 1, 17);
        Date dateParamVal = calendar.getTime();
        //DATE-TIME VALUE PARAMETER.
        Calendar calendar2 = Calendar.getInstance();
        calendar2.set(2002, 5, 12, 8, 23, 15);
        Date dateTimeParamVal = calendar2.getTime();
        //CURRENCY VALUE PARAMETER.
        Double currParamVal = new Double(555.99);
        //TIME VALUE PARAMETER.
        Calendar calendar3 = Calendar.getInstance();
        calendar3.set(2002, 5, 12, 13, 44, 59);
        Date timeParamVal = calendar3.getTime();
        //Set all of the parameter values using the utility function.
         //Since we are passing parameters to the subreport, it is here that we set the
         //subreport name; if you are not passing a parameters to a subreport, the
         //report name will be an empty string
         setDiscreteParameterValue(oFields, "NumberParam", "SubreportA", numberValue);
        setDiscreteParameterValue(oFields, "StringParam", "SubreportA", stringValue);
        setDiscreteParameterValue(oFields, "BooleanParam", "SubreportA", booleanValue);
        setDiscreteParameterValue(oFields, "DateParam", "SubreportA", dateParamVal);
        setDiscreteParameterValue(oFields, "DateTimeParam", "SubreportA", dateTimeParamVal);
        setDiscreteParameterValue(oFields, "CurrencyParam", "SubreportA", currParamVal);
        setDiscreteParameterValue(oFields, "TimeParam", "SubreportA", timeParamVal);
        //Push Fields collection into session so it can be retrieved by the viewer and set
        //at view time.
        session.setAttribute("parameterFields", oFields); 
         //Redirect to the viewer page to render the report
         response.sendRedirect("CrystalReportViewer.jsp");
    catch(ReportSDKException sdkEx) {
         out.println(sdkEx);
    %>
    <%!
    * Utility function to set values for the discrete parameters in the report.  The report parameter value is set
    * and added to the Fields collection, which can then be passed to the viewer so that the user is not prompted
    * for parameter values. 
    private void setDiscreteParameterValue(Fields oFields, String paramName, String reportName, Object value) {
         //Create a ParameterField object for each field that you wish to set. 
        ParameterField oParameterField = new ParameterField();
        //You must set the report name.
        //Set the report name to an empty string if your report does not contain a
        //subreport; otherwise, the report name will be the name of the subreport
        oParameterField.setReportName(reportName);
        //Create a Values object and a ParameterFieldDiscreteValue object for each
        //object for each parameter field you wish to set.
        //If a ranged value is being set, a ParameterFieldRangeValue object should
        //be used instead of the discrete value object.
        Values oValues = new Values();
        ParameterFieldDiscreteValue oParameterFieldDiscreteValue = new ParameterFieldDiscreteValue();
        //Set the name of the parameter.  This must match the name of the parameter as defined in the
        //report.
        oParameterField.setName(paramName);
        oParameterFieldDiscreteValue.setValue(value);
        //Add the parameter field values to the Values collection object.
        oValues.add(oParameterFieldDiscreteValue);
        //Set the current Values collection for each parameter field.
        oParameterField.setCurrentValues(oValues);
        //Add parameter field to the Fields collection.  This object is then passed to the
        //viewer as the collection of parameter fields values set.
        oFields.add(oParameterField);
    %>
    Cheers

Maybe you are looking for

  • Insert hyperlink in Pages goes back to Apple

    I have been cutting and paste an URL in the hyperlink tool. I see that www.apple.com is at end of UR:L adress and remove it. However the link always shows up as Apple.com. I do not have this problem with other word processing apps. I want to use Page

  • Oracle 9i rac windows 2003 server

    Hai, I am planning to do oracle 9i rac windows 2003 server(enterprise edition service pack 2) installion. All the pre-requiste has been completed. At the time of running clustersetup.exe , it is exiting without showing an error. The event veiwer is h

  • Trying to update hidden attibute in AD computer objects.

    I am trying to update my AD computers using PowerShell to read the items from a CSV file. I have successfully updated the Description and other standard items, but I cannot get the non-common hidden attributes to updated. I am very green on PowerShel

  • What is the latest utility for AirPort Extreme?

    Trying to set up AirPort Extreme for a PC; what is the latest version of the utility?

  • Calendar items not being created with sync

    I seem to have calendar items that don't sync properly or at all when I sync the computer calendar program with the phone.  Any thoughts on the problem? Post relates to: Centro (Verizon)