Programmatically adding sub report

Post Author: [email protected]
CA Forum: General
hello friends.
is there a way to programatically or dynamically load sub reports to the main report apart from creating on Demand sub report.
like i habe 10 sub reports like a.rpt, b.rpt, c.rpt
now on the basis of some logic or some programming condition , i would like to load one report at a time to the main report. or two report to main report. or all the three reports to the main report depending on various condition.
is there a way to do it programatically.
if yes, kindly provide some code.
Thanks
Manish

Post Author: synapsevampire
CA Forum: General
Try posting technical information rather than "like I have 10 reports".
Crystal versionDatabase/connectivityExample dataExpected output
Try placing the subreports in their own sections, then use the logic (try posting details...) in the suppression for each section.
If you don't suppress the section the subreport will fire and display.
-k

Similar Messages

  • Is it possible to programmatically replace a Sub Report in a crystal report

    We create crystal reports via the crystal report designer (not in any IDE) , and attach the reports directly to the database via stored procedures. Each report contains a page header and a page footer with patient demographic data. We distribute these reports to our customers and they may edit the templates and alter the page header and page footers specific to their needs.
    We are looking at using sub reports to build a "model" page header and page footer that would be inserted into each template at design time. What we would like to do is allow the customers to create their own sup reports to contain their custom page header / page footer and then programmatically replace the " model" sub reports with the custom sub reports. Please note that these sub reports would not contain any data access and would not be linked to the main report, rather the main report would assign the data that is displayed in the page header/page footer data to shared variables,  and the sub reports would use the shared variables as their data source to display the data.
    Is it possible to programmatically replace 1 sub report with another ? If so are there any code snippets to review -

    Yes it is. Submit your post to which ever SDK you are using into the Developer forums. But search the posts first and look in our samples. This is relatively easy to do.
    Thank you
    Don

  • When 40 subreports are added programmatically to a report the last subreport to be added is shown first while all other reports are in the correct order

    I am loading multiple sub-reports (up to 40) into a master report document using the Crystal SDK. This is accomplished by obtaining a reference to the detail area, adding a section to it, and then importing the subreport into the detail area. The master report does not contain a whereclause and contains no data other than the other sections so it is display only once.
    When I add the section to the master report I give an index of -1 so that it would always appear on the bottom in the report. This works until I print a report containing exactly 40 reports at which time the last section is shown at the top of the report. All other sections (and hence subreports) appear in the correct order. If I print less than 40 reports all sections are in the correct order. If I print more, the export process crashes as documented in Invalid Section Height when I load the nth subreport
    I am using Crystal Reports SDK 13.0.8. Visual Studio 2012. .NET 4.5.2.
    The pertinent bit of code is shown below. What might I be doing incorrectly? Is this a Crystal SDK bug?
    Thanks,
    Ryan
    private ReportDocument AddSubReportToParent(string subReportName, string fileName)
        try
            CrystalDecisions.ReportAppServer.ReportDefModel.ISCRArea headerArea = _crystalDocument.ReportClientDocument.ReportDefController.ReportDefinition.ReportHeaderArea;
            CrystalDecisions.ReportAppServer.ReportDefModel.ISCRArea detailArea = _crystalDocument.ReportClientDocument.ReportDefController.ReportDefinition.DetailArea;
            CrystalDecisions.ReportAppServer.ReportDefModel.ISCRArea footerArea = _crystalDocument.ReportClientDocument.ReportDefController.ReportDefinition.ReportFooterArea;
            CrystalDecisions.ReportAppServer.ReportDefModel.Section section = new CrystalDecisions.ReportAppServer.ReportDefModel.Section();
            // strip dots from name (any character that is not a number or letter causes a name/ID runtime error from the Crystal Reports SDK)
            string sectionName = "Section" + subReportName.Replace(".", "");
            section.Name = sectionName;
            section.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrAreaSectionKindEnum.crAreaSectionKindDetail;
            section.Width = headerArea.Sections[0].Width;
           _crystalDocument.ReportClientDocument.ReportDefController.ReportSectionController.Add(section, detailArea, -1);
            _crystalDocument.ReportClientDocument.SubreportController.ImportSubreport(subReportName, _configSettings.InputPath + "\\" + fileName, section);
            ReportDocument subreport = _crystalDocument.OpenSubreport(subReportName);
            return subreport;
        catch (Exception ex)
            Logger.ErrorException(ex);
            throw;

    Hi Ryan
    The search string 'crystal net 40' (search box in top right corner, returns this KBA:
    2105208 - ER - CR .NET SDK has a Section limit set to 104 and subreport limit of 40
    SP 13 for "SAP Crystal Reports, Developer Version for Visual Studio .NET" can be downloaded here:
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow me on Twitter

  • Programmatically adding chart to a report throws exception

    programmatically adding chart to a report throws exception "chart condition fields are not valid".
    Configuration:
    I am using CR4E to create web application, I've added RAS jars (rasapp.jar, rascore.jar, reporttemplate.jar, serialization.jar) to this web application. For designing reports i am using Crystal Reports 2008.
    Code:
    <%
    // Get the previously opened report from the session.
    ReportClientDocument reportClientDocument =
         (ReportClientDocument)session.getAttribute("ReportClientDocument");
    System.out.println(reportClientDocument.getReportDocument().getName());
    // Try to get the report's DataDefinition object.
    IDataDefinition dataDefinition;
    try
         dataDefinition = reportClientDocument.getDataDefController().getDataDefinition();
    // If the DataDefinition object can not be retrieved, redirect the user to an error page.
    catch (Exception e)
         System.out.println("With error1");
        return;
    // Create a new ChartDefinition object and set its type to ChartType.group.
    ChartDefinition chartDefinition = new ChartDefinition();
    chartDefinition.setChartType(ChartType.group);
    Get the conditional field of the report's first group. Set this conditional
    field for the ChartDefinition object using the setConditonalFields method. Notice
    that the conditional field is first placed in a Fields collection because the
    setConditionalFields method takes a Fields object as an argument.
    Fields conditionFields = new Fields();
    if (!dataDefinition.getGroups().isEmpty())
         IField field = dataDefinition.getGroups().getGroup(0).getConditionField();
         System.out.println("Condition field name ->" + field.getLongName(Locale.ENGLISH));
         conditionFields.addElement(field);
    chartDefinition.setConditionFields(conditionFields);
    //Get the summary field name from the form on the previous page.
    String summaryFieldName = URLDecoder.decode(request.getParameter("summaryField"));
    System.out.println("Summary field name ->" + summaryFieldName);
    Loop through all of the report's summary fields until the one matching the name
    above is found. Set this summary field for the ChartDefinition object using the
    setDataFields method. Notice that the summary field is first placed in a Fields
    collection because the setDataFields method takes a Fields object as an argument.
    Fields dataFields = new Fields();
    for (int i = 0; i < dataDefinition.getSummaryFields().size(); i++)
        IField summaryField = dataDefinition.getSummaryFields().getField(i);
         if (summaryField.getLongName(Locale.ENGLISH).equals(summaryFieldName))
              System.out.println("Adding data field ->" + summaryFieldName);
              dataFields.addElement(summaryField);
    chartDefinition.setDataFields(dataFields);
    Create a new ChartObject to represent the chart that will be added.  Set the
    ChartDefinition property of the ChartObject using the ChartDefinition object created
    above.
    ChartObject chartObject = new ChartObject();
    chartObject.setChartDefinition(chartDefinition);
    Get the chart type, chart placement, and chart title strings from the form on the
    previous page. If no chart title was chosen, create a generic title.
    String chartTypeString = request.getParameter("type");
    String chartPlacementString = request.getParameter("placement");
    String chartTitle = request.getParameter("title");
    System.out.println("chartTypeString ->"+ chartTypeString + "<-chartPlacementString->" + chartPlacementString + "<-chartTitle->"+chartTitle);
    if (chartTitle.equals(""))
         chartTitle = "untitled";
    Create a ChartStyleType object and a AreaSectionKind object based on the
    the chartTypeString and chartPlacementString retrieved above. In this example
    possible chart types are bar chart and pie chart. Possible chart placements
    are header and footer.
    ChartStyleType chartStyleType = ChartStyleType.from_string(chartTypeString);
    AreaSectionKind chartPlacement = AreaSectionKind.from_string(chartPlacementString);
    // Set the chart type, chart placement, and chart title for the chart.
    chartObject.getChartStyle().setType(chartStyleType);
    chartObject.setChartReportArea(chartPlacement);
    chartObject.getChartStyle().getTextOptions().setTitle(chartTitle);
    // Set the width, height, and top for the chart.
    chartObject.setHeight(5000);
    chartObject.setWidth(5000);
    chartObject.setTop(1000);
    Get a ReportDefController object that can be used to modify the report's definition.
    ReportDefController reportDefController;
    try
         reportDefController = reportClientDocument.getReportDefController();
    catch (Exception e)
         System.out.println("With Error2");
         return;
    *Create a Section object that represents the section that will hold the chart.
    If the chart placement was set header, get the header section, otherwise, if the
    chart placement was set to footer, get the footer section.
    Section chartSection = null;
    if (chartPlacement.equals(AreaSectionKind.reportHeader))
         IArea reportHeaderArea =
              reportDefController.getReportDefinition().getReportHeaderArea();
         chartSection = (Section)reportHeaderArea.getSections().getSection(0);
    else if (chartPlacement.equals(AreaSectionKind.reportFooter))
         IArea reportFooterArea =
              reportDefController.getReportDefinition().getReportFooterArea();
         chartSection = (Section)reportFooterArea.getSections().getSection(0);
    Add the chart to the section using the ReportDefController object.
    reportDefController.getReportObjectController().add(chartObject, chartSection, 1);
    // Save the changes and close the report.
    reportClientDocument.save();
    reportClientDocument.close();
    session.removeAttribute("ReportClientDocument");
    %>     
    Trace:
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The chart condition fields are not valid.---- Error code:-2147213287 Error code name:invalidChartObject
         at com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException.throwReportDefControllerException(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.add(Unknown Source)
         at org.apache.jsp.AddChart_jsp._jspService(AddChart_jsp.java:230)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:595)

    Please try this code snippet
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    chart.series.push(cs);
    OR
    var temp:Array = [];
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    temp = chart.series;
    temp.add(cs);
    chart.series = temp;

  • Adding formula in sub report

    Hi,
    I am passing an product_id to subreport database table. I want to use this id in a sql like below and the result name i want to print on the report. How is this possible.
    select NAME from active where id in (select a_id from prod_act where id =@product_id)
    I also have the prod_name from prod_act table on the report.
    Thanks in advance

    Hi
    Create a parameter with ID  in your  main report and In your sub report add command create a parameter and use that in your where clause like in your example.  Now go in main report and right click on sub report and click on change sub report clinks and link your main report parameter with sub report parameter.
    Now it will take your main report parameter value to sub report parameter.
    Tthanks,
    Sastry

  • How to add a sub report at the end of the main report whilst grouped

    Hi!
    I have a main report that is grouped by the Customers name and then details of transactions they did with the company.
    I need to add a letter at the end of each group for each customer (With their name displayed in the letter). I tried adding a sub report in the report footer, but it only appears once at the end of the report, rather than at the end of each group for each customer.
    How can I achieve the desired result?
    Regards
    Vik

    Vik,
    You are on the right track with the sub-report.
    1. Create your letter in a separate report.
    2. Add the Letter Report to your original report as a sub report in the group footer.
    3. Set the report links on the "Group By" field.
    This will give you a letter record for each report record with the same grouping as the main report.
    Hope this helps,
    Jason

  • How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9

    I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the MyReport.rpt there is two subreport name :
    1. MySubReport1
    2. MySubReport2
    My Question is :
    How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
    I try to using command :
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub=oRptOpen.OpenSubreport("MySubReport1")
    oRptSub=oRptOpen.OpenSubreport("MySubReport2")
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    but only show Main Report (view tab name : Preview)?
    Did I miss any command before I call oRptView.ViewReport?

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

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

  • Crystal report - sub report

    Hi everyone
    Can anybody help me with crystal report - sub report problem  as i am new to crystal report.
    I have created two reports"mainreport" and "subreport" using crysta report XI with the same query for both reports using stored procedure. I set the links for both reports at design time and its works fine there. then i added those two reports into my .net application and now i want to set the paramaters and also want to set the datasource  programatically with same query but with two different functions which returns datatable. I am using .visual studio 2008 (.net 3.5) and sql 2005 as back end.
    Any help will be appreciated.
    Thanks In Advance
    Regards,
    Shruti Batra

    Only CR 2008 (12.x) and CR 10.5 (bundles with .NET 2008) is supported with .NET 2008. And while running reports created in CR XI with CR 10.5 may work, you are taking your chances with parameterized reports as there have been a lot of changes in the parameter behavior between CR 10 and CR XI. Thus, my recommendation would be to upgrade to CR 2008, ensuring your version is 12.3.0.601.
    Re. programming questions. Start with sample apps:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    See the [Crystal Reports For Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23&overridelayout=true]. It will apply to CR 2008 and VS 2008.
    See the developer help files;
    https://boc.sdn.sap.com/developer/library
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Struggling with a one to many relationship in a sub-report

    Post Author: Scott_tansley
    CA Forum: General
    I have a database schema as per below: tblENQUIRY                 tblDatasheets                  tblReportParasIRSID (PK)       1 --> &  IRSID (FK)                       UID (PK)Attribute1                     SHEETID (PK)     1 > &  SHEETID (FK)Attribute2                     Attribute1                         LIST_ORDER                         tblStandardParasAttribute3                     Attribute2                         PARA_CODE (FK)    & < 1   CODE     (PK)etc...                            Attribute3                                                                     TEXT                                   etc...
    The PROBLEM I am a Crystal Reports Newbie, and having to work through things bit by bitu2026  I've managed to achieve quite a lot, but I'm totally stuck with this and would appreciate some help. I need to create a report (essentially a letter and some datasheets) around a one-to-many relationship, which I have managed to compile using a main report (for the one &#91;tblENQUIRY&#93;) and sub report (for the many &#91;tblDatasheets&#93;).  Essentially I need a covering letter, then the u2018manyu2019 datasheets, and then a number of other pages (which are largely static text). I have created a main report which includes the covering letter, holds a subreport for the datasheets, and then contains the text for the additional pages.  This all works fine, and I get the correct number of datasheets for each main report. My problem stems from the use of this sub report.  This sub-report needs to hold some attribute values for each datasheet, which is fine.  However, on each datasheet page I need to have some paragraphs, which are held in another one to many relationship.  Each datasheet may have up to six paragraphs held as a code in tblReportParas, with a relationship to the text as held in tblStandardParas. My original thought would have been to embed another sub report, containing the values from tblStandardParas!TEXT, into the first sub report.  However, I have found that it is not possible to have a sub-report inside another sub-report.  I had seperated the first sub-report out from the main report, and then embedded another sub-report into it.  This worked fine until I tried to stitch the sub-report back into the main report (at which point the sub-sub-report dissapeared from view). I have therefore reworked my sub-report a little, and the attribution is now stored in a pageheader, with the tblStandardParas!TEXT in a detail section below it.  This almost works! The only problem is that there is no relationship between the pageheader and detail sections.  To clarify, I would expect to have one datasheet, with the attribution at the top, and then the six paras below.  Then, the same on the next page (assuming there is a second datasheet) for that report.  Instead, I get the correct attribution, but the detail section actually gives every paragraph in the database, no matter which datasheet/or report it related to!  I therefore need to limit the detail section to only show those paragraphs where the SHEETID in tblReportParas is the same as the tblDatasheets SHEETID. Any offers of advice would be appreciated.

    Post Author: Scott_tansley
    CA Forum: General
    I managed to resolve this myself in the end.  I moves the tblEnquiry data into report header/footer sections, this allowed me to add the tblDatasheets information into the details section, which gave me multiple pages - and then finally, the Paragraphs were added through the use of a sub report. 
    There's probably an even better way, but for now it works, it's quick - and so I'm going to go with it!
    Thanks for your interest.

  • AR Invoice Crystal Sub-report Editing

    Hi experts,
    please i need a help on editing AR invoice crystal report  version in SAP business one .
    i want to add some fields to the sub report named summary section.
    For this particular customer he or she wants to see the sum of the individual row VAT and the individual row Freight.
    From the summary section all i see is parameters set but no tables added and parameters set can not be edited.
    Individual Vatsum and freights total (TotalExpns) can be found under table INV6. I added that table but nothing worked.
    attached is the crystal report for customer and i want the table OINV AND INV6 to be added to the summary section. The VatSum and TotalExpns from INV6 to be made in a formula. ADD Vatsum and Totalexpns form INV6. And the value should be based on docentry from the main report.
    we dont want duplicated Total Expns. It should be just one and added to the Sum of Vat.
    Urgent Help will be much appreciated.
    Regards
    Justice

    @Nithi,
    i want ti create a parameter on the subreport that links with the parameter on the main report.
    that is the dockey@ and objectid@.
    so that the values i will pick from the added tables in the subreport will come out based on the main reports  parameters.
    Please experts i need urgent help with my question.

  • Sub-report link doesn't work at run-time

    We have a main report and a sub-report linked to main-report. On clicking the sub-report link in the CR 2008 designer, sub-report page with data is rendered properly. Same doesn't work programmatically at run-time using Java SDK library (JRC). Any thoughts/suggestions?

    Hi,
    I am facing same problem. Please help.
    Thanks,
    Chanchal

  • Hyperlink (Drill-Down) in a Sub-Report

    Hi,
    I have a report in which I am using on-demand sub-report.
    In the Sub-report I added a working Hyperlink to one of the columns to drill-down to transaction details.
    However when I run the report I can't drill from the Sub-report. The hyperlink inside of the Sub-report is not working.
    Is there any work around to make this to work?
    Thank you,
    Tanya.

    Hi Tanya, 
    Let's try breaking this down a little bit more granularly.  I'd like to know what the formulas in the subreport shows and what the main report shows.  It's always a possibility the subreport's formula is returning 0 and passing it properly to the main.  So this will show that. 
    1)  The formula in your subreport, just have it do: 
    WhilePrintingRecords;
    shared numberVar Nar_Count;
    Nar_Count:=Count ({Command.YTD_NARRATIVE});
    Show/Unsuppress the subreport's Report Footer so we can see the formula. 
    2)  Leave the formula in the main reports GF1 as: 
    WhilePrintingRecords;
    shared numberVar Nar_Count;
    Do you see a number in both formulas or do you see the number in the subreport but not the main report? 
    I want to see if the formula in the subreport is working and not just returning 0. 
    If the formula in the subreport works then I want to know what the formula in the main report is showing. 
    If this does work:
    1)  Change the formula in the subreport back to: 
    WhilePrintingRecords;
    shared numberVar Nar_Count;
    Nar_Count:=Count ({Command.YTD_NARRATIVE})+Count ({Command.PTD_NARRATIVE})
    2)  Leave the formula in the main report's GF1 as: 
    WhilePrintingRecords;
    shared numberVar Nar_Count;
    Again, what do you see in the subreport and the main report? 
    Good luck,
    Brian

  • Stored Procedure in Crysral Sub Reports

    Hi
    I am using Crystal XI with an ODBC connection to an Oracle database.
    We had a sub report that used a view as it's data source. We needed to change that report to use a stored procedure with an input parameter.
    When I changed the report to use the stored procedure as the data source, I never get prompted for the input parameter.
    To make sure the stored procedure worked, I created a new report, selected the stored procedure and got prompted for the parameter which then was under the parameter fields in the field explorer.
    Why doesn't that happen on the report I am trying to modify.
    Roseanne

    I have a parameter in the sub-links but it doesnt look like it passess anything to the stored procedure.
    This is why I was questioning why I dont get prompted for a paramter when I added the stored procedure as my data source.

  • Pass parameter from main report to sub report?

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

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

