Calling multiple sub-reports based on the values in a column in the main report

All,
Say, I have a main report with 4 parameters and 8 columns in it's tablix, there is 1 column in this main report that can have 3 values, say A,B,C. If the user clicks on "A", he will be directed to Subreport A, clicks on "B", he will be
directed to Subreport B and if he clicks on "C", then he'll be taken to Subreport C. All works fine when I call subreport A and B from that column, because both of them have the 4 parameters that we can map back to the parameters of the main report
in the "Go To Report" section.
Now, for Subreport C, I'll need to map all those 4 parameters + I will also need to map the parameters in my Subreport C to the FIELDS in the main report. Subreport C has 8 parameters, so 4 of them get mapped to the parameters of the main report and
the other 4 get mapped to the fields in the main report.
Now, when I call the Subreport C from my main report, that runs fine, but, I get an error when I try to call my other subreports A and B. The error says "Parameters in the subreport are not defined", probably because it tries to map the fields
in the main report to the non-existing parameters in mu Subreport A and B.
Any ideas/suggestions/workarounds would help a lot. Also, if someone can point me to a link where multiple subreports are being called from the column of a main report would be a great help too.

One simple solution would be to add the additional 4 parameters to subreports A and B. Just don't use them.
I assume you are calling the subrebort using Go to report action property of the tablix cell control. Try switching to Go to URL. Then use expression builder to dynamically create your url:
="http://YourReportServer/Reports/Pages/Reports.aspx?ItemPath=%2fYour%2fReport%2fPath%2fReport"+Fields!Column1.Value+"&Parameter1Name="+Parameters!Param1.Value+"&Parameter2Name="+Parameters!Param2.Value+"&Parameter3Name="+Parameters!Param3.Value+"&Parameter4Name="+Parameters!Param4.Value+IIf(Fields!Column1.Value="C","&Param5="+Fields!F1.Value+""&Param6="+Fields!F2.Value+""&Param7="+Fields!F3.Value+""&Param8="+Fields!F41.Value,"")
Now this is a rather long formula which is why I prefer just adding the other 4 parameters to all of the subreports but this expression opens the report from the url and only when Column1 field is "C" does it also pass the additional 4 parameters.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.

Similar Messages

  • How to fix the value of first column in the JTable in java swing for every

    Hi ,
    I have a swing page that have table panel in which there is a table of size 7x4 now when I click on the perticulat row then that row data will displayin the table like that the selected row become the second column in the new table and the fist column of this table will remain constant for all the entry but the second column update according to the roe which is selected .How it is possible .
    Thanks in Advace,
    anu

    One thing you can do is to prevent the user from editing that column and programatically supply the values of that column yourself.
    JTable table = new JTable() {
       public boolean isCellEditable(int row, int col) {
           if(col == 0) {
              return false;
           return super.isCellEditable(row, col);
    };This allows you to prevent the user from editing the column information so you can supply some sort of a default value for the column always
    ICE

  • Constraint based on existing values for a column in the table

    I have a table as follows
    create table MS_FAV_ACCT
    NICKNAME VARCHAR2(50) not null,
    ACCOUNT VARCHAR2(6) not null,
    SUB_ACCOUNT VARCHAR2(3) not null,
    DETAIL VARCHAR2(4) not null,
    ICID VARCHAR2(3) not null,
    SEGMENT VARCHAR2(2) not null,
    PRIMARY_ACCT VARCHAR2(1) not null
    I want to have a constraint such that there can be only one row with PRIMARY_ACCT ='Y' there could be multiple rows with value 'N'.
    I have put a CHECK constraint on this column to check for values Y or N but I want to be able to check this condition too that only one row can have PRIMARY_ACCT as Y .
    I saw a thread on this forum regarding using UNIQUE INDEX with case when but didnt understand how I could use it in my case.
    Could anyone please help?

    You only want to have 1 row in the table with an identifier of 'Y'?
    That is what i understood, in which case you can use something like this.
    ME_XE?create table MS_FAV_ACCT
      2  (
      3     NICKNAME VARCHAR2(50) not null,
      4     ACCOUNT VARCHAR2(6) not null,
      5     SUB_ACCOUNT VARCHAR2(3) not null,
      6     DETAIL VARCHAR2(4) not null,
      7     ICID VARCHAR2(3) not null,
      8     SEGMENT VARCHAR2(2) not null,
      9     PRIMARY_ACCT VARCHAR2(1) not null
    10  );
    Table created.
    Elapsed: 00:00:00.03
    ME_XE?CREATE UNIQUE INDEX MS_FAV_ACCT_U01 ON MS_FAV_ACCT (CASE WHEN  PRIMARY_ACCT = 'Y' THEN 1 ELSE NULL END);
    Index created.
    Elapsed: 00:00:00.01
    ME_XE?
    ME_XE?INSERT INTO MS_FAV_ACCT VALUES('ONE','TWO', 'U','I','X','A','N');
    1 row created.
    Elapsed: 00:00:00.00
    ME_XE?INSERT INTO MS_FAV_ACCT VALUES('ONE','TWO', 'U','I','X','A','Y');
    1 row created.
    Elapsed: 00:00:00.00
    ME_XE?INSERT INTO MS_FAV_ACCT VALUES('ONE','TWO', 'U','I','X','A','N');
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?INSERT INTO MS_FAV_ACCT VALUES('ONE','TWO', 'U','I','X','A','Y');
    INSERT INTO MS_FAV_ACCT VALUES('ONE','TWO', 'U','I','X','A','Y')
    ERROR at line 1:
    ORA-00001: unique constraint (TFORSYTH.MS_FAV_ACCT_U01) violated

  • Update one column while getting the value in another column

    Is it possible to in one single SQL statement update two columns in a table while at the same time obtaining the value of another column, on the same row, in the same table, and independently (that is, the update of the columns has nothing to do with the data that I want from another column)*?* Of course, I can do this in two operations, one being a "select" and the other one being an "update", but since I am in the same table and even on the same row, is it really necessary to make TWO database calls? That's why I want to combine the the two SQL-statements, for reasons of presumed effiency.

    jsun wrote:
    Is it possible to in one single SQL statement update two columns in a table while at the same time obtaining the value of another column, on the same row, in the same table, and independently (that is, the update of the columns has nothing to do with the data that I want from another column)*?* Of course, I can do this in two operations, one being a "select" and the other one being an "update", but since I am in the same table and even on the same row, is it really necessary to make TWO database calls? That's why I want to combine the the two SQL-statements, for reasons of presumed effiency.Two statements != two database calls.
    At least not in terms of SQL.
    JDBC requires a 'statement' but in SQL (depending on the data source) that can include multiple statements. An obvious example of this is a stored proc but there are other ways as well.

  • How can I get the value of "Warehose" column in a form

    How can I get the value of "Warehouse" column in the form below (I mean what table that contain this value):
    Production Supervisor >> Batches >> (Button) Material Details >> (Button) Line Allocations
    Well, for more clearly! My problem is I must have the Unit Cost of Items, so I've got it in the cm_cmpt_dtl (table), but if I want to, I must create a relation that require 2 filed, they're Item_ID and Whse_Code.
    There's no problem with Item_ID, but Whse_Code seem to be the Mission Impossible (hix, I hate that film!!!!)
    I wonder if It was right to post this topic here. But anyway I just post my question here, hope I could get some help.

    wow, many, many, many.... and many thanks!
    Just add a tiny modify to check out the Batch_type
    doc_id = (select batch_id from gme_batch_header where batch_no='&batch_number' and batch_type = 0)
    Because the batch_no can be duplicated as we also create Batch and Filrm Planned Order.
    Many thanks for your support!
    P/S: Sorry for my terrible English :P

  • Need to supress main report based on shared value comes from subreport

    Hi,
    I have a database that is used in both main report and subreport. On main report I have column a,b ,c, d,e,f to display in detail section, the subreport (column c, g,h etc) is also displayed on detail section, the link between main report and subreport is column a,b and a formula based on the value of c. So the link is within one database, some records link with other records  and display both matching records on one line(especially column c shows one value in main report and another value in subreport). That's why I need subreport and I can display the report correctly.
    Here is my question: if one record in main report couldn't find a match in subreport (subreport is blank), then I would like to show this record; if one record in main report does find a match in subreport, I don't want it to show(need to be supressed). I can define a shared variable to flag whether the subreport is blank or not, but this shared variable has to be placed under the section of subreport in main report and I don't know how to supress the upper detail section with subreport in it.
    Any help would be appreciated!
    Helen

    Hi
    In this case you need to insert the same sub report twise.
    Example :
    Detail a--Insert the sub report and go in sub report suppress all sections and using shared variables bring the value to main report.
    Detail b -- based on detail a sub report suppress the main report records
    Detail c-- Your actual sub report will display the values.
    Note : use the same links for your detail 'a' sub report which you are using for detail 'c' sub report.
    Thanks,
    Sastry

  • How to store the value of sum of group in Crystal Report at the runtime!

    Hello all,
    I creates a Formula Field that hold the value of Sum of Group in Crystal Report. I would like to know how to store it in a variable and pass it to store procedure. Is it an option in Crystal report to do it. I knew that Crystal Report can cache the report for sharing. My detailed issue as following:
    - Created a Formula Field named TOTAL AMOUNT that calculated the complex expression. This TOTAL AMOUNT is dynamic based on group and variables.
    - I would like to store that value from TOTAL AMOUNT and pass it to the stored procedure parameter IN.
    Any helps are much appreciated. Thanks.

    I doubt that this is possible since it would only calculate this value once the report has data.  This sounds more like a report design question that should be asked over [here|SAP Crystal Reports;

  • Count of schema based on the value in a column

    I have to write a query to count the number of schema that have the value in a column as '1' in a table For ex
    I have a table called Vendor in all the schemas(schema1 through 50) I have to look for the value in a column(Benefits) if it 1 or 0 . I need to do the count of the number of schema who have the Benefits turned ON (value '1')
    suppose the value in benefits(col) in Vendor (tbl) for schema1 is 0 than donot count that schema
    and if the value in benefits(col) in Vendor (tbl) for schema2 is 1 than count
    do i connect as a system manager? Do I need a Pl/sql table to put the count in it
    anybody please help.
    TX
    KK

    As I understand from 325537 description, the table VENDOR contains only one row and column BENEFITS_TRACKING is either 0 or 1
    In this case the total can be calculated by simply summing the values of all BENEFITS_TRACKING
    In case VENDOR has more than one row you need some grouping function like SUM or COUNT
    I don't unterstand why you loop through dba_users.
    Im quite sure that you won't find a VENDORS table in the SYSTEM schema. The 'execute immediate' will fail with a table not found exception.
    Another problem in your code is, you will get no_data_found exception when benefits_tracking=0 because of your where condition
    (remove the where-condition or use a grouping function as explained above)
    declare
      v_count      pls_integer := 0;
      v_curr_count pls_integer := 0;
    begin
      for rec in (select owner from all_tables where owner like 'SCHEMA%' and table_name='VENDORS') loop
          execute immediate 'select SUM(BENEFITS_TRACKING) from '||rec.owner||'.VENDORS' into v_curr_count;
    --      execute immediate 'select COUNT(BENEFITS_TRACKING) from '||rec.owner||'.VENDORS where BENEFITS_TRACKING=1' into v_curr_count;
    --      execute immediate 'select BENEFITS_TRACKING from '||rec.owner||'.VENDORS' into v_curr_count;
          v_count := v_count + v_curr_count;
      end loop;
      dbms_output.put_line(v_count);
    end;

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • I am trying to pass the value of a field from the seeded page /oracle/apps/

    I am trying to pass the value of a field from the seeded page /oracle/apps/asn/opportunity/webui/OpptyDetPG. The value I want is in the VO oracle.apps.asn.opportunity.server.OpportunityDetailsVO and the field PartyName.
    I have created a button on the page whose destination URL is
    OA.jsp?OAFunc=XX_CS_SR_QUERY&CustName={#PartyName}
    It opens the correct page, but in the URL it shows this
    http://aa.com:8005/OA_HTML/OA.jsp?OAFunc=XX_CS_SR_QUERY&CustName=&_ti=1897289736&oapc=177&oas=x5E2TIfP1Y0FykBt1ek4ug..
    You can see that &CustName is not getting the proper value. Do I need to do something different?

    You cannot call the form with OA.jsp . This is applicable only for OAF based pages registered as a function.
    For calling a Form, use the below example:
    You have to change the application responsibility key and form function name .
    "form:PN:PN:STANDARD:XXPNTLEASE:QUERY_LEASE_ID={@QueryLeaseNumber}"
    Regards,
    Sudhakar Mani
    http://www.oraclearea51.com

  • Parameter field should pick the values which are there in the value table

    Hi Experts,
    I have a requ. where in a parameter field should pick only the values which are there in the value table for that particular field and should not allow the User to put in any other value.
    The value table is created in the program manually.
    EX:If the value table contains two sales organization VE03 and VE65 then the field shouldn´t allow anyother value other then those two.
    Thanks and Regards,
    Arun

    Try using a listbox.
    report  zrich_0001.
    type-pools: vrm.
    data: ivrm_values type vrm_values.
    data: xvrm_values like line of ivrm_values.
    data: name type vrm_id.
    parameters: p_vkorg(4) type c as listbox visible length 20.
    at selection-screen output.
      name = 'P_VKORG'.
      xvrm_values-key = 'VE03'.
      xvrm_values-text = 'VE03'..
      append xvrm_values to ivrm_values.
      xvrm_values-key = 'VE65'.
      xvrm_values-text = 'VE65'..
      append xvrm_values to ivrm_values.
      call function 'VRM_SET_VALUES'
           exporting
                id     = name
                values = ivrm_values.
    at selection-screen.
      if p_vkorg is initial.
        message e001(00) with 'Please enter a sales org'.
      endif.
    Regards,
    RIch Heilman

  • Get the values from Day 1 of the Month

    Hi Friends,
    I have a requirement in which I have to Get the values from Day 1 of the Month.
    Ex : If I enter 19 - 07 - 2007.......the report should display Values from 01 - 07 - 2007.
    How to Code ?
    Please provide the Code.
    Thank you.

    Hello ,
              Check this code,
    DATA: test_datum1      LIKE sy-datum,
               test_datum2      LIKE sy-datum.
    WHEN 'TEST1'.
              IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range
            WHERE vnam = 'TEST2'.
            test_datum1      = loc_var_range-low.
        CONCATENATE test_datum1(6) '01' INTO  test_datum2.
        CLEAR l_s_range.
        l_s_range-low   = test_datum2.
        l_s_range-high  = test_datum1.
        l_s_range-sign = 'I'.
        l_s_range-opt  = 'BT'.
        APPEND l_s_range TO e_t_range.
    hope it helps,
    assign points if useful

  • How to load the value in target column?

    Hi
    Source: Oracle
    Target: Oracle
    ODI: 11g
    I have an interface which loads the data from source table to target. Some of the columns in the target tables are automatically mapped with source table. Some of the column remain un-mapped. Those who remain un-mapped, I want to load the values in that column by executing an query. So can anybody tell me where I should mention that query whose result would become the value of the specific column.
    -Thanks,
    Shrinivas

    You can put the query (or subquery) into the mapping field.
    You can also call a function in the mapping field which may be easier in your case.

  • K-Bits (1) : Interchange the values of two columns

    Hi Everyone
    I wanted to get started a mechanism of knowledge sharing in the way of a series of threads called “K-Bits” (Knowledge Bits).
    In our day to day work, we learn some new things which can be useful for others. However we hardly get a chance to share it with others.
    Here is the opportunity to share your knowledge in the form of “K-Bits”.
    Here we start with the First Tip of this series.
    You might face a situation where you need to interchange the values of 2 columns in an Oracle database table. 
    E.g. there is a table employee having columns EMPID, FIRST_NAME, LAST_NAME and SALARY. By mistake the values of FIRST_NAME and LAST_NAME have been interchanged. Now you need to bring the data in correct state. 
    You can think about following few options: 
    Option-1_ 
    1.     Alter table employee and add a new column TEMP_NAME to it. 
    2.     Update the values of LAST_NAME to TEMP_NAME. 
    3.     Update the LAST_NAME with the values of FIRST_NAME. 
    4.     Update the FIRST_NAME with the values of TEMP_NAME. 
    5.     Drop the column TEMP_NAME. 
    Option-2 (For Oracle version 9i or higher)_ 
    1.     Alter table employee and rename LAST_NAME column to TEMP_NAME. 
    2.     Alter table employee and rename column FIRST_NAME to LAST_NAME. 
    3.     Alter table employee and rename column TEMP_NAME to FIRST_NAME.
    Probably you can go ahead with any other solution as well. However there is one very simple solution. 
    Option-3_ 
    Let do it by example: 
    DROP TABLE EMPLOYEE; 
    CREATE TBALE EMPLOYEE 
       EMPID             NUMBER 
      ,FIRST_NAME        VARCHAR2(30) 
      ,LAST_NAME         VARCHAR2(30) 
      ,SALARY            NUMBER 
    INSERT INTO EMPLOYEE VALUES (1,'Tendulkar','Sachin', 10000); 
    INSERT INTO EMPLOYEE VALUES (1,'Ganguli','Saurabh', 10000); 
    INSERT INTO EMPLOYEE VALUES (1,'Pathan','Irfan', 10000); 
    INSERT INTO EMPLOYEE VALUES (1,'Khan','Jaheer', 10000); 
    INSERT INTO EMPLOYEE VALUES (1,'Agarkar','Ajit', 10000); 
    INSERT INTO EMPLOYEE VALUES (1,'Dravid','Rahul', 10000); 
    SELECT * 
      FROM EMPLOYEE; 
    UPDATE EMPLOYEE 
       SET FIRST_NAME = LAST_NAME 
          ,LAST_NAME  = FIRST_NAME; 
    SELECT * 
      FROM EMPLOYEE;  The update statement above solves the purpose. Is not it simple? But how does it work?? 
    For any DML (Insert, Update or Delete) oracle internally fires the row level triggers. You can read more about triggers at 
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c18trigs.htm
    and 
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg13trg.htm#431 
    As you know in row level triggers the values of each column is stored in :OLD and :NEW parameters. For the above UPDATE statement oracle stores the old values of FIRAT_NAME and LAST_NAME in :OLD.FIRST_NAME and :OLD.LAST_NAME parameters respectively and then update FIRST_NAME with :OLD.LAST_NAME and LAST_NAME with :OLD.FIRST_NAME. 
    Regards
    Arun Kumar Gupta

    For any DML (Insert, Update or Delete) oracle internally fires the row level triggers.Any pointer to the documentation supporting this ?
    Edited by: Saubhik on Dec 7, 2010 5:58 PM

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • Alter leading of a range of text in a title?

    I thought you were supposed to be able to do this. How do you alter the leading of just two lines of text within a title text box without affecting the leading of all the other lines of text within the text box? I can alter the kerning of a few lines

  • Info about webshop in ERP 4.6C

    Hello, Does any one have usefull info about webshop in ERP 4.6C? Goal is to keep it as basic as possible (sales order entry and kind of product catalog). Many thanks in advance! Ana

  • Development System Backup - Best Practice / Policy for offsite backups

    Hi, I have not found any recommendations from SAP on best practices/recommendations on backing up Development systems offsite and so would appreciate some input on what policies other companies have for backing up Development systems. We continuously

  • Putting my credit card details into the phone

    Well I assume that my details are stored in the phone (just bought my first app) & that being the case do I need some kind of Ani-Virus protection installed ? BTW it was Action Cam from the Nokia store and it seems to do the job quite well, but like

  • HT4528 How do I eliminate the iTunes download from my iPhone 5. I never wanted it.

    Hello! Today I downloaded a program from Apple. I did not know what it would be. It appasrently was related to iTunes. I never use iTunes because I work well over 60 hours a week. I have no time for listening. iTunes has stopped everything on my iPho