Passing value to internal parameter of subreport

I have a report which contains a subreport. That subreport has 2 regular parameters and 1 internal parameter (which has default value).
From what I've read ( http://msdn.microsoft.com/en-us/library/aa337490(v=sql.90).aspx ) I understand that there's no need to pass a value from the parent report to the subreport
for internal parameters.
All runs fine in VS (2005) and also fine after deploying to SSRS 2005. But when I deploy to SSRS 2008R2, I get "error subreport could not be shown" for that subreport.
If I do pass that internal report (it DOES show in the chooslist from the parent report) then I get error "error subreport could not be shown" both in VS and in the reporting site. So I can't find any way to display it in SSRS 2008.
Your advice appreciated.
Namnami

The report doesn't know whether it is a report or subreport. In either case, it takes the input and generates an output using the same settings and formulae. If you get a different output when it is run as a subreport, it is because the input is different.
So I suggest that you display each parameter value of your subreport (or at least those that are passed in by your main report) in a set of text boxes added to the top of the report. Run the report by itself in SSRS 2008 and record the values
that the report is consuming. Now in the main report, do the same. Display the value of each parameter that you are passing to the subreport in a text box. Look for differences. Remember to display multivalue parameter values in a text box, you will need
to convert them to a string using Join: =Join(Parameters!Multi.Value,",").