Maybe you are looking for

  • Mac Mini and Final Cut Pro

    Hi there, I wanted to see if anyone out here had a good or very bad experience working with FCP on the newest model Mac Mini, and more so, if it is possible to use the HDMI output on the Mac Mini as a video and audio out to a TV while working. Can Pr

  • User's security level issue

    I have an Administrative and a Limited User accounts on my PC. iTunes works fine under the Administrative account, but in Limited User account I get an error everytime I try to change some kind of configuration option at Preference's window (Edit/Pre

  • CPIC error executing SNDDST command

    Hello All! We are using SNDDST command to send messages to user mailboxes for simple notification in a process. These are the steps that I did: - create an external OS command in SM49; - create an entry in WRKDIRE to user R3P02 (user SID+System numbe

  • Weblogic 8.1 SP3 on windows NT workstation 4.0 with SP6

    weblogic 8.1 with SP3 is not getting installed on windows NT workstation. Once the platform813_win32.exe is executed, its successfully unpacking the files, but later it comes with the weblogic white screen, but doesnt proceed further. I dont have pro

  • As Reorder items in Query Panel?

    Good night, use 12c jdeveloper and would like to know how I can sort the items in a query panel. for example: I have the fields in the View Criterial, "id, name, age, gender, telephone", the latter field is a ViewLink to another entity "telefonoView"