Repeating subreports

Post Author: martorell
CA Forum: General
Hi! i have a problem with subreports.i have the main report with a query "select top 2 field1 from table1 ", and a detail section with  the field1.in the next detail section i have a subreport using the query "select top 4 field1 from table2".This subreport fields are not linked. i want that preview show me this:// report begin table1.field1table1.field1 table2.field1 table2.field1 table2.field1 table2.field1  // end of reportbut now is repeating the subreport for each table1 recordtable1.field1table2.field1table2.field1table2.field1table2.field1table1.field1table2.field1table2.field1... Somebody can help me? Thanks! 

Post Author: sharonmtowler
CA Forum: General
you have your subreport linked to the main?  try creating a group and place the sub in the group.

Similar Messages

  • Repeat Group Header on Each Page in Subreport won't reflect when generate by JRC

    Hi All,
    I have a report that contain several Subreports. Inside the Subreport, there are Group Header section. I have checked the option of "Repeat Group Header on Each Page". It works fine when I preview in Crystal Report. But when I using JRC to generate the report result. The group header only display on the first page of the group details.
    More, Crystal 10 Common Monthly Hot Fix (English) already installed.
    Any idea?
    Thanks a lot for your help!
    Donald

    Hi,
    Doesthe JRC engine uses CR10 jars or XI\R2 jars? Can you possibly try it with latest set of Eclipse jars? You can download it from Diamond.
    Thanks
    Aasavari

  • Subreport repeating and supress the new page

    Hi, I make a report with Crystal report and I use a subreport.
    This subreport is repeating some information. Why when a subreport is repeating something it begin on a new page.
    I subreport which doesn't repeat it's ok but the other.
    It's possible to say that it begin where I will.
    If someone has an idea.
    CR with Visual studio 2008, c#

    It is with the different section make sure that you have checked this option : conserve unity, it's the check box before delete the empty section.
    Try it and I hope this will work.

  • Page Header not repeating on each page of Subreport

    I made a crystal report whose record detail is opening in a subreport. I want to make Page header to be present on each page of my subreport but i am not able to do it. what setting i should apply for that?
    Regards
    Jitendra

    Hi Jitendra,
    You need to create fake page header in subreport.
    For more information, check out this link
    https://boc.sdn.sap.com/node/19833
    Hope this helps.

  • Repeating a group element on each page of a report.

    I have a report where I need to repeat a group element on each page. The element is from the first group in the data. It is in the center group. Currently, the values from this group only print when the group changes. Everything I try does not work. Does anyone have any ideas. I am attaching a sample of the data. Along with the rtf document. I am using the BI Publisher plug in in Word to create the template.
    Data
    <?xml version="1.0" encoding="UTF-8"?>
    <POLLEDTICKETRPT>
    <USERCD>klockhar</USERCD><POLLDATE>03/24/2009</POLLDATE>
    <LIST_CENTER>
    <CENTER>
    <CENTER_CD>0039</CENTER_CD>
    <CENTER_NAME>CROSS PLAINS QUARRY</CENTER_NAME>
    <LIST_TRANSDATE>
    <TRANSDATE>
    <TRANS_DATE>03/11/2009</TRANS_DATE>
    <LIST_CUSTOMER>
    <CUSTOMER>
    <CUSTOMER_NBR>33221477</CUSTOMER_NBR>
    <CUST_NAME>TDOT DISTRICT 32-GALLATIN</CUST_NAME>
    <LIST_JOB>
    <JOB>
    <JOB_CUST>33221477</JOB_CUST>
    <JOB_CUST_NAME>TDOT DISTRICT 32-GALLATIN</JOB_CUST_NAME>
    <RGI_JOB_NBR>2008</RGI_JOB_NBR>
    <QUOTE_ID>0</QUOTE_ID>
    <LIST_COSTCODE>
    <COSTCODE>
    <COSTCODING/>
    <COST_CNTR/>
    <COST_ACCT/>
    <PROJECT_NBR/>
    <PROJECT_TASK/>
    <LIST_TICKET>
    <TICKET>
    <TICKET_NBR>5000021</TICKET_NBR>
    <ORIGIN_CD>TSCC</ORIGIN_CD>
    <REFERENCE_NBR>254510</REFERENCE_NBR>
    <VOID_IND>N</VOID_IND>
    <STATE_CD>TN</STATE_CD>
    <MEASURE_SYSTEM>S</MEASURE_SYSTEM>
    <LOCATION>THANK YOU</LOCATION>
    <PO_NBR>POS-254510-C</PO_NBR>
    <TAX_CODE>4</TAX_CODE>
    <PRODUCT_CD>000003</PRODUCT_CD>
    <HAUL_ZONE_CD/>
    <INVENTORY_STATUS>PR</INVENTORY_STATUS>
    <HAULER_NBR/>
    <RGI_TRANSPORT_CD>FU96</RGI_TRANSPORT_CD>
    <HAUL_RATE> .00</HAUL_RATE>
    <MAT_RATE> 8.50</MAT_RATE>
    <NET_TONS> -7.96</NET_TONS>
    <MAT_SALES_AMT> -67.66</MAT_SALES_AMT>
    <HAUL_AMT>0</HAUL_AMT>
    <TAX_AMT>0</TAX_AMT>
    <SEV_TAX_AMT>0</SEV_TAX_AMT>
    <SEV_TAX_IND>N</SEV_TAX_IND>
    <VALID_NET_TONS> -7.96</VALID_NET_TONS>
    <VALID_SALES_AMT> -67.66</VALID_SALES_AMT>
    <VALID_HAUL_AMT> .00</VALID_HAUL_AMT>
    <VALID_TAX_AMT> .00</VALID_TAX_AMT>
    <VALID_SEV_TAX_AMT> .00</VALID_SEV_TAX_AMT>
    <CASH_TONS> .00</CASH_TONS>
    <CASH_SALES_AMT> .00</CASH_SALES_AMT>
    <CASH_TAX_AMT> .00</CASH_TAX_AMT>
    <CASH_SEVTAX_AMT> .00</CASH_SEVTAX_AMT>
    <CASH_HAUL_AMT> .00</CASH_HAUL_AMT>
    <TRADE_TONS> -7.96</TRADE_TONS>
    <TRADE_SALES_AMT> -67.66</TRADE_SALES_AMT>
    <TRADE_TAX_AMT> .00</TRADE_TAX_AMT>
    <TRADE_SEVTAX_AMT> .00</TRADE_SEVTAX_AMT>
    <TRADE_HAUL_AMT> .00</TRADE_HAUL_AMT>
    <INTRA_TONS> .00</INTRA_TONS>
    <INTRA_SALES_AMT> .00</INTRA_SALES_AMT>
    <INTRA_TAX_AMT> .00</INTRA_TAX_AMT>
    <INTRA_SEVTAX_AMT> .00</INTRA_SEVTAX_AMT>
    <INTRA_HAUL_AMT> .00</INTRA_HAUL_AMT>
    <INTER_TONS> .00</INTER_TONS>
    <INTER_SALES_AMT> .00</INTER_SALES_AMT>
    <INTER_TAX_AMT> .00</INTER_TAX_AMT>
    <INTER_SEVTAX_AMT> .00</INTER_SEVTAX_AMT>
    <INTER_HAUL_AMT> .00</INTER_HAUL_AMT>
    <CASH_PR_TONS> .00</CASH_PR_TONS>
    <CASH_NP_TONS> .00</CASH_NP_TONS>
    <CASH_MI_TONS> .00</CASH_MI_TONS>
    <TRADE_PR_TONS> -7.96</TRADE_PR_TONS>
    <TRADE_NP_TONS> .00</TRADE_NP_TONS>
    <TRADE_MI_TONS> .00</TRADE_MI_TONS>
    <INTER_PR_TONS> .00</INTER_PR_TONS>
    <INTER_NP_TONS> .00</INTER_NP_TONS>
    <INTER_MI_TONS> .00</INTER_MI_TONS>
    <INTRA_PR_TONS> .00</INTRA_PR_TONS>
    <INTRA_NP_TONS> .00</INTRA_NP_TONS>
    <INTRA_MI_TONS> .00</INTRA_MI_TONS>
    </TICKET>
    </LIST_TICKET>
    </COSTCODE>
    </LIST_COSTCODE>
    </JOB>
    </LIST_JOB>
    </CUSTOMER>
    </LIST_CUSTOMER>
    </TRANSDATE>
    RTF Template
    DISPLAY CENTER
    S M
    FOR EACH CENTER
    SET CENTER
    CENTER: CENTER_CD CENTER_NAME
    FOR EACH TRANSDATE
    TRANSACTION DATE: TRANS_DATE
    FOR EACH CUSTOMER
    FOR EACH JOB
    Customer: JOB_CUST JOB_CUST_NAME
    Job: RGI_JOB_NBR Quote Id: QUOTE_ID
    FCC
    group COSTCODE by COSTCODING
    Cost Center: COST_CNTR Cost Acct: COST_ACCT Project: PROJECT_NBR Task: PROJECT_TASK
    Ticket Nbr     ORGCD     OrigTck     V     ST     Location     Po Nbr     Tax Cd     Prod Code     ZN     Hauler      Truck     Haul Rate     UnitPrice     Tons     SalesAmount
    F TCK#M     CODE     OTCK#     V     ST     LOCATION     PO_NBR      TC     PROD     HZ     HAULER     TRUCK     0.00     0.00     0.00 *      0.00 E

    Post Author: Guy
    CA Forum: General
    Hi,
    You should add a first level of grouping in your subreport on a fake formula field with a constant value.  Put your header and footer information in this group header and footer.  In the group option make sure to check the "repeat group header on each page option".
    This group will act as a page header + footer within your subreport.
    good luck!
    Guy

  • Problem With Designing a Report that Contains a Subreport

    Tools:  SQL Server 2012 , Report Builder 3.0
    I am having an issue creating a report that has a tablix with the main set of data all in a group and within a cell of that tablix  I have a subreport that goes based on the previous data within that tablix group.  Problem is, the subreport
    works when it wants to or generates errors that aren't really helpful.
    Error example:
    Exception of type 'Microsoft.ReportingServices.ReportProcessing.ReportProcessing+DataCacheUnavailableException' was thrown.
    An error has occurred during report processing. (rsProcessingAborted)
    I am wondering if there is alternative way to accomplish what I need.
    Report layout:
    SQL Table ID
    Data based on that ID
    Subreport with data from above passed into the parameters.
    repeat for the next table ID within a certain data range.

    Hi redx350,
    According to your description, we can try to refer to the following steps to achieve your requirement:
    Create a parameter named ID in the subreport.
    In the main report, right-click a cell to insert a subreport.
    Right-click the subpeort to open the Subreport Properties, and select the subreport name in the drop-down list.
    In the left panel of the Subreport Properties dialog box, click Parameters.
    Select Name in the drop-down list of ID, and select [ID] in the drop-down list of Value.
    Besides,
    hereis
    a feedback that you can vote for. This is a much better chance of this getting fixed if you log a Connect and vote on it to get it fixed. Microsoft would do take votes into account when
    they prioritize features.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Repeating Header and Footer on each page in Sub-Report

    Post Author: Jimbob
    CA Forum: General
    I am formatting a report that has subreports.  I can get the header on every page, but the footer only appears on the last page. 
    How do I get a header and footer to print on each page of the subreport?
    Thanks for any help!

    Post Author: Guy
    CA Forum: General
    Hi,
    You should add a first level of grouping in your subreport on a fake formula field with a constant value.  Put your header and footer information in this group header and footer.  In the group option make sure to check the "repeat group header on each page option".
    This group will act as a page header + footer within your subreport.
    good luck!
    Guy

  • Repeat Group Header On Each Page not working

    Hi,
    I have a report that have 3 subreport, and in the Subreport, there is Group Headers that enabled the option "Repeat Group Header On Each Page". It works fine in the CR10 preview. However, the header won't repeat in the PDF generated by JRC.
    Any Idea?
    Thanks a lot!!

    Hi,
    Doesthe JRC engine uses CR10 jars or XI\R2 jars? Can you possibly try it with latest set of Eclipse jars? You can download it from Diamond.
    Thanks
    Aasavari

  • How to know how many rows including headers and footers does subreport has from Main Report

    Hi, we are sturuggling with subreports. Main report has 3 subreports, each subreport is inplmented in a group header(3 subreports and 3 group headers). We would like to print a group header under subreport as a column header every page, and need a page break when group number is changed. This report exports a MS Excel(97-2003) report file.
    In main report, [New After Page] is checked under Group Header #1d from [Section Expert]
    In each subreport, [Repeat Group Header On Each Page] is checked under the highest group from [Group Expert]
    Here are two issues;
    Since Crystal Reports has more rows than Excel in one page, colmun header in each subreport is being printed in the middle of the page. It should be printed at the top of the page
    When Subreport has many rows and has to be printed in more than 1 page, a page break is automatically inserted before column header. It should be printed right below column header which is Group Header #1
    We have been trying to pass row counts(count of group header because group header is used as the details) using a shared variable from Subreport 1 to Subreport 2 via main report since Subreport2 cannot predict how many rows Subreport 1 has.
    Here is what we are trying but we are getting an error which is "A constant expression is required here" under main report
    - In Sunreport 1
    whileprintingrecords;
    shared numbervar SubGroupCount := DistinctCount({Table.Field});
    - In Mainreport
    shared numbervar SubGroupCount;
    if(pagenumber) = 1
    then (SubGroupCount)
    else 50
    Is there any solutionss or better ways other than above?
    Thank you,
    Main Report: Group Header #1a --> as Page Header
    Run Date: mm/dd/yyyy                                                                 Report Name
    Main Report Group Header #1b --> Subreport 1
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    Main Report Goup Header #1c --> Subreport 2
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    Main Report Froup Header #1d --> Subreport 3
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6

    Thank you for your reply and sorry for my complicated explanations. The report has confidential information, so I replaced to some fake data but I believe you can still see what I am trying to do..
    Main Report
    Subreport 2
    Output1
    Output2: the following page
         --> more rows are printed..
    We have two problems;
    1. The column header in Output2 is supposed to be pronted right below the last row in Output2, however, a page break is automatically inserted. But even in the same output document, it works for some group when it has a few rows..
    2. Since Crystal Reports prints more rows in one page than MS Excel does, Column header is not be printed at the top of the page.
    I tried the way you advised me but it did not work..

  • How to display sub table and NOT repeat each detail line?

    I am going nuts trying to get this thing to display correctly, so I am someone can help me. I am trying to display a sub table (not subreport - tried that and it doesn't work) for detail records. For Example on an invoice items may have child items.
    I am using Crystal 11
    I have two tables iDetail and iSubDetail
    My detail section looks like this:
    D   iDetail.itemNum                              iDetail.price
               iSubDetail.itemNum
    I have a Left Outer link from iDetail.itemNum  --> iSubDetail.itemNum
    I should see something like this:
    itemOne                  $50.00
         subItemOne
         subItemTwo
         subItemThree
         subItemFour
    itemTwo                $25.00
    itemThree              $30.00
    etc...
    Instead, my Crystal report displays this:
    itemOne                  $50.00
         subItemOne
    itemOne                  $50.00
         subItemTwo
    itemOne                  $50.00
         subItemThree
    itemOne                  $50.00
         subItemFour
    itemTwo                $25.00
    itemThree              $30.00
    etc...
    and of course the total for the invoice is wrong.
    I have tried all the different links and a subreport, but I cannot get it to display correctly. Does anyone have any ideas??

    I tried subreport but I can't figure out how to turn it OFF for non-relative items; from the above example data I would get with a subreport:
    itemOne $50.00
      subItemOne
      subItemTwo
      subItemThree
      subItemFour
    itemTwo $25.00
      subItemOne
      subItemTwo
      subItemThree
      subItemFour
    itemThree $30.00
      subItemOne
      subItemTwo
      subItemThree
      subItemFour
    Looks great for itemOne, but I can't turn it off for itemTwo and itemThree. I have tried hiding the subreport if iDetail.itemNum =
    iSubDetail.itemNumi, but if SubDetail table is accessed it repeats the iDetail record like the original post.
    I tried hiding it in the subreport, but it does not know what the main report record is. I couldn't find anyway to PASS the itemNum from the main report to the subreport. If I could pass it as a variable, I could just hide the subreport when it is NE to iSubDetail.itemNum.
    I kind of got it working by grouping the iDetail record by itemNum. However, the problem with that is when there really is multiple iDetail records, the invoice only shows one!! So, I would still like to find a better solution,
    Thanks for your reply.

  • How to make a common parameter for two subreports in the main report.

    Hi,
    I have a crystal report which has 2 subreports in it. Both the subreports have the same code and I need to create a parameter for Project Cost in both the subreports for filtering the data.
    When i create the same parameter in both the subreports, i see two parameters with same name on my prompt page while refreshing the report. however I just want 1 parameter on my prompt page and data should get filtered in both the reports.
    Can anyone please suggest something, How can I do that? is there a way for sharing same parameter between two subreports?
    Thanks!
    Neha.

    hi Neha,
    here's how to do this:
    1) create a new parameter with the same name on the main report
    2) right click on your first subreport and choose Change Subreport Links
    3) in the Field to Link To list drag over your new main report parameter
    4) open the Subreport Parameter Field to Use select menu and choose your subreport parameter
    5) repeat steps for the 2nd subreport
    now you'll only get prompted once.
    cheers,
    jamie

  • Is it possible to display unrelated info without using a subreport?

    Hi,
    I'm trying to create a report that displays 2 different sets of information without using a subreport. 
    The first section of info (the part I'm having trouble with) is simple displaying the info in the db.  It is just the differnt security settings of the system.
    The second section of info is each users info and their personal security settings.  This part is not a problem and displays correctly.
    How can I get the first section to be displayed at the top of the report without it affecting the second section which uses the group header and details portion of the report?  When I try and put it in the Page header it throws off the second section and causes the information in the details to be repeated multiple times.
    Is it possible to do this without a subreport?  I'm using Crystal Reports 2008.
    Thanks Mike
    Edited by: Mike Swift on Aug 21, 2008 5:35 PM

    Mike
    Have you tried selecting the "Select Distinct Records" box in report options.
    Maybe this has nothing to do with your problem but I thought I would throw that out.
    Good luck

  • Totaling subreport data on each page

    I have 5 subreports linked to the main report all based on Employee ID.  They each pass their data via a shared variable.  The data is being passed to the main report without a problem.  When I try to total each page (one per employee), I am not getting the correct total when there is a blank value for one of the subreports.  If the value should be 0, the subreport is still holding the value from the previous employee, and adding that into the total - even though it is not displaying a total.
    Is there a way to clear the shared variable for each page (employee).  I have tried putting a reset in the page footer, but it doesn't seem to work.  I have also tried putting a reset variable in the header of the subreport - that also didn't work.
    My subreports are currently located in the details section of the main report.  My report total (on each page) is located in the details b section, along with the shared variables that bring the totals from the subs.
    How can I get the shared variables cleared after the totaling of each page?  I'm using Crystal 2008, and I'm stumped!

    Hi Raghavendra,
    I'm not sure I understand about creating a fake group?  I did try to insert a group in the subreport, and selected to have it repeat the group header on each page.  I then put a reset in the group header.  I also suppressed the group header, but it is still not clearing the shared variable in the main report. 
    Did I create the "fake group" correctly?
    The value returned by the sub is correct (I get 0.00 when applicable), but that shared variable in the main report continues to hold the previous value until replaced with a value other than 0.00.
    Thanks in advance for your help!
    Laurie

  • Behavior on subreport totals in the main report

    I have a grouped report which receives two totals from each grouping's subreport via shared variables.  In the main report I show the subreport totals for each group but cannot find a way, in the main report, to add the subreport totals together to become a report grand total.  The running totals feature does not see the returned subreport totals and I cannot find a formulaic way of achieving a grand total.  Has anyone managed this?  Any help is much appreciated.

    Lets step back a moment and see, you got Sub report places in say GF1 section. I suppose this formula of SV in the sub report is placed in the RF of the sub-report right ? what you might have to do is Change the sub report SV to assign it to a Running total...
    The subreport SV is:
    WhilePrintingRecords;
    Shared CurrencyVar
    AmountSpentRunningTot := #RTOTAL0 ({QuoteMaterials.qmmMinimumCharge})
    **You might have to create a separate SharedVariable with some different name, place it in the RF of the SUBreport
    Now I am guessing that this sub report repeats N times..for N number of GF in the main report...you might have to make a manual running total where you capture and add the 'GrandRunningTotal' coming from Sub report in every GF of the main report and then display it in the main report(s) RF...
    hope i made sense...its little complicated to put it out in words...

  • Need help in creating fake headers in subreports

    I read in a previous topic to get page headers on subreports to work in a container report, you have to create 'fake report headers' in the subreports.  I need some guidance with how to do that.  A reply to the previous topic had a URL link to get to some information about it, but that link no longer works.  Any help would be greatly appreciated.

    Hey please follow the steps:
    To create a fake page header for subreports, use the following steps:
    1. In the subreport, create a formula:
    @FakePageHeader
    //name of formula
    WhileReadingRecords;
    2. Go to the 'Insert' menu and click 'Group'. Select the @FakePageHeader formula.
    3. Select the 'Repeat Group Header on Each New Page' option, and click 'OK'.
    This inserts a new group at the lowest, or innermost, grouping level. You will need to move this group to the highest, or outermost, grouping level.
    4. Go to 'Report' menu and click 'Group Expert'. Use the up arrow to move this newest group up to the top of the list.
    5. Move all the headers that you would like repeated into this Header for the @FakePageHeader group.
    Regards,
    Naveen.

Maybe you are looking for