Similar Messages

  • How do we pass values and Internal tables to Sub-routines

    how do we pass values and Internal tables to Sub-routines

    Hi,
    You can use the USING..or TABLES..or Changing addition..
    Check this example.
    DATA: T_MARA TYPE STANDARD TABLE OF MARA.
    PERFORM DISPLAY USING T_MARA.
    FORM DISPLAY USING LT_MARA LIKE T_MARA.
    DATA: WA TYPE MARA.
    LOOP AT LT_MARA INTO WA.
      WRITE: / WA-MATNR.
    ENDLOOP.
    ENDFORM.
    Thanks
    Naren

  • Need to pass values to Internal table in Web dynpro ABAP

    Hi all,
    I need to pass table values for the below FM in web dynpro.
    CALL FUNCTION 'ZFMHR_RWF'
      TABLES
        PB0006        = 
    How do we declare and use Internal tables in WEBDYnpro.
    Regards,
    Vijayakumar S.

    hi,
    u mighnt need to show the internal table value in some table UI in the WebDynpro ABAP. So u can use the method bind_table for the same to bind ur context node with the internal table values.u can declare the internal table in the same  way as u do in the normal ABAP.
      DATA :itab TYPE STANDARD TABLE OF ztable.
    // itab is my internal table which can be of either ztable or standard table type
    now u can use the code wizrd(control+F7) and use the method bind_table .
      DATA: lo_nd_cn_node TYPE REF TO if_wd_context_node,
                lo_el_cn_node   TYPE REF TO if_wd_context_element,
               ls_cn_node        TYPE wd_this->element_cn_node.
    *     navigate from <CONTEXT> to <CN_NODE> via lead selection
      lo_nd_cn_node = wd_context->get_child_node(
      name = wd_this->wdctx_cn_node ).
      lo_nd_cn_node->bind_table( itab ).
    // where cn_node is the context node which is bind to ur table UI and itab is the value which is populated from ur FM
    regards,
    Amit

  • How to catch BCD_OVERFLOW error when passing value to formal parameter?

    Hi,
    catching runtime error BCD_OVERFLOW exception is simple. However, it's not possible to catch this error directly, if it results from assigning too big value to the formal parameter.
    Let's assume simple code with local class lcl_calculator implementing functional method add with two input parameters i_op1 and i_op2 both of type i and result value r_result of type i as well.
    The following code dumps, without the exception being caught:
    DATA:
       lo_calculator TYPE REF TO lcl_calculator,
       l_result TYPE i.
    START-OF-SELECTION.
       TRY.
           CREATE OBJECT lo_calculator.
           l_result = lo_calculator->add(
             i_op1 = 10000000000
             i_op2 = 1 ).
           WRITE:/ l_result.
         CATCH cx_sy_conversion_overflow.
           WRITE:/ 'Error'.
       ENDTRY.
    To solve this, the workaround has to be implemented with checking the values being passed to the method before the actual call is made:
    DATA:
       lo_calculator TYPE REF TO lcl_calculator,
       l_result TYPE i,
       l_op1 TYPE i,
       l_op2 TYPE i.
    START-OF-SELECTION.
       TRY.
           l_op1 = 10000000000.
           l_op2 = 1.      
           CREATE OBJECT lo_calculator.
           l_result = lo_calculator->add(
             i_op1 = l_op1
             i_op2 = l_op2 ).
           WRITE:/ l_result.
         CATCH cx_sy_conversion_overflow.
           WRITE:/ 'Error'.
       ENDTRY.
    It's the same with the function module call, so it's general unit interface issue. Also, using the exception handling related to the CALL METHOD command does not help here as it's not wrong parameter TYPING which causes the error. It's the VALUE of correctly typed parameter that causes the error.
    The CATCH apparently reacts different ways when the assignment is made to the variable and to the formal parameter of the unit. Any idea how to solve the above without using that workaround?
    Thank you
    Michal

    What about using numeric?
    CLASS lcl_calculator DEFINITION.
       PUBLIC SECTION.
         METHODS add IMPORTING i_op1 TYPE numeric i_op2 TYPE numeric RETURNING value(r_sum) TYPE i
                      RAISING cx_sy_conversion_overflow.
    ENDCLASS.                    "lcl_calculator DEFINITION
    CLASS lcl_calculator IMPLEMENTATION.
       METHOD add.
         TRY.
             r_sum = i_op1 + i_op2.
           CATCH cx_sy_arithmetic_overflow.
             RAISE EXCEPTION TYPE cx_sy_conversion_overflow.
         ENDTRY.
       ENDMETHOD.                    "add
    ENDCLASS.                    "lcl_calculator IMPLEMENTATION
    DATA:
        lo_calculator TYPE REF TO lcl_calculator,
        l_result TYPE i.
    START-OF-SELECTION.
       TRY.
           CREATE OBJECT lo_calculator.
           l_result = lo_calculator->add(
             i_op1 = 10000000000
             i_op2 = 1 ).
           WRITE:/ l_result.
         CATCH cx_sy_conversion_overflow.
           WRITE:/ 'Error'.
       ENDTRY.

  • Passing value as a parameter in select statement

    Hi,
    Very simple query, how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - Offer
    So I want to pass that value to the select statement.. how do i do it?
    the one below does not work.
    drop table L1;
    create table L1
    (col1 varchar(300) null) ;
    insert into L1 (col1)
    select filter_name from table1 ;
    SET SERVEROUTPUT ON;
    DECLARE
    offer table1.col1%TYPE;
    factor INTEGER := 0;
    CURSOR c1 IS
    SELECT col1 FROM table1;
    BEGIN
    OPEN c1; -- PL/SQL evaluates factor
    LOOP
    FETCH c1 INTO offer;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(offer);
    select * from table1 f where f.filter_name =:offer ;
    factor := factor + 1;
    DBMS_OUTPUT.PUT_LINE(factor);
    END LOOP;
    CLOSE c1;
    END;

    Hi Greg,
    Thanks for the response, No there is no ODB.net involved here.
    If I remove the : from :offer. I get this error now.
    Changed SQL is:
    select * from table1 f where f.filter_name =offer ;
    Error report:
    ORA-06550: line 16, column 23:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 16, column 9:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Passing values to subreport in SSRS throwing an error - Data Retrieval failed for the report, please check the log for more details.

    Hi,
    I have the subreport calling from the main report. The subreport is based on MDX query agianst the SSAS cube. some dimensions in cube has values 0 and 1.
    when I try to pass '0' to the sub report as the parameter value, it gives an error "Data Retrieval failed for the report, please check the log for more details".
    Actually I am using table for storing these parameter values. In the main report I am calling this table (dataset) and passing these values to subreport.
    so I have given like [0],[1] and this works fine. when I give only either [0] or [1] then it is throwing an error.
    Could you please advise on this.
    Appreciate all and any help.
    Thanks,
    Divya

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • SSRS How to pass a value for Hidden parameter ?

    Hello,
    I have a SSRS report deployed on the Report server. This report is having an "Hidden" parameter.
    Could someone please guide me, how to pass the value to this internal parameter in each of the following case - 
    1. Report is accessed through a Desktop application/Web application in Report Viewer.
    2. Report is accessed through the Url.
    3. Report is accessed through the Report Manager.
    Any quick help on this is highly appreciated.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hi Vinay Pugalia,
    Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time and values cannot be passed to this type of parameter (when present in the child report) in case of a drill-through report implementation. This
    type of parameter is read-only and not accessible in parent report.
    This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.
    So no matter you access the report through report manager, URL or Report Viewer. The passing value to the internal parameter will not work.
    As you have mentioned that I will also suggest you use the hidden parameter instead.
    More details information in this blog for your reference:
    SSRS – Understanding Report Parameter Visibility
    How to pass value to  hide parameter is the same as that of the visible parameter, similar thread for your reference:
    Passing the value in action property of a text box
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Passing values to swc in flex

    Hi,
    I got flash .swc file with a symbol converted to flex component. I imported this .swc in flex library path, and I put it on stage like a class:
    var mySwc:swcFile = new swcFile;
    Inside this .swc I got some Actionscript code. I would like to pass a value to the Actionscript inside the swc to change one of its variables dynamically.
    mySwc.myVariable = x;
    But problem is that AS in .swf is processed when constructor is called and before I set myVariable=x. So myVariable is used within this .swf AS with a default value istead of 'x' value.
    Is there any way to pass this argument to the .swc AS before executing it?

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Passing Values to BADI in LUW

    We have a process in SRM where incoming IDOCS are coming in from an external source. In our Z function module the BBP_DOC_CHANGE_BADI is called and we need to pass a value to DOC_CHANGE_BADI to make sure we process only code for this process.
    Options:
    1) EXPORT/IMPORT To Memory ID - Did not work
    2) EXPORT/IMPORT TO INDX - Did not work, we processed 10 idocs at once and memory got lost during 1 update.
    3) Write to Z table in Z FM, and then read table in BADI. Current solution.
    4) Tried to use field symbols  (FM(field1) didnt work.
    Any other ideas?

    Hi Divya,
    Based on the current description, I understand that there is no issue if you pass two values from main report to subreport, while the issue occurs when passing one value to subreport.
    To narrow down the issue, I want to confirm whether the subreport can run if there is only [0] or [1] in the subreport. If so, it indicates the query statements exist error in the subreport. If it’s not the case, this shows the issue occurs during passing
    values from main report to subreport. To make further analysis, please post the details of query statements of the subreport to the forum.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Passing Value Dynamically in a string

    hi All ,
    i have a requirement in which i have to pass value of a parameter dynamically to a string
    e.g.
    param = 10.
    data : txt type string .
    txt = 'value of param'.
    should give a result
    value of 10.
    here i need to have the value 10 of param in the string ,
    how can this be done dynamically
    thanks in advance
    Abhishek

    Hi Abhishek,
    if you know where is the word 'param' in the sentence, you could play with the field symbols.
    Good luck
    Frédéric

  • Changing the value of a parameter that has been passed into an SSRS 2008 R2 report

    I support 200+ reports that all use stored procedures and have many drill downs with built in URLs.
    I want to do the below to avoid creating a brand new parameter that I will have to add to literally hundreds of places.
    We have what I'll call Param1 that receives a value from the user.  That Param1 is passed to the stored procedure(s) for the report and also embedded in any Action URLs for drill downs to other reports from that report.  All works great.
    Now I have a need to concatenate a string to whatever value they supplied which provides context for the environment in which they are running.  The reason I want to do this instead of creating a new parameter is because I need this in all my reports
    and as stated above I would have to make 100s of changes to make that happen.  If I can figure out a way to concatenate a value to the existing Param1 value I can greatly reduce the number of changes.
    I can't seem to be able to find a way to modify the value on an existing parameter that is passed into the report prior to report execution.
    I get an error when I simply try to concatenate something to the parameter in its Default property.
    I can't find a way to update a parameter value in the Report Code block.  There don't appear to be any methods available on the Parameter Collection to set the value of a parameter.
    Any ideas?
    Thanks!
    Nathan 

    Create a new parameter. Mark it internal, set it's value by expression to:
    =User!UserId+"MyNewValue"
    and pass it to the proc?
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

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

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

  • Passing values to subreport that has many records?

    I have a report with a subreport in it and that subreport is a bill that includes things like name, address, etc. My report will run the subreport many times for each bill that comes up.
    I am needing to pass values to text objects in these individual subreports that is information that is obtained in the code. My code works fine when this subreport is ran on it's own but I'm having trouble figuring out how to change the code up to put the information into individual subreports. Here is a simple example of some of my code:
    using (PrintBills reportPrintBills = new PrintBills())
        using (CrystalReportBill reportBill = new CrystalReportBill())
            CrystalDecisions.CrystalReports.Engine.TextObject lblBalanceDue = ((CrystalDecisions.CrystalReports.Engine.TextObject)reportBill.Summary.ReportObjects["lblBalanceDue"]);
            CrystalDecisions.CrystalReports.Engine.TextObject lblName = ((CrystalDecisions.CrystalReports.Engine.TextObject)reportBill.Summary.ReportObjects["lblName"]);
            DataSet ds = new DataSet();
            GetBills(ref ds, "Bills", date);
            DataView dvID = new DataView(ds.Tables["Bills"]);
            num = 0;
            foreach (DataRowView rowID in dvID)
                GetBioInfo(ref ds, "BioData", id);
                DataRow row = ds.Tables["BioData"].Rows[num];
                lblName.Text = row["Stu_Name"].ToString();
                lblBalanceDue.Text = String.Format("{0:C}", row["Amount_Due"]);
                num++;
        reportPrintBills.SetParameterValue("@tblMonth", date);
        reportPrintBills.SetParameterValue("@begdate", strBegdate);
        reportPrintBills.SetParameterValue("@enddate", strEnddate);
        //Export to PDF code here
    reportBill does not display the values obviously. Somehow I need to set that reportBill is a subreport of reportPrintBills in the code so that each record will recognize the TextObject values that I am sending to them.
    Another solution I've tried is adding parameter fields to reportBill and reportPrintBills and linking them up and then passing values like so:
    foreach (DataRowView rowCWID in dvCWID)
        GetBioInfo(ref ds, "BioData", id);
        DataRow row = ds.Tables["BioData"].Rows[num];
        name = row["Stu_Name"].ToString();
        amtDue = String.Format("{0:C}", row["Amount_Due"]);
        reportPrintBills.SetParameterValue("@strName", name);
        reportPrintBills.SetParameterValue("@strAmtDue", amtDue);
        num++;
    But the value stays the same in all of the subreports rather than changing with each pass through.

    Open the report up in the Designer and Click on Edit, Subreport Links. Likely what you can do is use Shared Variables to pass values from the main report to the subreport.
    You need to do this in the report first. If you are using RAS then you can at runtime. If RAS is not available to you then no way in code.
    See these samples:
    Root Page
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessIntelligence%28BusinessObjects%29+Home
    Enterprise Samples (including managed and unmanaged ras)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications
    Non-Enterprise Samples
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    Exporting Samples (RAS)
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Also refer to the DSK help files for the Engine or RAS and search on the subreportcontroller.
    If you are using RAS I'll move your post to the SDK forum.
    Thank you
    Don

  • Passing values to standard screen from  an my internal

    Hi Experts,
    I want to pass values to the mb51 screen from my own internal table.
    in the program for mb51 there is include programLMIGOTV4 where what is use of following
    PBO module before start of LOOP.
    METHOD pbo.
    CALL METHOD super->pbo.
    tv_goitem-lines = lcl_migo_globals=>kernel->s_status-lines.
    ENDMETHOD.
    Also how can see the method Kernel and what is the use of that....
    Also when is the S_Status-lines update in the method Kernel.
    Please help me to understand ASAP.
    Thanks &Regards
    Tejaswini

    hi.
    You can pass values by two ways:
    1. use BDC option CALL TRANSACTION of the transaction MB51. But first you will have to see how it behaves during recording in SHDB.
    2 . Another is use
    SET PARAMETER ID 'MAT' FIELD WA_DATA-MATNR.
    CALL TRANSACTION 'MB51'.
    This would call the transaction with MB51 screen with material number initialised.
    check out   screen 1000 of prog 'RM07DOCS' for parameter id's of different fields.
    WRK- for werks
    LAG-storage location
    CHA for batch and so on.

Maybe you are looking for

  • Workflow to move documents to Record Centre

    Hi, I'm developing a Approval workflow to move documents to a  Record Centre Site on approval. The workflow works fine until I add the If to test if the workflow outcome for the move/archiving of the document was Approved or Rejected. The issue seem

  • User's custom field for metadata entrance

    It would be wonderful if the user could add a series of metadata custom fields. I'm thinking in a situation where you might be photographing for a national museum or an art gallery where you could enter a custom field for the artist's name, date of b

  • Why won't my Apple Earbuds' mic work on my iMac?

    So my USB headset's mic stopped working so I went to get my earbuds to use that mic for now. Plugged it in the headphone jack, chose Line-In input in my sound settings and skype settings, and the mic doesn't work.

  • Slide Shows on TV DVD Players

    I have old family photos, which I've scanned, loaded into PSE8, set dates, and created captions.  I've also organized them into albums.  Now I want to create a DVD slide show that my parents can play on their DVD without using a computer. Seems I nee

  • How to correct the corrupted archive log files?

    Friends, Our restore method is cloning type. today i fired this statement(this is one is usually do for the restore) "recover database until cancel using backup controlfile" i have 60 files in the archive folder. it executs only 50 files when it come