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?

Similar Messages

  • 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

  • How to pass column name as a   values from one page  to another

    hi
    i have created a report(pivot) from a table
    SQL> SELECT * FROM T;
    C1  C2          C3 D                SEQ
    A   AA           2                    1
    A   AB           3                    2
    A   AC           2                    3
    B   AB           5                    4
    B   AC           6                    5
    SQL> SELECT C1
      2  ,NVL(MAX(CASE WHEN C2='AA' THEN C3 END),'') AA
      3  ,NVL(MAX(CASE WHEN C2='AB' THEN C3 END),'') AB
      4  ,NVL(MAX(CASE WHEN C2='AC' THEN C3 END),'') AC
      5  ,SUM(C3) FROM T GROUP BY C1;
    C1          AA         AB         AC    SUM(C3)
    A            2          3          2          7
    B                       5          6         11
    SQL>
    my requirement in Apex is like this(reverse)
    eg-
    when i click on cell values '2' then,it should return
    C1  C2          C3 D                SEQ
    A   AA           2                    1
    {quote}how to pass column name as a  values from one page to another
    for example i have to pass 'c2' as a value to next page{quote}for report pivot you can reffer below link
    Report
    Amu

    thanks for your reply
    i 'm doing what exactly you mention here .
    my problem here is
    i have 15 columns
    i am executing a query based on the values of the column(column name)  in the target page
    1)here i am passing(all) the column values to the next page-but  i want to pass only one column values(column name)
    when i click on any cell of that  column
    OR
    2)i can pass all column name to target page -there(in the target page) i can filter out
    i think option 1 would good if you filter out the unwanted columns
    Regards
    Amul

  • How to pass a combo box parameter on reporting services?

    How to pass a combo box parameter on reporting services?
    For example, a report has a parameter which is a combo box, its items came from a database query.
    Looks like the combo box didn't got populated and greyed out if I didn't pass the parameter.

    Hi LAScorpion,
    In Reporting Services, if we want to pass a combo box parameter (means signal-parameter) from one report (main report) to another report (subreport), we can enable an action with “Go to report” or “Go to URL” option to achieve the requirement. For more details,
    please see:
    Method1: Go to report
    Right-click a report item to open the properties dialog in subreport, click Action in the left pane.
    Enable Go to report action, then select the main report name in the drop-down list.
    Add a parameter as below:
    Select ID (a parameter name from main report) in the drop-down list of Name, and select [ID] (a field name from subreport) in the drop-down list of Value.
    Method2: Go to URL
    Right-click a report item to open the properties dialog in subreport, click Action in the left pane.
    Enable Go to URL action, the URL below is for your reference:
    ="javascript:void(window.open('http://server_name/ReportServer/Pages/ReportViewer.aspx?%2ffolder_name%2fmain_report_name&rs:Command=Render&parameter_name="& Parameters!parameter_name.Value &"'))"
    Besides, if the parameter’s values are based on other parameters, then the combo-box got greyed out when we haven’t select values in preceding parameters. For more details, please see:
    Cascading Parameters
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

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

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

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

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

  • How can i copy and referencing the value of a sub-total of a category into another cell?

    How can i copy and referencing the value of a sub-total of a category into another cell?

    Cells in Category  rows 'exist' only when those categories are inserted using the Reorganize table. Those cells cannot be referenced from other cells.
    If you want a category summed, you will need to do that in a cell that is still visible when the table is not sorted into categorie using the Reorganize pane. The function to use is SUMIF. You can find information regarding SUMIF (and SUMIFS) in the iWork Formulas and Functions User Gude. The guide may be downloaded using the link in the Help menu in Numbers '09.
    Regards,
    Barry

  • How to skip from one list to another list in interactive report?

    Hi Friends,
    How to skip from one list to another list in interactive report that means now i am in 7 th list how to skip 4th list ?
    Or  now i am in 7 th list how to skip 9th list ?
    can anybody send sample code please.
    Thanks in advance.

    hi,
    at line-selection.
    case sy-lsind.
    when 9.
    sylsind = 4.
    endcase.
    try like this when u r in 9th list next it goes to 4 th list

  • Passing multiple parameter values to a detail report.  How?

    Help!
    I have a Summary report and a Detail report.
    Summary report has a parameter that may have multiple values (ie returning an array).
    I need to pass these values to the Detail report.
    Anybody has managed to do it?
    Thanks in advance...
    Inga

    Thank you for your reply Sunil...
    The problem is as follows:
    I have a report portlet that has a parameter with multiple values. Ie I would have two status values passed into this Summary report that shows, say total sum for those statuses. I have a link from this report to a detail report, and i need to pass both of these values into the detail report.
    I have tried adding a parameter (p_status_param) in the SQL query that would be a part of link by building it in "PL/SQL after header section" and doing the parameter replace.
    SQL query:
    select
    '<a href="./RTS.RPT_OPEN_CALLS_BY_ASSIGNEE_01.SHOW?p_arg_names=p_assigned_user_id&p_arg_values='||cr.assigned_user_id||''||:p_status_param||'''><font class=portletText1>'||s.user_name||'</font></a>' full_name,
      cr.assigned_user_id,
      count(*) total_calls
    from 
      trts_call_request cr,
      trts_security s
    where
      cr.assigned_user_id = s.user_id
      and cr.current_status_id in :p_status
      and cr.assigned_user_id in :p_assigned_user_id)
    group by
      s.user_name,
      assigned_user_id
    PL/SQL:
    declare
        v_return    varchar2(32767) := '';
    begin
        for i in 1..l_arg_names.count loop
            if l_arg_names(i) = p_reference_path||'.p_status' then
                v_return := v_return || '&p_arg_names=p_status&p_arg_values='||l_arg_values(i);
            end if;
        end loop;
         myats30.wwv_name_value.replace_value(l_arg_names, l_arg_values, 'p_status_param',myats30.wwv_standard_util.string_to_table2(v_return) );
    htp.p(v_return);
    end;
    However, when you run the report, this is what you get (see what the parameter has been replaced with):
    ORA-00907: missing right parenthesis (WWV-11230)
    Failed to parse as RTS - select '<a href=./RTS.RPT_OPEN_CALLS_BY_ASSIGNEE_01.SHOW?p_arg_names=p_assigned_user_id&p_arg_values='||cr.assigned_user_id||''|| ( :zz21, :zz22, :zz23 ) _param||''"><font class=portletText1>'||s.user_name||'</font></a>' full_name, cr.assigned_user_id, count(*) total_calls from trts_call_request cr, trts_security s where cr.assigned_user_id = s.user_id and cr.current_status_id in ( :zz21, :zz22, :zz23 ) and cr.assigned_user_id in :p_assigned_user_id) group by s.user_name, assigned_user_id order by ASSIGNED_USER_ID ASC (WWV-08300)
    Any ideas how I could build this link programatically???
    Thank you...

  • How can pass any one column value

    hi all,
    i have table and i am quering that table like
    select d_type,d_number,d_date,draccount,craccount
    from d_table
    where d_date = :parameter.d_date
    and draccount or craccount = :parameter.code--here user may enter any code which may belongs to draccount or craccount how can check that in my query?Please help me..
    Thanks..

    Hi,
    A slight variation on Tubby's solution:
    select  d_type
    ,     d_number
    ,     d_date
    ,     draccount
    ,     craccount
    from      d_table
    where      d_date           = :parameter.d_date
    and      :parameter.code IN (draccount, craccount)
    user13329002 wrote:hi,
    even i was trying the same. what happen if the parameter value present in both the columns?
    both column's records will be displayed right..What happens when you try it?
    If that's what you want, what's the problem?
    If that's not what you want, what's the problem? Post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.
    Do you want to use the condition :parameter_code = craccount only when the other condition, :parameter_code = draccount, produces no results? If so, use a CASE expression (or the DENSE_RANK function).

  • How to pass file name as parameter into url: or fo:external-graphic src

    Hello gurus,
    In my rtf I want to dynamically get the name of the image file and display the image in the report. If use hard coded image file name it works but if I try to get the name into a variable and pass that variable it is not working.
    Basically my client is having different logos for each operating unit. in the OA_MEDIA directory there are separate logos for each OU. during run time based on OU name we need to display the corresponding image. If I can get this entire path($OA_MEDIA/logo.jpg') in XML field<?CF_OU_LOGO?> then I'm able to print the logo using url:{CF_OU_LOGO}
    But I'm using seeded data source and I cant modify the data source, I need to handle this in RTF only. I could able to get the file name into a variable but not sure how to pass to url.
    could some one help me on this. I tried the following options
    <fo:external-graphic src="url($ln)" />
    url:{$ln} in web etc...
    here 'ln' is the variable which holds '$OA_MEDIA/logo.jpg'. ln is defined as <xsl:variable name="ln" select=".//CF_OPERATING_UNIT" />
    later I set the values as <?xdoxslt:set_variable($_XDOCTX, 'ln',translate( concat('${OA_MEDIA}/','Logo',.//CF_OPERATING_UNIT,'.jpg'),' ',''))?><?xdoxslt:get_variable($_XDOCTX, 'ln')?>
    thanks,
    Vijay

    Vijay
    What version of EBS is the customer running? I read somewhere that in R12 all of the concurrent parameters are passed to the XMLP template. I have not tried this but if true. You could create a conc program parameter that would hold the location of the image. You could either have the user pick the image or maybe derive it from the other parameter choices.
    Lets assume the token name is DLOGO you can reference that in your template.
    <?param:DLOGO?>
    this needs to be at the top of the template. Then where you need to embed the image just reference the value using
    $DLOGO
    You can embed this in the external graphic field
    As I mentioned I have not tested it yet, hopefully its there, if not there are ways around it. Try it first.
    Tim

  • How can I show Search Form parameter values in URI of Results page?

    I have searched through these pages for posts relating to caching but haven't seen any that relate to my issue.
    We run a website that accesses data through search forms and returns matching data to the requester in a results page. The search criteria are entered in a form and the results page is generated by a servlet that gets the search parameter values that the user entered using the GET method.
    I would like rewrite this Search page using JDeveloper to bring our old code up to date and take advantage of new features that should help performance. In particular, I want to utilise the WebCache.
    To use the WebCache effectively, the cache needs to know what the search criteria were when it delivers a page so that repeated requests using the same criteria can be served directly from the cache.
    The data retrieved by a query may change from one search to to the next so I can't use time-based caching. But, I can use the WebCache Invalidation interface from the back-end DB server to flush old data out of the WebCache when it is changed, but to flush out the correct pages I need to know the parameter values passed.
    If I just follow the demos, it seems like the search parameters are all hidden in beans or something which means that the Web Cache can't be used for what I want. The parameter values are important.
    So my question is: is there a way of showing the search parameters used in the URI to the Results page? Can the old GET method of parameter passing be used (or can I somehow just put the old style parameters onto the URI?)
    Alternatively, is there a simple How To or Demo on how to use the Web Caching facility with JSF?
    (ADF Caching and Java Object caching do not seem appropriate for my needs. ADF caching seems to be limited to having fragments cached for fixed periods of time and Java Object caching is orders of magnitude slower and involves the Application Server.)
    Thanks for any advice,
    Andy

    Sorry - should have said I'm using JDev 10.1.3.0.4 with JSF & ADF BC.

  • How to pass Visa Resoure Name parameter to labview dll in labwindows​​/cvi

    Hi, everyone
    I build a dll from labview, the prototype is : double  getchannelpower(double f, uintptr_t *VISAResourceName);
    I don't know how to pass VISAResourceName to this function.How can I get the VISAResourceName of this type(uintptr_t *)?
    Is it related to the paremeter ViPSession in function viOpen(ViSession sesn,ViRsrc rn,ViAccessMode am,ViUInt32 ti,ViPSession vi)?
    BRs,
    lotusky

    1. uintptr_t *VISAResourceName in the labview dll is connected to viOpen function as input parameter internally.
    2.I can call the labview dll in labview via CLF Node, when the VISAResourceName parameter is set  to Numeric(32-bit int or 32-bit usigned int) OR Adapt to data(Handle by Value). And I got the value of the VISAResourceName parameter, which is 0; When I directly connect 0 to the dll, it still works. But in labwindows, when  I pass 0 to the VISAResourceName parameter of the dll function, I got a FATAL RUN-TIME ERROR: The program has caused a 'General Protection' fault.
    mkossmann 已写:
    Could you check what exactly uintptr_t *VISAResourceName in your labview dll does.Might it be that it is connected to the labviews Dll internal ViOpen() ViSession output parameter ?.   And the name VISAResourceName is misleading.
    Another idea would be that Labview uses 32bit Unicode for the ResourceName. And you have to convert the C String to that Unicode first.

  • How to pass refcursor as input parameter to a procedure in a package

    Hi there
    Please can anybody explain me with an small example for
    passing a procedure output(output should be a refcursor) and pass that refcursor values into a procedure in a package as input parameter and this value i want to use as join condition in my procedure ie. ename=refcursor.ename like this).That my exact question is how to pass refcursor values as in parameter
    Pls suggest me with some example statements
    thanks in advance
    prasanth a.s.

    I am giving you a generic example.
    SQL> variable v_out REFCURSOR
    SQL> r
      1  DECLARE
      2  PROCEDURE TEST1(p_out OUT SYS_REFCURSOR) IS
      3  BEGIN
      4  OPEN p_out FOR SELECT EMPNO,ENAME FROM SCOTT.EMP;
      5  END;
      6  PROCEDURE TEST2(p_in IN SYS_REFCURSOR) IS
      7  v_empno NUMBER(10);
      8  v_ename VARCHAR2(30);
      9  BEGIN
    10  LOOP
    11  FETCH p_in INTO v_empno,v_ename;
    12  EXIT WHEN p_in%NOTFOUND;
    13  DBMS_OUTPUT.PUT_LINE(v_ename);
    14  END LOOP;
    15  NULL;
    16  END;
    17  BEGIN
    18     TEST1(:v_out);
    19     TEST2(:v_out);
    20* END;
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    PL/SQL procedure successfully completed.

  • How to pass a multivalue string parameter separated by comma in SSRS

    i m using a parameter @paraBatchid which is a String (eg:test-3,test-4,test-5)
    when i pass only one value it works fine .eg(test-3)
    Now i have to use the values from Excel which will be copy pasted by the user concatenating the values with , and pasted in the textbox for batch Id.
    i have used the join but it does not work for multivalue paramaters for some reason eg: Join(Parameters!paraBATCHID.Value,"','")
    SELECT     RT.INVENTBATCHID, RT.ITEMID, RT.DATAAREAID, RT.GROSSWT, RT.NETMETALWT, RT.NETSTONEWT, RT.NETACCESSORIESWT, RT.DATE,
                          RT.QTY AS BatchQty, II.FILEPATH, CASE ITS.ITEMTYPE WHEN 3 THEN 'Accessories' ELSE RLSUBT.ITEMSUBTYPE END AS ITEMSUBTYPE,
                          RLSUBT.QTY, RLSUBT.QTYPERBATCHQTY, RLSUBT.DUALQTY, RLSUBT.DUALQTYPERBATCHQTY, RLSUBT.UNITID, RLSUBT.DUALUNITID,
                          ITS.DATAAREAID AS Expr1
    FROM         ITEMIMAGES AS II RIGHT OUTER JOIN
                          REGISTRATIONTABLE AS RT INNER JOIN
                          REGISTRATIONLINESUBTYPE AS RLSUBT ON RT.INVENTBATCHID = RLSUBT.INVENTBATCHID AND
                          RT.DATAAREAID = RLSUBT.DATAAREAID RIGHT OUTER JOIN
                          ITEMTYPESETUP AS ITS ON RLSUBT.ITEMSUBTYPE = ITS.ITEMSUBTYPE ON II.ITEMID = RT.ITEMID AND II.MAINIMAGE = 1
    WHERE     (RT.DATAAREAID = @paradataareaid) AND (RT.INVENTBATCHID IN (@parabatchid)) AND (ITS.DATAAREAID = 'vri')
    NOW
    WHERE     (RT.DATAAREAID = @paradataareaid) AND (RT.INVENTBATCHID IN ('test-3','test-4','test-5')) AND (ITS.DATAAREAID = 'vri')
    the above Query Works fine in ..SQL but when these values is given to the parameter textbox in SSRS it does not work..

    Hai
    When you are sending the multi value parameter to the SQL it will be sent as (‘Value1,Value2,Value3’) but not as (‘Value1’,’Value2’,’Value3’) there is the problem for it.
    We have to do this using the dynamic query.
    Here I am providing you the SQL qr=uery can you check it, whether it is the requried one.
    Here is the Query:
    DECLARE @Query    NVARCHAR(4000)
    SET @parabatchid = Char(39) + Replace(@parabatchid,',',Char(39)+','+Char(39)) + Char(39)
    SET @Query = 'SELECT     RT.INVENTBATCHID
                                        , RT.ITEMID
                                        , RT.DATAAREAID
                                        , RT.GROSSWT
                                        , RT.NETMETALWT
                                        , RT.NETSTONEWT
                                        , RT.NETACCESSORIESWT
                                        , RT.DATE
                                        , RT.QTY AS BatchQty
                                        , II.FILEPATH
                                        , CASE ITS.ITEMTYPE WHEN 3 THEN ''Accessories'' ELSE RLSUBT.ITEMSUBTYPE END AS ITEMSUBTYPE
                                        , RLSUBT.QTY
                                        , RLSUBT.QTYPERBATCHQTY
                                        , RLSUBT.DUALQTY
                                        , RLSUBT.DUALQTYPERBATCHQTY
                                        , RLSUBT.UNITID
                                        , RLSUBT.DUALUNITID
                                        , ITS.DATAAREAID AS Expr1
    FROM         PWC_ITEMIMAGES AS II
    RIGHT OUTER JOIN    PWC_REGISTRATIONTABLE AS RT
    INNER JOIN            PWC_REGISTRATIONLINESUBTYPE AS RLSUBT
          ON RT.INVENTBATCHID = RLSUBT.INVENTBATCHID
                AND RT.DATAAREAID = RLSUBT.DATAAREAID
    RIGHT OUTER JOIN      PWC_ITEMTYPESETUP AS ITS
          ON RLSUBT.ITEMSUBTYPE = ITS.ITEMSUBTYPE
          ON II.ITEMID = RT.ITEMID AND II.MAINIMAGE = 1
    WHERE     (RT.DATAAREAID = ' + @paradataareaid + ')
          AND (RT.INVENTBATCHID IN ( '+ @parabatchid + '))
          AND (ITS.DATAAREAID = ''vri'')'
    PRINT 'QUERY : ' + ISNULL(@Query,'NULL')
    Exec (@Query)

Maybe you are looking for