Subreport problem

I have a main report which returns the daily sales (invoices). For every invoice I  have a subreport calculating different taxes for each product. I group the data of subreport based on the different tax value. This creates different groupings of tax values for each invoice. How can I pass these different group values (subtotals for each group) to the main report given that I don't know how many groupings of data there will be? What is the best approach to solve this problem?

<p>Parameters (which is what I suppose you&#39;re using to pass the data down) are a one way data pass through to subreports.  If you are wanting to pass information back up to the main report, you must use Shared Variables.  Please see the docs or the Knowledge Base for more info on how to accomplish that.</p><p>Cheers! </p><p>     - <strong>Kathryn Webster</strong> <em>(Report Design Consultant)</em> <br />           Kat&#39;s News: <a href="/blog/279">http://diamond.businessobjects.com/blog/279</a><br /></p>

Similar Messages

  • Hi a subreport problem here...Some body plz give a soln. to it

    Hi All,
    I want to sort the sub reports in a main report programatically from c#.net.
    I mean we have say 5 sub reports and programatically i want to call the 1st subreport at 4th position, 2nd at the first etc.
    Let me know if i am not clear in making you understand my problem.
    Or tell me how to access the crystal report sections in the c# codebehind.
    I am using vs2010 with crystal reports.
    Thanks
    Madhav
    Edited by: madhavkulkarni on Jul 8, 2011 8:38 AM

    Hey thats great but why am i getting an error for the below mentioned things:
    I tried a sample code of PDFEXPORT_CS, but was not able to debug and check how it works, I am not able to run the solution too.
    For the first time when i opened the solution it gave me an error regarding ObjectFactory, saying
    Error     1     Could not load file or assembly 'CrystalDecisions.ReportAppServer.ObjectFactory, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.     D:\MadhavWorkingFolder\CR.NET SDK\Report Modification\ras_samples\PDFExport\PDFExport_CS\PDFExport_CS\Web.Config     36     
    Later i commented the line of code regarding ObjectFactory as the version did not match and added a reference with the version 13.0.2000.0 and found the below issues:
      // Log on to an Enterprise server.
            SessionMgr sessionMgr = new SessionMgr();
            EnterpriseSession enterpriseSession;
            enterpriseSession = sessionMgr.Logon("Administrator", "password", "localhost:6400", "secEnterprise");
            // Create an instance of the InfoStore Enterprise Service
            EnterpriseService enterpriseService;
            InfoStore infoStore;
            InfoObjects infoObjects;
            InfoObject infoObject;
    I get an error saying:
    Error     1     The type or namespace name 'SessionMgr' could not be found (are you missing a using directive or an assembly reference?)     D:\MadhavWorkingFolder\CR.NET SDK\Report Modification\ras_samples\PDFExport\PDFExport_CS\PDFExport_CS\Default.aspx.cs     132     9     D:\...\PDFExport_CS\
    Regarding the license part, you mean we need not to take any license to RAS .NET SDK?
    Regards,
    Madhav

  • Exporting XI report to RPT with a subreport - problem

    Post Author: gouldjw
    CA Forum: Exporting
    I have several report files that I refresh on a nightly basis using the .Net components.  Most of these work fine, but reports that have a subreport are experiencing a weird issue.  When I export to an RPT file, the main report and the subreport (not on-demand) export fine, but it also adds an additional "view" of the subreport with no data.  When I open the file in Crystal, this appears as an additional "preview" tab of the subreport and when I click on that tab, it asks me to log into the database to retrieve data.  The real problem is, when you open this report in the Crystal XI viewer, it always asks you to log on, presumably to populate this "phantom" view of the subreport, which I don't want to be there anyway.
    Is this some kind of bug in the .Net components?  Is there any way to fix this?  Even if I have to somehow programmatically prevent this from happening, I need some way to get that extra view to go away.
    Thanks.
    --John Gould
    Nashville, TN

    Hi Ludek,
    I trid the SP, but doesn't work. I can send the font to you, it is only 50K. If you would like to try I can send it to you, but i am not sure how i can upload the font file. I guess any none Windows standard font will have same issue, i guess.
    For now, i am going to give up and use image file instead.
    Thanks,
    Lan
    Do you know if it is well-known issue in CR?
    - No I do not.
    where i can get any SP of CR for VS2008?
    https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
    Runtimes for SP1:
    CRRedist2008_ia64.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255262008E/CRRedist2008_ia64.zip
    CRRedist2008_x64.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255272008E/CRRedist2008_x64.zip
    CRRedist2008_x86.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255282008E/CRRedist2008_x86.zip
    I would not mind testing this, but I need to know if there is a free download of this font available. I Googled the font name, but a quick search did not come up with anything.
    Alternatively, you could try CR 2008 (12.x) and see if that will do the trick for you. An Eval of CR 2008 is available here:
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

  • Jasper Report Subreport problems

    Hi!
    Sorry for my English.
    I create a report including a subreport in Ireport
    I compile and run it and it's ok.
    When i create my java class to can print report in my application i have
    this error Error loading object from file : c:\tmp.jasper where tmp.jasper is complied file of my subreport.
    My java code is
    public void print_report(ResultSet tmp_res)
    String xmlFileName =
    "c:\\test.jrxml";
    jasperFileName =
    "c:\\test.jasper";
    JRDataSource jrds = new JRResultSetDataSource(
    tmp_res);
    try {
    JasperCompileManager.compileReport(xmlFileName);
    // JasperCompileManager.compileReportToFile(xmlFileName,
    // jasperFileName);
    catch (JRException ex1)
    System.out.println(ex1.getMessage());
    HashMap map = new HashMap();
    net.sf.jasperreports.engine.JasperPrint print = null;
    try {
    print = JasperFillManager.fillReport(report, map, jrds);
    new JasperPrintManager().printReport(print, true);
    catch (JRException ex) {
    System.out.println(ex.getMessage());
    Can you help me?
    Thanks

    This link will be help full for you.
    You need to set a parameter in java for .jasper path.
    http://forum.java.sun.com/thread.jspa?forumID=38&threadID=670802

  • Jasper Subreports Problem.

    Hello,
    I'm new to Jasper and so far was able to create a datasource and fill a straightforward report and generate the pdf okay. (Web app)
    But as soon as I create a subreport it says error cannot load. I've read through this forum and found that you have to include your files into the Web-Inf/Classes folder. I've done that and now the error I get is:
    Error loading object from URL : file:/C:/eclipse3.1/ewong/workspace/wclc/.deployables/wclc/WEB-INF/classes/subreport.jasper
    The subreport currently has nothing except static text in the title. When I run this in iReports it finds my subreport and displays it in the master report fine. It's when I use java in my web app to do it, I get the error.
    Any suggestions?
    Thanks

    That line:     jp = JasperFillManager.fillReport(repJasper, param, ds);
    And my class is simple:
    //import
    public class Start {
         public void showReport() {
              String rep = "Book_Report.jasper";
              // bean list
              List bookList = getBooks();
              // Stream com o .jasper
              InputStream repJasper = getClass()
                        .getResourceAsStream(rep);
              // The datasource
              JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(
                        bookList);
              // Report Param
              Map param = new HashMap();
              JasperPrint jp = null;
              try {
                   jp = JasperFillManager.fillReport(repJasper, param, ds);
                   JasperViewer viewer = new JasperViewer(jp, true);
                   viewer.setVisible(true);
              } catch (JRException e) {
                   System.out.println(e.getMessage());
         public List getBooks() {
              List bookList = new ArrayList();
              Book b = new Book();
              b.setTitle("Thinking in Java ");
              b.setAuthor(" Bruce Eckel ");          
              bookList.add(b);
              return bookList;
         public static void main(String[] args) {
              new Start().showReport();
    }Book is a simple bean...
    I can?t see what i?m doing wrong...

  • 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

  • Subreport linking problem after upgrading to JRC 2.0

    Here's a little background of my environment before I get to the problem.  We have a suite of reports that were developed with CR4E ~v1.04 in Eclipse 3.3.1.  I only used the plugin for setting up the pojo data sources and then did the report development in the standalone Crystal Reports Designer XI, and would then import the report back into Eclipse.
    This week I installed the new 2.0 runtime jars and also update the eclipse plugin to version 1.07(we aren't in Eclipse 3.4 yet).  We have a few reports with multiple subreports for things such as agent totals, weekly totals etc.  A report layout might look like this.
    Agent 1
         Day1 info
         Day2 info
         Day3 info
         Agent 1 Total  (this would be a subreport)
    Agent 2
         Day1 info
         Day2 info
         Day3 info
         Agent 2 Total   (this would be a subreport)
    After the upgrade, when a report is generated, the subreports only work the first time they appear in the report.  So in the above example, 'Agent 1 Total' would be normal, but 'Agent 2 Total' would have no data.  Any non data related formatting will show up, so the subreport is there, it's just not able to get the right data from the subreport links.  I have verified the data is there both by debugging the services(which haven't changed) and removing the subreport links, thus having all the data show up for each subreport.  The fields that are used to link from the main report to the subreport have the correct value at the time the subreport is used.  I have tried both regular pojo fields and formulas fields to link the subreports, and the problem happens either way.  Please advise.
    Thanks,
    Cameron

    Similar problem from old version to new version(there isn't change in the changeDataSource method..): same report with 1 subreport in old version work well but with new version there is that error:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKParameterFieldException: InternalFormatterException---- Error code:-2147217394 Error code name:missingParameterValueError
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at report.CRJ12.main
    i've use log4j to have better information about the error (that is the first part of the log)
    ERROR [main] (?:?) - Failed to load the resource 'InternalFormatterException' from the bundle java.util.PropertyResourceBundle@1cbf6bb.
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key InternalFormatterException
         at java.util.ResourceBundle.getObject(Unknown Source)
         at java.util.ResourceBundle.getObject(Unknown Source)
         at java.util.ResourceBundle.getString(Unknown Source)
         at com.crystaldecisions.reports.common.CrystalResources.loadString(Unknown Source)
         at com.crystaldecisions.reports.common.CrystalResources.loadMessage(Unknown Source)
         at com.crystaldecisions.reports.common.CrystalResourcesFactory.getLocalizedMessage(Unknown Source)
         at com.crystaldecisions.reports.common.CrystalException.getLocalizedMessage(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at report.CRJ12.main(CRJ12.java:442)
    Edited by: Andrea Bonf on Feb 13, 2009 10:14 AM

  • Problem passing parameter to crystal report subreport from *.aspx page

    Background:
    I am developing a .NET web application using Visual Studio 2005. The code behind is in VB.net. One of my asp.net pages calls a report, which is invoked when the user clicks a Print button. I have developed this report using the Crystal Reports software that is bundled with Visual Studio 2005. I am passing one parameter from the asp.net page (utilizing the VB.net code-behind on the Print button) to the Crystal report. The report consists of a main report and 5 subreports. Both the main report and the subreports use the same parameter. Both the main report and the subreports are bound to stored procedures, each of which require a parameter.
    Problem:
    For some reason, the parameter is not being passed from the asp.net page to the report. I am receiving the following error: "CrystalDecisions.CrystalReports.Engine.ParameterField.CurrentValueException: Missing Parameter Values." However, when I remove the subreports, the parameter gets passed, and the report is invoked with no problem.
    I have read in other forums that there may be an issue with the Crystal Reports software that is causing this problem. I have downloaded and run the suggested hotfix, but the problem remains unresolved. I have tried changing the linking of my main report to the subreport, but that doesn't help either. It is possible that I am doing something wrong with the linking, as this is the first time I have developed a report with Crystal Reports. I need a workaround or definitive solution. Below is the aspx code used to call the report:
    Imports System
    Imports System.Collections.Specialized
    Imports System.Collections.ObjectModel
    Imports System.Collections
    Imports System.Text
    Imports System.Configuration
    Imports System.Data.SqlClient
    Imports System.Data
    Imports System.Data.SqlClient.SqlDataAdapter
    Imports System.Web.Configuration
    Imports Crystaldecisions.crystalreports.engine
    Imports Crystaldecisions.reportsource
    Imports Crystaldecisions.shared
    Partial Class OACIS_Award_or_Deny_BudgetSummary_PrintRpt
    Inherits System.Web.UI.Page
    Dim paramFields As ParameterFieldDefinitions
    Dim paramField As ParameterFieldDefinition
    Dim paramValue As ParameterValues
    Dim paramDiscreteValue As New ParameterDiscreteValue
    Public Shared idCase, nameRpt As String
    Private PrintRpt As ReportDocument
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Try
    idCase = Request.QueryString("id")
    nameRpt = Request.QueryString("prtName")
    Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
    Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
    Dim file As String = settings.File
    Dim dSource, iCatalog, userIs, passUser, appString As String
    dSource = Nothing
    iCatalog = Nothing
    userIs = Nothing
    passUser = Nothing
    appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
    Dim AppArray() As String = Split(appString, ";")
    Dim arrayLgth As Integer = AppArray.Length
    Dim i As Integer
    For i = 0 To arrayLgth - 1
    Dim pairIs() As String = Split(AppArray(i), "=")
    Dim firstItem As String = pairIs(0)
    Dim secondItem As String = pairIs(1)
    If firstItem = "Data Source" Then : dSource = secondItem : End If
    If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
    If firstItem = "UID" Then : userIs = secondItem : End If
    If firstItem = "PWD" Then : passUser = secondItem : End If
    Next
    Dim crReportDocument As ReportDocument
    Dim crExportOptions As ExportOptions
    Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
    Dim crconnectioninfo As ConnectionInfo
    Dim crDatabase As Database
    Dim crtables As Tables
    Dim crtable As Table
    Dim crtablelogoninfo As TableLogOnInfo
    Dim Fname As String
    Dim Prtname As String
    Dim FPath As String
    Dim crSection As Section
    Dim crReportObject As ReportObject
    Dim crSubreportObject As SubreportObject
    Dim subRepDoc As New ReportDocument
    FPath = Server.MapPath("") + "\"
    Dim rptIs As String = nameRpt
    crReportDocument = New ReportDocument
    Prtname = FPath
    Prtname = Prtname + rptIs
    crReportDocument.Load(Prtname)
    Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
    crconnectioninfo = New ConnectionInfo
    crconnectioninfo.ServerName = dSource
    crconnectioninfo.DatabaseName = iCatalog
    crconnectioninfo.UserID = userIs
    crconnectioninfo.Password = passUser
    crDatabase = crReportDocument.Database
    crtables = crDatabase.Tables
    For Each crtable In crtables
    Try
    crtablelogoninfo = crtable.LogOnInfo
    crtablelogoninfo.ConnectionInfo = crconnectioninfo
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.SetDataSource(Prtname)
    crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
    crtablelogoninfo.ConnectionInfo.UserID = userIs
    crtablelogoninfo.ConnectionInfo.Password = passUser
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.Location = iCatalog + ".dbo." + crtable.Name
    Catch ex As Exception
    Response.Write(ex)
    Exit Sub
    End Try
    Next crtable
    For Each crSection In crReportDocument.ReportDefinition.Sections
    For Each crReportObject In crSection.ReportObjects
    If crReportObject.Kind = ReportObjectKind.SubreportObject Then
    crSubreportObject = CType(crReportObject, SubreportObject)
    subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
    For Each crtable In subRepDoc.Database.Tables
    Try
    crtablelogoninfo = crtable.LogOnInfo
    crtablelogoninfo.ConnectionInfo = crconnectioninfo
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.SetDataSource(Prtname)
    crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
    crtablelogoninfo.ConnectionInfo.UserID = userIs
    crtablelogoninfo.ConnectionInfo.Password = passUser
    crtable.ApplyLogOnInfo(crtablelogoninfo)
    crtable.Location = iCatalog + ".dbo." + crtable.Name
    Catch ex As Exception
    End Try
    Next
    End If
    Next
    Next
    crDiskFileDestinationOptions = New DiskFileDestinationOptions()
    crDiskFileDestinationOptions.DiskFileName = Fname
    crExportOptions = crReportDocument.ExportOptions
    With crExportOptions
    .DestinationOptions = crDiskFileDestinationOptions
    .ExportDestinationType = ExportDestinationType.DiskFile
    .ExportFormatType = ExportFormatType.PortableDocFormat
    End With
    Dim parIDCase As ParameterValues = New ParameterValues
    Dim disIDCase As ParameterDiscreteValue = New ParameterDiscreteValue
    disIDCase.Value = idCase
    parIDCase.Add(disIDCase)
    crReportDocument.DataDefinition.ParameterFields("@ID_CASE_NMBR").ApplyCurrentValues(parIDCase)
    crReportDocument.Export()
    Response.ClearContent()
    Response.ClearHeaders()
    Response.ContentType = "application/pdf"
    Response.WriteFile(Fname)
    Response.Flush()
    Response.Close()
    System.IO.File.Delete(Fname)
    Catch ex As Exception
    lblMessage.Visible = True
    lblMessage.Text = "Error Load
    " & Convert.ToString(ex)
    End Try
    End Sub
    End Class
    Your help is greatly appreciated!

    Thanks for your help!
    I've now gotten past the "missing parameter values" error, and the report renders fine in the report viewer.  However, I've encounted another problem.  The data in my main report displays correctly, but the data in my subreport does not display.  Of course, when I view the report in the designer, both the main report and subreport display correctly.  What am I doing wrong?  Below is my vb.net code:
            Try
                idCase = Request.QueryString("id")
                nameRpt = Request.QueryString("prtName")
                Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
                Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
                Dim file As String = settings.File
                Dim dSource, iCatalog, userIs, passUser, appString As String
                dSource = Nothing
                iCatalog = Nothing
                userIs = Nothing
                passUser = Nothing
                appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
                Dim AppArray() As String = Split(appString, ";")
                Dim arrayLgth As Integer = AppArray.Length
                Dim i As Integer
                For i = 0 To arrayLgth - 1
                    Dim pairIs() As String = Split(AppArray(i), "=")
                    Dim firstItem As String = pairIs(0)
                    Dim secondItem As String = pairIs(1)
                    If firstItem = "Data Source" Then : dSource = secondItem : End If
                    If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
                    If firstItem = "UID" Then : userIs = secondItem : End If
                    If firstItem = "PWD" Then : passUser = secondItem : End If
                Next
                Dim crReportDocument As ReportDocument
                Dim crExportOptions As ExportOptions
                Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
                Dim crconnectioninfo As ConnectionInfo
                Dim crDatabase As Database
                Dim crtables As Tables
                Dim crtable As Table
                Dim crtablelogoninfo As TableLogOnInfo
                Dim Fname As String
                Dim Prtname As String
                Dim FPath As String
                Dim crSection As Section
                Dim crReportObject As ReportObject
                Dim crSubreportObject As SubreportObject
                Dim subRepDoc As New ReportDocument
                FPath = Server.MapPath("") + "\"
                Dim rptIs As String = nameRpt
                crReportDocument = New ReportDocument
                Prtname = FPath
                Prtname = Prtname + rptIs
                crReportDocument.Load(Prtname)
                Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
                crconnectioninfo = New ConnectionInfo
                crconnectioninfo.ServerName = dSource
                crconnectioninfo.DatabaseName = iCatalog
                crconnectioninfo.UserID = userIs
                crconnectioninfo.Password = passUser
                crDatabase = crReportDocument.Database
                crtables = crDatabase.Tables
                For Each crtable In crtables
                    Try
                        crtablelogoninfo = crtable.LogOnInfo
                        crtablelogoninfo.ConnectionInfo = crconnectioninfo
                        crtable.ApplyLogOnInfo(crtablelogoninfo)
                        crtable.SetDataSource(Prtname)
                        crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
                        crtablelogoninfo.ConnectionInfo.UserID = userIs
                        crtablelogoninfo.ConnectionInfo.Password = passUser
                        crtable.ApplyLogOnInfo(crtablelogoninfo)
                        crtable.Location = iCatalog + ".dbo." + crtable.Name
                    Catch ex As Exception
                        Response.Write(ex)
                        Exit Sub
                    End Try
                Next crtable
                For Each crSection In crReportDocument.ReportDefinition.Sections
                    For Each crReportObject In crSection.ReportObjects
                        If crReportObject.Kind = ReportObjectKind.SubreportObject Then
                            crSubreportObject = CType(crReportObject, SubreportObject)
                            subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
                            For Each crtable In subRepDoc.Database.Tables
                                Try
                                    crtablelogoninfo = crtable.LogOnInfo
                                    crtablelogoninfo.ConnectionInfo = crconnectioninfo
                                    crtable.ApplyLogOnInfo(crtablelogoninfo)
                                    crtable.SetDataSource(Prtname)
                                    crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
                                    crtablelogoninfo.ConnectionInfo.UserID = userIs
                                    crtablelogoninfo.ConnectionInfo.Password = passUser
                                    crtable.ApplyLogOnInfo(crtablelogoninfo)
                                    crtable.Location = iCatalog + ".dbo." + crtable.Name
                                Catch ex As Exception
                                End Try
                            Next
                        End If
                    Next
                Next
                crDiskFileDestinationOptions = New DiskFileDestinationOptions()
                crDiskFileDestinationOptions.DiskFileName = Fname
                crExportOptions = crReportDocument.ExportOptions
                With crExportOptions
                    .DestinationOptions = crDiskFileDestinationOptions
                    .ExportDestinationType = ExportDestinationType.DiskFile
                    .ExportFormatType = ExportFormatType.PortableDocFormat
                End With
                crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)
                crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")
                crReportDocument.Export()
                Response.ClearContent()
                Response.ClearHeaders()
                Response.ContentType = "application/pdf"
                Response.WriteFile(Fname)
                Response.Flush()
                Response.Close()
                System.IO.File.Delete(Fname)
            Catch ex As Exception
                lblMessage.Visible = True
                lblMessage.Text = "Error Load<br>" & Convert.ToString(ex)
            End Try
    Edited by: LaShandra Knox on Sep 17, 2008 7:59 PM

  • Custom Report Item CustomData evaluation problem in a subreport loop

    Came across a strange problem with the custom report item CustomData property evaluation when using a sub report loop.
    I have a master report, which contains a sub report component within a List. The List is bound to a dataset from which a numeric value is passed on to a sub report's report parameter, and from there further down as an argument to a sub report dataset. The sub
    report contains our custom image CRI, which is bound to the said dataset. This dataset outputs a base64 encoded image data value, which the CRI then renders.
    Now the problem is that only the first sub report iteration gets evaluated correctly, rest of them seem to get their CRI CustomData from the first iteration. So essentially the loop just outputs the same first sub report over and over again.
    However, if I make the List component do a page break after each sub report, then all the sub reports start getting rendered correctly. 
    Here's how the CustomData gets initialized in the CRI designer class:
    this.CustomData = new CustomData();
    this.CustomData.DataRowHierarchy = newDataHierarchy();
    this.CustomData.DataRowHierarchy.DataMembers.Add(newDataMember());
    this.CustomData.DataRowHierarchy.DataMembers[0].Group = newGroup();
    this.CustomData.DataRowHierarchy.DataMembers[0].Group.Name = this.Name + "_SingleGrouping";
    this.CustomData.DataRowHierarchy.DataMembers[0].Group.GroupExpressions.Add(new ReportExpression());
    this.CustomData.DataColumnHierarchy = new DataHierarchy();
    this.CustomData.DataColumnHierarchy.DataMembers.Add(new DataMember());
    DataRow row = new DataRow();
    DataValue value = new DataValue();
    value.Name = "Base64";
    value.Value = ""; 
    DataCell cell = new DataCell();
    cell.Add(value);
    row.Add(cell);
    this.CustomData.DataRows.Add(row);
    The CRI also exposes the CustomData's DataSetName and a Base64 property.
    Has anyone else seen something like this happen? Not sure if this could be an issue with our CustomData configuration/usage, the API documentation is pretty much non-existent as usual. Seems more like bug to
    me.
    Leo Wartinen, Predisys Inc.

    Hi WarLe,
    If I understand correctly, you are using a list control to contain the subreport in the master report. The dataset of the list contains the field which is passed as the parameter values of the subreport. When you render the report, only the first subreport
    gets evaluated correctly, rest of them seem to get their CRI CustomData from the first iteration, right?
    If in this scenario, it seems that you haven’t add a group in the list. We can try to add a group grouped on the field which is passed as the parameter values of the subreport to check the issue again. Besides, could you mind post the sample data for the
    dataset of the list and tell us the settings for the list control? Then we can make further analysis.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Report with subreports. Web Service/XML problem. Please help!

    Hi,
    I have a composite report (main report with 9 subreports). The report uses web service as datasorce and is provided with single xml file containing the schema and all the tables for the main reports and its subreports.
    The problem I encounter is that i have to establish a connection for each subreport in order to get it work and it is the same connection. Moreover, I have observed that each time a subreport is drilled there is distinct call to the web service.
    So, i end up having a single .rpt file which makes up to 10 unnecessary calls over http just get the same xml data ???
    I've tried everything to solve this problem without any success.
    Option 1: Removing subreports. Not posible because main report can not handle multiple detail section separately.
    Option 2: Using multiple detail section in main report and conditionally suppress rows. Not possible
    Option 3: Removing datasource from subreports and pass array variables instead. Not posible
    Option 4: Remove subreports and use crosstabs in main report. Not posible
    Any ideas?
    Please I would greatly appreciate any input, I am getting quite desperate about this.
    Thank you very much.

    Subreports make their own data connection, the reason why subreports are used for other data sources.
    Post to the Report Design forum to help on redesigning the report

  • Subreport based on stored proc - parameter problem

    Hello all,
    I have a problem to link formula field from main report to parameter in subreport.
    My subreport based on stored procedure with 3 parameters: month, year, typeID. I have 2 parameters in main report: month, year and they linked to subreport's ones without any problem. For third subreport parameter typeID I have formula in main report. I can link them together in Subreport Link window but when I try to run it I get error: stored procedure expects parameter typeid that's not specified.
    How to resolve this?
    Thanks!

    OK. First of all - I'm using CR XI R2.
    I have main report with like 20 subreports. Each subreport based on stored procedure with 3 parameters: month, year and repID. Based on this RepID I use different calculation for subreports.
    Main report has 2 parameters: month and year and 20 formulas for report type id: Type1, Type2 etc. Each of these formulas contain report id like 601, 602, 603 etc. I have no problem to link two main report parameters to all subreports. Then I linked all those fomulas to corresponding subreport typeID. FE: for first subreport: formula Type1 from main rep linked to parID from subreport1. Type2 linked to typeID from subreport2 etc. Reason I did it because I will have probably even more subreports and I don't want to have prompt with like 20 parameters typeID. But when I run it it looks lie subreport can't see this formula...

  • Problems with subreports from VB6, helpppppppppp!!!

    Post Author: Alejandro
    CA Forum: General
    Hi, everybody, I have problems to see the information from subreports, I dont know what to do.
    I have reports with 2 or more subreports inside it, I link the subreports with report, but when I try to see it from vb6 application
    It asks me for the parameter value of the parameter created when I linked them, I dont want to it asks me for values, but this is only 1 problem, when I type values, I get next message "the field name is not know",
    If I dont link anything when i run vb application I can see all (headers, titles, etc) but no the information retrieved from query, but from crystal reports all is fine in both cases(linked and not linked) I can see the reports and subreports with entire information
    I need help, How can I do to see complete information in my reports, how to pass the values to subreports and it doesnt ask me for it.
    In advance , thanks

    Post Author: rasinc
    CA Forum: General
    I usually link my subreports whenever possible, back to the main report so that the main report passes the appropriate parameters and I only have to deal with the main report.  Can be done in the designer on the Edit menu.

  • Problem with SetDataSource and SubReports

    Post Author: soxi
    CA Forum: Data Connectivity and SQL
    Hello,
    I have an application wich displays report with a dropdowlist.When I display a report with  subreports, this works once but after I have an error.
    I fill a dataset with several table.One table for the main report et two for the two subreports.
    da = new OracleDataAdapter("request1", cn);da.Fill(ds, "tableMain");da.SelectCommand.CommandText = "request2";da.Fill(ds, "tableSubReport1");da.SelectCommand.CommandText = "request3";da.Fill(ds, "tableSubReport2");cn.Close();
    After I bound my dataset with my report et subreports:
    1 for (int i = 0; i < ds.Tables.Count; i++)2 {3   if (i == 0)4     this.CRSource.ReportDocument.SetDataSource(ds.Tables&#91;i&#93;);5  else 6   {7           this.CRSource.ReportDocument.Subreports&#91;i - 1&#93;.SetDataSource (ds.Tables&#91;i&#93;);8   }this.CRSource.EnableCaching = true;this.CRViewer.ReportSource = this.CRSource;
    Error Message:My error message throws at the line 7:"System.Runtime.InteropServices.COMException: Le canal de communication n'a pas été créé.",(It is a french error, In english I think it was:"The channel of communication has not been established").
    When I enclose this line 7 with a "try" and a "catch" empty, a page come back:This page asks me this information:Server name,Database name, user name and password.
    Ask:I don't understand this error.I have search in all forums.Have you an idea of this problem?

    Thanks i got the audio problem fixed.
    When I open up final cut it says some of the media has been disconnected but it then says I can't reconnect it or something like that, I don't know if that effects the transitions. I split up a lot of footage and rearranged it and for one of the places where it flashes a clip it shows one of the pieces of footage that I had deleted because it had a glitch and the other places I noticed it it had random clips from throughout the project, like a flash of an interview that happens way later in the film. So it is random clips that are in the film and even clips that I deleted.

  • Problems passing Resultset to SubReport

    Hello Everybody,
    I have a very simple Problem but I can not fix it. I have a Report which contains a Subreport. The Subreport is nearly the same like the Mainreport, I´m also passing Parameters to the Subreport. This works fine.
    But if I try to pass a ResultSet, the ReportViewer ask for Username an Password of the Database. The Subreport contains further all Datasets of the Database and not the custombuild in the Mainapplication.
    Does anybody know why this happend?
    Thanks a lot.
    Markus

    Please define "Fails". Error? Behavior? Symptom?
    - Ludek

  • Crystal report subreport connect DB Problem

    I have rpt file was set the connect DB(AAAA). This file have two reproject (main report and subreport)
    The subreport parameter is linked to main report.
    These two report will get the data from DB by the parameter.
    Server Name:AAAA, Database Name: AAAA, UserID: AAAA, Password:AAAA
    for testing and save it.
    I am trying to build a MFC project with crystal report 13
    My project call this rpt file and pass a parameter to main
    The crystal report main report and subreport can get correct infomation where connect to the DB(AAAA)
    but when I connect to the other DB.
    My project only the crystal report main report can get the correct infomation, the subreport cannot get correct infomation.
    it show a diolog to ask me "enter the parameter".After passing a corrent parameter, the result also not corrent.
    The program code:
    CrystalDecisions::Windows::Forms::CrystalReportViewer^  crystalReportViewer1;
    ReportDocument boReportDocument = gcnew ReportDocument();
    boReportDocument->Load(strFilePath);
    String^ strUser = gcnew String (ReportPara->strUser);
    String^ strPassword = gcnew String (ReportPara->strPassword);
    String^ strServer = gcnew String (ReportPara->strServer);
    String^ strDatabase = gcnew String (ReportPara->strDatabase);
    boReportDocument->DataSourceConnections[0]->SetConnection(strServer,strDatabase,strUser,strPassword);
    ParameterValues^ pv = gcnew ParameterValues();
    ParameterDiscreteValue^ pdv = gcnew ParameterDiscreteValue();
    pdv->Value =ReportPara->varDate;
    pv->Add(pdv);
    boReportDocument->DataDefinition->ParameterFields[0]->ApplyCurrentValues(pv);
    crystalReportViewer1->ReportSource = boReportDocument;
    I have try to change the subreport DataSourceConnections:
    for (int j; j <boReportDocument->DataSourceConnections->Count;j++)
          boReportDocument->Subreports[0]->DataSourceConnections[j]->SetConnection(strServer,strDatabase,strUser,strPassword);
    but the result is also not corrent
    I have try to pass parameter to the subreport:
    pv->Add(pdv);
    boReportDocument->DataDefinition->ParameterFields[1]->ApplyCurrentValues(pv);
    for (int i; i <boReportDocument->DataDefinition->ParameterFields->Count;i++)
         pdv->Value =ReportPara->varDate;
         pv->Add(pdv)
         boReportDocument->Subreports[0]->DataDefinition->ParameterFields[0]->ApplyCurrentValues(pv);
    but the result is also not corrent
    I have try to set the ReportViewer LogOnInfo
    TableLogOnInfo^ loi;
    loi = boReportDocument->Database->Tables[0]->LogOnInfo;
    oTblLogOnInfos->Add(loi);
    for (int j=0; j<boReportDocument->Subreports[0]->Database->Tables->Count;j++)
          loi = boReportDocument->Subreports[0]->Database->Tables[j]->LogOnInfo;
          oTblLogOnInfos->Add(loi);
    crystalReportViewer1->LogOnInfo = oTblLogOnInfos;
    but the result is also not corrent

    Hi Edwin,
    I assume you are using the runtime for Cr for Visual Studio which is available from the download page correct?
    You don't want to use the .Add method, this actually adds a NEW parameter, you simply want to modify the current parameter value.
    Sorry I don't have and C++ samples.
    Don

Maybe you are looking for

  • Error in Loading Meta Data File for Service 'CL_ACCOUNTING_DOCUMENT_DP'

    Hi Guys, Need to your assistance in solving the below Error. 1. Error while loading metadata file for various service which required Connectors to be created . Example  : CL_ACCOUNTING_DOCUMENT_DP', BEP ZCB_COST_CENTER_SRV 1 Cost Center Service CB_CO

  • ALV list like FBL1N output

    Dear all,      I am developing a report for vendor line items details like FBL1N report.     It means the vendor name as header and respective account details as item in alv and again next vendor name as header and respective account details in alv i

  • HT4993 Do pictures in photo stream consume memory?

    I want to know if pictures stored in the photo stream consume phone memory

  • IPhone + Apple TV = Perfect Union

    Wouldn't it be great to take advantage of the iPhone sensors and the Apple TV for playing games, surfing the web full screen, typing text rather than managing with the remote, among any other possibilities?

  • Export/import from 9i to 10G

    Dear all i have oracle 9i database on windows i want to migrate to 10G on windows i know it is done by export/import utility but how it can be done please let me know as i need step by step documentation of it please let me know its urgent Regards