Crystal report filename

I am trying to create a report with a date field in its name. This destination is an email and I am using the following:
%To_Text(Date(SI_STARTTIME,"yyyymmdd"))%_BHN_Detail.%EXT%
This gives me the date the report was run. I need to change it to get the previous date. Is there a way to do it.
Thanks

Hi!  I have a similar issue and have been trying to find information to help me to no avail.  Were you able to figure out how to get the previous day's date in your file name?

Similar Messages

  • How to Retrieve a Crystal Report's Unmanaged Destination Filename

    Hi all,
    I have looked very closely at Robert Twigg's response to the post "[Destination Path and name of a scheduled Report|http://forums.sdn.sap.com/thread.jspa?messageID=9588160#9588160]" dated 9/1/10 and while it does retrieve the unmanaged destination path, the filename retrieved is the managed filename.  How does one go about retrieving an instance's unmanaged filename?
    When I look at a Crystal Report instance details, it definitely knows what the unmanaged filename that was populated, here is a sample instance detail:
    External Destination: File copy the instance with the filename: "ALOG_Deferred_Clearing_RPT_2011-12-13-11-43-09.pdf" to the folder: "/apps/efs_bobj/IMPL/XX" .
    As you can clearly see, the filename consists of report name, date, and time that was specified as "%SI_NAME%_%SI_STARTTIME%.%EXT%" in the destination filename.
    Here's the snippet to retrieve the managed filename:
    IInfoObject report = (IInfoObject) reports.get(0);
    // Get the file name from the instance.
    IFiles files = (IFiles) report.getFiles();
    IFile file = (IFile) files.get(0);
    Any insight on how to retrieve an instance's unmanaged filename would be highly appreciated.
    Thanks in advance,
    Hart Penn
    Edited by: hartpenn on Dec 14, 2011 2:14 PM
    Edited by: hartpenn on Dec 14, 2011 2:15 PM
    Edited by: hartpenn on Dec 14, 2011 2:19 PM

    Thank you for your response.  I am querying for the report instances using the query below:
    IInfoObjects iRptObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS " +
                                               "Where SI_KIND='Pdf' AND " +
                                               "SI_INSTANCE>0 ");
    Collection<IInfoObject> iRptObjs = iRptObjects;
    for (IInfoObject iRptObj : iRptObjs) {
        ISchedulingInfo iSchedInfo = iRptObj.getSchedulingInfo();
        IEvents triggerEvents = iSchedInfo.getDependants();
        if (triggerEvents.size() > 0) {
            for (int j=0; j < triggerEvents.size(); j++) {
                IInfoObjects events = (IInfoObjects)infoStore.query("SELECT * FROM CI_SYSTEMOBJECTS " +
                                                                    "Where SI_KIND='Event' AND " +
                                                                    "SI_ID=" + (Integer) triggerEvents.get(j));
                if (events.size() > 0) {
                    IEvent curEvent = (IEvent)events.get(0);
        IDestinationPlugin destPlugin =
            (IDestinationPlugin) infoStore.query("Select Top 1* from CI_SYSTEMOBJECTS " +
                                                 "Where SI_NAME = 'CrystalEnterprise.DiskUnmanaged'").get(0);
        IDestinations dests = iSchedInfo.getDestinations();
        Collection<IDestination> destObjs = dests;
        if (dests.size() > 0) {
            // we have a dest set up
            for (IDestination destObj : destObjs) {
                if (destObj.getName().compareTo("CrystalEnterprise.DiskUnmanaged") == 0) {
                    // Copy the destination properties to the destination plugin.
                    destObj.copyToPlugin(destPlugin);
                    // Get the scheduling options for the unmanaged disk.
                    IDiskUnmanagedOptions diskUnmanagedOptions =
                        (IDiskUnmanagedOptions) destPlugin.getScheduleOptions();
                    // Get the destination files
                    List destFiles = diskUnmanagedOptions.getDestinationFiles();
                    String pathName = (String)destFiles.get(0);
        IFiles iFiles = (IFiles) iRptObj.getFiles();
        IFile myFile = (IFile) iFiles.get(0);
        logger.debug("Object: " + iRptObj.getTitle() +
                     ", ID: " + iRptObj.getID() +
                     ", Kind: " + iRptObj.getKind() +
                     ", Trigger Event: " + curEvent.getEventName());
        logger.debug("Dest: " + pathName);
        logger.debug("Filename: " + myFile.getName());
    while this is not efficient, it does retrieve the instances. However, the file name returned is not what was specified in the destination filename. Here is some info returned and displayed:
    Object: ALOG_Deferred_Clearing_RPT, ID: 128776, Kind: Pdf, Trigger Event: EVT_121311_114308
    Dest: /apps/efs_bobj/IMPL/XX/%SI_NAME%_%SI_STARTTIME%.%EXT%
    FileName: ~ce46086dd492ac788.pdf
    As you can see, the filename is clearly the managed filename.
    Edited by: hartpenn on Dec 14, 2011 3:43 PM
    Edited by: hartpenn on Dec 14, 2011 4:02 PM
    Edited by: hartpenn on Dec 14, 2011 4:03 PM
    Edited by: hartpenn on Dec 14, 2011 4:17 PM
    Edited by: hartpenn on Dec 14, 2011 4:26 PM
    Edited by: hartpenn on Dec 14, 2011 4:27 PM
    Edited by: hartpenn on Dec 14, 2011 4:28 PM

  • Exporting a crystal report as PDF and Attaching to an email via code - Filename Issuses?

    Post Author: alynch
    CA Forum: .NET
    I need to export a crystal report as a pdf and send it out via email.  I have created a subroutine that works but the attached filename come up as "untitled.txt" so the receiving machine believes it is a text file.  If I rename it on the recipients machine to a ".pdf" I can open it with acrobat and it looks OK.  Does anyone know how to rename the file as a pdf prior to sending it out? 
    Thank You.
    al
    I have included a copy of the subroutine:
    Dim repdoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
    Dim diskOpts As New CrystalDecisions.Shared.DiskFileDestinationOptions()
    Dim ExpOpts As CrystalDecisions.Shared.ExportOptions
    Dim MailOpts As New CrystalDecisions.Shared.MicrosoftMailDestinationOptions()
    repdoc = Me.CrystalReport11
    repdoc.Load("C:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplication3\CrystalReport1.rpt")
    ExpOpts = repdoc.ExportOptions
    With ExpOpts
    .ExportDestinationType = CrystalDecisions.&#91;Shared&#93;.ExportDestinationType.MicrosoftMail
    .ExportFormatType = CrystalDecisions.&#91;Shared&#93;.ExportFormatType.PortableDocFormat
    End With
    With MailOpts
    .MailMessage = "Message"
    .MailToList = "enter email adress here"
    .MailSubject = "Attached is a PDF file - .net Export test "
    End With
    ExpOpts.DestinationOptions = MailOpts
    Try
    repdoc.Export()
    Catch err As Exception
    MessageBox.Show(err.ToString())
    End Try
    End Sub

    Post Author: Knight
    CA Forum: .NET
    I had this same problem today, here's what I used. Its built in 2 parts. Step one loops throught and exports PDF copies of a traking report. Step 2 builds an email list from a SQl query and sends it.STEP ONE:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        'Declare the some variables        Dim row1 As DataRow        Dim brokerID As String        Dim brokername As String        Dim brokerEmail As String        Dim shipdate As String        Dim crParameterFieldDefinitions As ParameterFieldDefinitions        Dim crParameterFieldDefinition As ParameterFieldDefinition        Dim crParameterValues As New ParameterValues()        Dim crParameterDiscreteValue As New ParameterDiscreteValue()        Dim crParameterFieldDefinitions1 As ParameterFieldDefinitions        Dim crParameterFieldDefinition1 As ParameterFieldDefinition        Dim crParameterValues1 As New ParameterValues()        Dim crParameterDiscreteValue1 As New ParameterDiscreteValue()        Dim CrReport As New CrystalReport1() ' Report Name         Dim report As ReportDocument = "O:KNIFormats_ReportPrivateSMStageShipmentInfo"        Dim CrExportOptions As ExportOptions        Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()        Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()        Dim SHIPDATE123 As String        SHIPDATE123 = _month & "/" & _day & "/" & year        Dim db As String        db = System.Configuration.ConfigurationSettings.AppSettings("Datalogin")        Dim sqlCon As New SqlConnection        sqlCon.ConnectionString = db        Dim strsql1 As String        strsql1 = "SELECT     tblSOOrd_Hdr.BrokerCd, tblSO_Ord_Hdr.BrokerName, tblSM_Ship_Hdr.ShipDate "        strsql1 &= "FROM         tblSO_Ord_Hdr INNER JOIN tblSM_Ship_Hdr ON tblSO_Ord_Hdr.Locale = tblSM_Ship_Hdr.Locale AND tblSO_Ord_Hdr.OrdNo = tblSM_Ship_Hdr.OrdNo AND "        strsql1 &= "              tblSO_Ord_Hdr.RlsNo = tblSM_Ship_Hdr.RlsNo INNER JOIN tblSys_Cust_Broker ON tblSO_Ord_Hdr.BrokerCd = tblSys_Cust_Broker.BrokerCd "        strsql1 &= "GROUP BY tblSO_Ord_Hdr.BrokerCd, tblSM_Ship_Hdr.ShipDate, tblSO_Ord_Hdr.BrokerName "        strsql1 &= "HAVING      (tblSM_Ship_Hdr.ShipDate = '" & SHIPDATE123 & "') "        Dim da1 As New SqlDataAdapter(strsql1, sqlCon)        Dim worktbl1 As DataTable        worktbl1 = New DataTable("tblEmail")        da1.Fill(worktbl1)        da1.FillSchema(worktbl1, SchemaType.Source)        If worktbl1.Rows.Count > 0 Then            For Each row1 In worktbl1.Rows                brokerID = CStr(row1("BrokerCd")).Trim                brokername = CStr(row1("BrokerName")).Trim                shipdate = CStr(row1("ShipDate")).Trim                CrReport.Load()                crParameterDiscreteValue.Value = shipdate                crParameterFieldDefinitions = CrReport.DataDefinition.ParameterFields                crParameterFieldDefinition = crParameterFieldDefinitions.Item("ShipDate")                crParameterValues = crParameterFieldDefinition.CurrentValues                crParameterValues.Clear()                crParameterValues.Add(crParameterDiscreteValue)                crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)                crParameterDiscreteValue1.Value = brokerID                crParameterFieldDefinitions1 = CrReport.DataDefinition.ParameterFields                crParameterFieldDefinition1 = crParameterFieldDefinitions1.Item("Broker")                crParameterValues1 = crParameterFieldDefinition1.CurrentValues                crParameterValues1.Clear()                crParameterValues1.Add(crParameterDiscreteValue1)                crParameterFieldDefinition1.ApplyCurrentValues(crParameterValues1)                CrDiskFileDestinationOptions.DiskFileName = "c:Test_Folder20" & _year & "-" & _month & "-" & day & "" & brokername & ".pdf"                CrFormatTypeOptions.FirstPageNumber = 1 ' Start Page in the Report                 CrFormatTypeOptions.LastPageNumber = 1000 ' End Page in the Report                 CrFormatTypeOptions.UsePageRange = True                CrExportOptions = CrReport.ExportOptions                With CrExportOptions                    .ExportDestinationType = ExportDestinationType.DiskFile                    .ExportFormatType = ExportFormatType.PortableDocFormat                    .DestinationOptions = CrDiskFileDestinationOptions                    .FormatOptions = CrFormatTypeOptions                End With                Try                    CrReport.Export()                Catch err As Exception                    MessageBox.Show("DID NOT EXPORT")                End Try            Next            MessageBox.Show("All PDF's exported succesfully")        End If    End SubSTEP 2: Private Sub Button3Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click        Dim row2 As DataRow        Dim SHIPDATE123 As String        SHIPDATE123 = _month & "/" & _day & "/" & year        Dim db1 As String        db1 = System.Configuration.ConfigurationSettings.AppSettings("Datalogin")        Dim sqlCon As New SqlConnection        sqlCon.ConnectionString = db1        Dim strsql2 As String        strsql2 = "SELECT     tblSOOrd_Hdr.BrokerCd, tblSys_Cust_Broker.BrokerName, tblSM_Ship_Hdr.ShipDate, tblSys_Cust_Broker.ContactEmail "        strsql2 &= "FROM      tblSO_Ord_Hdr INNER JOIN tblSM_Ship_Hdr ON tblSO_Ord_Hdr.Locale = tblSM_Ship_Hdr.Locale AND tblSO_Ord_Hdr.OrdNo = tblSM_Ship_Hdr.OrdNo AND "        strsql2 &= "          tblSO_Ord_Hdr.RlsNo = tblSM_Ship_Hdr.RlsNo INNER JOIN tblSys_Cust_Broker ON tblSO_Ord_Hdr.BrokerCd = tblSys_Cust_Broker.BrokerCd "        strsql2 &= "GROUP BY  tblSO_Ord_Hdr.BrokerCd, tblSM_Ship_Hdr.ShipDate, tblSys_Cust_Broker.ContactEmail, tblSys_Cust_Broker.BrokerName, tblSys_Cust_Broker.Email_ASN "        strsql2 &= "HAVING    (tblSM_Ship_Hdr.ShipDate = '" & SHIPDATE123 & "') AND (tblSys_Cust_Broker.Email_ASN = 1) AND (tblSys_Cust_Broker.ContactEmail <> '') " Dim da1 As New SqlDataAdapter(strsql2, sqlCon) Dim worktbl2 As DataTable worktbl2 = New DataTable("tblEmail12") da1.Fill(worktbl2) da1.FillSchema(worktbl2, SchemaType.Source) Dim brokerID As String Dim brokername As String Dim brokerEmail As String Dim shipdate As String If worktbl2.Rows.Count > 0 Then For Each row2 In worktbl2.Rows brokerID = CStr(row2("BrokerCd")).Trim brokername = CStr(row2("BrokerName")).Trim brokerEmail = CStr(row2("ContactEmail")).Trim shipdate = CStr(row2("ShipDate")).Trim Dim mail As New MailMessage Dim att As String att = "c:Test_Folder20" & _year & "-" & _month & "-" & _day & "" & brokername & ".pdf" 'set the addresses mail.From = New MailAddress("[email protected]") mail.To.Add(brokerEmail) mail.Attachments.Add(New Attachment(att)) 'set the content mail.Subject = "Shipment Tracking report from Knox Nursery for " & SHIPDATE123 mail.IsBodyHtml = True mail.Body = "
    " mail.Body &= "This shipment update has been requested by:
    "                'send the message                Dim smtp As New SmtpClient                smtp.Send(mail)                ' MessageBox.Show("No Records Found", "Failed to send", MessageBoxButtons.OK, MessageBoxIcon.Stop            Next        Else            MessageBox.Show("No broker have opted in", "No Emails Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)        End If        MessageBox.Show("Emails sent... ", "Emails Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)    End Sub

  • Exporting Crystal Report to HTML is not working in Windows 7

    Hi Sir,
    I am trying to export Crystal Report to HTML format using VB.NET code. Functionality is working fine at Windows XP Environment (Save to Disk, Open an Application and Email Attachment). But the same functionality is not working at Windows 7 Environment (both 32-Bit as well as 64-Bit).
    Below is the code to Exporting Crystal Report to HTML in VB.NET.
    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions
    Dim CrFormatTypeOptions          As New HTMLFormatOptions
    Dim vFormat As Integer
    Dim CrExportOptions As New ExportOptions
    Dim vRdReport As New ReportDocument
    Dim sfd As SaveFileDialog
    Dim vFileName As String = Nothing
    vRdReport = vRptSource
    sfd = New SaveFileDialog
    If Not (vRptPath = "") Then
        sfd.InitialDirectory = vRptPath
    End If
    sfd.Filter = "Webpage, Complete(.htm;.htm)|.htm|Web Archive, Single file(.mht)|.mht|Webpage, HTML only(.htm;.html)|.html"
    If sfd.ShowDialog = DialogResult.OK Then
        ' Set the disk file options.
         CrDiskFileDestinationOptions.DiskFileName = sfd.FileName.ToString()
    Else
         Return
    End If
    CrExportOptions = vRdReport.ExportOptions
    CrFormatTypeOptions.HTMLFileName = vFileName
    CrFormatTypeOptions.HTMLEnableSeparatedPages = True
    CrFormatTypeOptions.HTMLEnableSeparatedPages = True
    CrFormatTypeOptions.HTMLHasPageNavigator = True
    CrFormatTypeOptions.UsePageRange = True
    With CrExportOptions
                        .ExportDestinationType = ExportDestinationType.DiskFile
                        .ExportFormatType = ExportFormatType.HTML32
                        .DestinationOptions = CrDiskFileDestinationOptions.DiskFileName
                        .FormatOptions = CrFormatTypeOptions
    End With
    vRdReport.Export()
    Catch ex As Exception
            MsgBox(ex.ToString)
    End Try
    Code working fine at Windows XP, But it is not woking in Windows 7 environment.
    Please can anyone share your valuable thoughts or ideas reg. this.
    Thanks in Advance
    Deivanayaga Perumal D.

    user13509659 wrote:
    Run this code to reproduce the issue.Which issue?
    It looks like inheritance is broken in the component hierarchy for JFrame in Windows 7 JDK 1.6.0_23-b05. The only thing remotely related to inheritance in your code snippet is the WindowListener, which does little. See camickr's advice about built-in exit management.
    EDIT - using the post title as a clue, I realize you may be talking about the component hierarchy, and whether the contentPane's background is visible through the upper layers. Instead of guessing, I'd prefer you describe your "issue" accurately (observed vs expected behavior).
    Edited by: jduprez on Feb 10, 2011 1:01 PM

  • Crystal report Error for CRVS2010 sp2 using Push Method

    I am trying to pass a dataset to a crystal report viewer using SetDatabaseSource.
    I have defined in Crystal to used an ADO .Net Database XML Schema.
    I pass a Dataset to the Report By using SetDatbaseSourece and set the ReportSource for the CrystalViewer but I get the error that crdb_adoplus.dll does not exists.
    Note that Crystal is looking for crdb_adoplus.dll under subdirectory dotnet1.  It resides under win32_x86.
    Is this a Crystal Report Problem ?
    Is their any docuentation that show how to program for ADO xml dataset using crvs2010 ?
    The Error Reads
    System.IO.FileNotFoundException was unhandled
      Message=Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
      Source=mscorlib
      FileName=file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
      FusionLog==== Pre-bind state information ===
    LOG: User = WKST04\GARYB
    LOG: Where-ref bind. Location = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
    LOG: Appbase = file:///D:/S_and_G/LMS_DotNet/LMS_Solution/LMS/bin/Debug/
    LOG: Initial PrivatePath = NULL
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in LoadFrom load context.
    WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
    LOG: Using application configuration file: D:\S_and_G\LMS_DotNet\LMS_Solution\LMS\bin\Debug\LMS.vshost.exe.Config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/SAP BusinessObjects/Crystal Reports for .NET Framework 4.0/Common/SAP BusinessObjects Enterprise XI 4.0/win32_x86/dotnet1/crdb_adoplus.dll.
      StackTrace:
           at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
           at System.Reflection.Assembly.LoadFrom(String assemblyFile)
           at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)
      InnerException:

    Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
    Crystal Reports for .NET Framework 4.0 (CRforVS_13_0_2)
    project WPF net 4.0
    crReport = new Reports.Buh.Cma.cr_balances_cma_move();
    using (DataTable tbl = new DataTable())
       using (SqlConnection cn = new SqlConnection(ConnectToDataBase.GetSqlConnectionString()))
             using (SqlCommand cmd = cn.CreateCommand())
                    cmd.CommandText = "proc_name";
                    cmd.CommandType = CommandType.StoredProcedure;
                    using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                            cn.Open();
                            da.Fill(tbl);
      crReport.SetDataSource(tbl);
      crReport.SetParameterValue(4, param["report_name"]);
      myDateTime.GetServerDate();
      crReport.SummaryInfo.ReportAuthor = App.GetPrintInfo();
      e.Result = crReport;
    erorr_message - Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. Не удается найти указанный файл.
    help plz

  • How to avoid the parameters accepting screen generated by crystal report

    Hi ,
    I designed one rpt file which will take one parameter and trying to run that file from java servlets. But I am getting one problem. I am passing parameters from jsp and setting those to the crystal report but, instade of generating the report, it is generating one jsp page which is having text feild , after enter the parameter value onece I submit this page then only I am getting required output.
    anybody please help me in this. Below I am placing my code.     
                   ReportClientDocument reportClientDocument = new ReportClientDocument();
                   CrystalReportViewer viewer = new CrystalReportViewer();
                   ServletContext cxt = req.getSession().getServletContext();
                   String fileName = "C:/Documents and Settings/Administrator/Desktop/lib-so/ix_sample2.rpt";
                   try
                        String realPath = fileName;
                        reportClientDocument.open(realPath, 0);
                        viewer.refresh();
                        viewer.setReportSource(reportClientDocument.getReportSource());
                   catch(Exception e)
                        System.out.println("inside catch block...");
                        e.printStackTrace();
                   IReportSource reportSource = reportClientDocument.getReportSource();
                   Fields oFields = new Fields();  
                   ParameterField portfolio = new ParameterField();
                   portfolio.setName("Portfolio");
                    Values oValues = new Values();
                      ParameterFieldDiscreteValue oParameterFieldDiscreteValue = new ParameterFieldDiscreteValue();
                       oParameterFieldDiscreteValue.setValue(new Integer(16));
                       oValues.add(oParameterFieldDiscreteValue);
                       portfolio.setCurrentValues(oValues);
                       portfolio.setReportName(fileName);
                       oFields.add(portfolio);
                          viewer.setOwnPage(false);
                               viewer.setParameterFields(fi);
                       try {
                             viewer.processHttpRequest(req, res, cxt, res.getWriter());
                             viewer.dispose();
                       catch (ReportSDKExceptionBase e) {
                             e.printStackTrace();
    thanks,
    Mallikarjun
    Edited by: mallikarjuna.ch1 on May 17, 2009 9:58 AM

    Thanks a lot for worthful suggetion Neeraj.
    I got resolved my problem. I have one more issue, please give a clarification about that.
    my doublt is,
    For parameterized rpt file running purpose I need to set the database details . every jar file is placed in application lib only. And my CRConfig.xml file also placed bellow.
                  <?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
        <timeout>1</timeout>
        <ExternalFunctionLibraryClassNames>
              <classname> </classname>
              <classname> </classname>
        </ExternalFunctionLibraryClassNames>
    <keycode>B6W60-01CS200-00GCPT0-0JY1</keycode>
    <Javaserver-configuration>
    <DataDriverCommon>
         <JavaDir>D:\inventex\crystal_report\Business Objects\j2sdk1.4.2_08\bin</JavaDir>
        <Classpath>$</Classpath>
         <IORFileLocation>$</IORFileLocation>
         <JavaServerTimeout>1800</JavaServerTimeout>
         <JavaServerStartupTimeout>30</JavaServerStartupTimeout>
         <JVMMaxHeap>64000000</JVMMaxHeap>
         <JVMMinHeap>32000000</JVMMinHeap>
         <NumberOfThreads>100</NumberOfThreads>
    </DataDriverCommon>
    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL>jdbc:sqlserver://10.0.0.65:1433;DatabaseName=reportmanager</JDBCURL>
         <JDBCClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</JDBCClassName>
         <JDBCUserName>malli</JDBCUserName>
         <JNDIURL></JNDIURL>
         <JNDIConnectionFactory></JNDIConnectionFactory>
         <JNDIInitContext>/</JNDIInitContext>
         <JNDIUserName>weblogic</JNDIUserName>
         <GenericJDBCDriver>
              <Default>
                   <ServerType>UNKNOWN</ServerType>
                   <QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>Standard</LogonStyle>
              </Default>
              <Sybase>
                   <ServerType>SYBASE</ServerType>
                   <QuoteIdentifierOnOff>OFF</QuoteIdentifierOnOff>
                   <DriverClassName>com.sybase.jdbc2.jdbc.SybDriver</DriverClassName>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>MySQL</LogonStyle>
              </Sybase>
         </GenericJDBCDriver>
    </JDBC>
    <XML>
         <CacheRowSetSize>100</CacheRowSetSize>
         <PreReadNBytes>4096</PreReadNBytes>
         <XMLLocalURL></XMLLocalURL>
         <SchemaLocalURL></SchemaLocalURL>
         <XMLHttpURL></XMLHttpURL>
         <SchemaHttpURL></SchemaHttpURL>
    </XML>
    <JavaBeans>
        <CacheRowSetSize>100</CacheRowSetSize>
         <JavaBeansClassPath></JavaBeansClassPath>
    </JavaBeans>
    </Javaserver-configuration>
    </CrystalReportEngine-configuration>
    still it is showing "Error finding JNDI name (sql server) " error. I am solving this problem setting these paramers through program.

  • Crystal report broke

    Post Author: Davearia
    CA Forum: .NET
    Hi,
    Firstly apologies if this is a stupid question but I have hit a brick wall.
    I have a crystal report that fails on a formula field but I cannot see why.Here is my code:
    Code:Public Function CreateReportPDF(ByVal dsReport As DataSet, ByVal CrystalReportPath As String, _                                        ByVal reportSize As String, ByVal landScape As Boolean, _                                            ByVal dsParameters As DataSet, ByVal filePath As String, _                                                ByVal fileName As String) As Boolean        Try            'Load report including report path etc.            _report.Load(CrystalReportPath, OpenReportMethod.OpenReportByTempCopy)            _report.SetDataSource(dsReport)            'Deal with any report parameters.                       Dim crParameterDiscreteValue As ParameterDiscreteValue            Dim crParameterFieldDefinitions As ParameterFieldDefinitions            Dim crParameterFieldLocation As ParameterFieldDefinition            Dim crParameterValues As ParameterValues            'Get the report's parameters collection.                       crParameterFieldDefinitions = _report.DataDefinition.ParameterFields            For counter As Int32 = 0 To (dsParameters.Tables("ReportParameters").Rows.Count - 1)                crParameterFieldLocation = crParameterFieldDefinitions.Item(dsParameters.Tables("ReportParameters").Rows(counter).Item("Key").ToString)                crParameterValues = crParameterFieldLocation.CurrentValues                crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue                crParameterDiscreteValue.Value = dsParameters.Tables("ReportParameters").Rows(counter).Item("Value").ToString                crParameterValues.Add(crParameterDiscreteValue)                crParameterFieldLocation.ApplyCurrentValues(crParameterValues)            Next            Dim CrExportOptions As ExportOptions            Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()            Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()            'Set the destination path and file name.            CrDiskFileDestinationOptions.DiskFileName = "c:\Test.pdf"            'Set export options.            CrExportOptions = _report.ExportOptions            With CrExportOptions                'Set the destination to a disk file.                .ExportDestinationType = ExportDestinationType.DiskFile                'Set the format to PDF                 .ExportFormatType = ExportFormatType.PortableDocFormat                'Set the destination options to DiskFileDestinationOptions object.                .DestinationOptions = CrDiskFileDestinationOptions                .FormatOptions = CrFormatTypeOptions            End With            'Export the report.            _report.Export()        Catch ex As Exception            Dim strEx As String = ex.ToString        End Try    End Function
    The code throws an exception on the _report.Export() line.The details of the exception are:
    Quote:
    A string is required here.Error in File C:\DOCUME1\me\LOCALS1\Temp\Snapshot {179546E4-7F1E-419C-944C-16C97E961CF0}.rpt:Error in formula <fWeight>. 'iif({Snapshot.snapshot}=1,"",cstr({Snapshot.weight},3))'
    A string is required here.Here is the dataset:
    Code:<?xml version="1.0" standalone="yes"?><NewDataSet>  <Snapshot>    <snapshot>1</snapshot>    <stage>Drawing Office</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Planning</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Released to Sub Fab</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Sub Fabrication</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Own Treatment</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Treated</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Loaded</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>In Packages</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>In Containers</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>At Site</stage>    <fcode />    <stcode />    <weight>28.604</weight>  </Snapshot>  <Snapshot>    <snapshot>1</snapshot>    <stage>Erected</stage>    <fcode />    <stcode />    <weight>0</weight>  </Snapshot></NewDataSet>
    If have hacked the field formula in the report to eliminate other problems to from this:
    Quote:
    iif({Snapshot.snapshot}=1,"",cstr({Snapshot.weight},3))
    To this:
    Quote:
    iif({Snapshot.snapshot}=1,"Yep","Nope")
    This gives me the same error, however:
    Quote:
    iif(1=1,"Yep","Nope")
    Does not error, So some how the values in the dataset are not coming through.This has had me stumped all this afternoon. In the code I originally set the datasource on my report after I added the parameters. I changed this as the parameters values got wiped.Has anyone got any suggestions as to what I am doing wrong?I really struggle with crystal  Thanks, Dave.

    Post Author: robarahz
    CA Forum: .NET
    Is the Snapshot.snapshot actually IN the dataset? I mean, can you see it in the DatabaseFields in the Field Explorer? If so, is that data an integer or some type of char, becuase you're testing it for being = 1. If it's a char, this could be a problem.
    Also, try right clicking on the Database Fields in Field Explorer and choose "Verify Database" or "Set Datasource Location" to make sure it's pointing to the datasource that you modified.
    It's very quirky in Visual Studio. Good luck.

  • Error in Preview and Print in Crystal Report Viewer 2.0.0.7 in Workstation

    Hi Guys,
    I am encountering a problem when clicking preview and print in Crystal Report Viewer 2.0.0.7. It returns an error
    Unhandled exception has occurred in your application. If you click Continue the application will ignore and attempt to continue. If you click quit, the application will close immediately. Load report failed.
    I already install the runtime crruntime_120_mlb, . net framework 3.5 sp1 and the add-on itself. The viewer is working properly in SAP Server. My version of SAP is SBO 2007 A SP00 PL10.
    Regards,
    Michael

    here's the detailed error
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.
    Exception Text
    CrystalDecisions.Shared.CrystalReportsException Load report failed. --- System.Runtime.InteropServices.COMException (0x80004005) The device is not ready.
       at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_Database()
       at SAP_CR.MyForms.frmReportViewer.ConfigureCrystalReports()
       at SAP_CR.MyForms.frmReportViewer.frmReportViewer_Load(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Loaded Assemblies
    mscorlib
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3620 (GDR.050727-3600)
        CodeBase fileCWINDOWSMicrosoft.NETFrameworkv2.0.50727mscorlib.dll
    SAP_CR
        Assembly Version 2.0.0.7
        Win32 Version 2.0.0.7
        CodeBase fileCProgram%20FilesSAPSAP%20Business%20OneAddOnsSAP_CRSAP_CR.exe
    Interop.SAPbouiCOM
        Assembly Version 8.0.0.0
        Win32 Version 8.0.0.0
        CodeBase fileCProgram%20FilesSAPSAP%20Business%20OneAddOnsSAP_CRInterop.SAPbouiCOM.DLL
    System.Windows.Forms
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Windows.Forms2.0.0.0__b77a5c561934e089System.Windows.Forms.dll
    System
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3614 (GDR.050727-3600)
        CodeBase fileCWINDOWSassemblyGAC_MSILSystem2.0.0.0__b77a5c561934e089System.dll
    System.Drawing
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Drawing2.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll
    CustomMarshalers
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_32CustomMarshalers2.0.0.0__b03f5f7f11d50a3aCustomMarshalers.dll
    Interop.CR_Crypto
        Assembly Version 6.0.0.0
        Win32 Version 6.0.0.0
        CodeBase fileCProgram%20FilesSAPSAP%20Business%20OneAddOnsSAP_CRInterop.CR_Crypto.DLL
    System.Data
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_32System.Data2.0.0.0__b77a5c561934e089System.Data.dll
    System.Configuration
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll
    System.Xml
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3082 (QFE.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_MSILSystem.Xml2.0.0.0__b77a5c561934e089System.Xml.dll
    System.Transactions
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_32System.Transactions2.0.0.0__b77a5c561934e089System.Transactions.dll
    System.EnterpriseServices
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase fileCWINDOWSassemblyGAC_32System.EnterpriseServices2.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll
    CrystalDecisions.Windows.Forms
        Assembly Version 12.0.2000.0
        Win32 Version 12.0.2000.840
        CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.Windows.Forms12.0.2000.0__692fbea5521e1304CrystalDecisions.Windows.Forms.dll
    CrystalDecisions.Shared
        Assembly Version 12.0.2000.0
        Win32 Version 12.0.2000.840
        CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.Shared12.0.2000.0__692fbea5521e1304CrystalDecisions.Shared.dll
    CrystalDecisions.ReportSource
        Assembly Version 12.0.2000.0
        Win32 Version 12.0.2000.840
        CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.ReportSource12.0.2000.0__692fbea5521e1304CrystalDecisions.ReportSource.dll
    CrystalDecisions.CrystalReports.Engine
        Assembly Version 12.0.2000.0
        Win32 Version 12.0.2000.840
        CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.CrystalReports.Engine12.0.2000.0__692fbea5521e1304CrystalDecisions.CrystalReports.Engine.dll
    System.Web
        Assembly Version 2.0.0.0
        Win32 Version 2.0.50727.3618 (GDR.050727-3600)
        CodeBase fileCWINDOWSassemblyGAC_32System.Web2.0.0.0__b03f5f7f11d50a3aSystem.Web.dll
    CrystalDecisions.ReportAppServer.CommLayer
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.1100.840
        CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.CommLayer12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.CommLayer.dll
    CrystalDecisions.ReportAppServer.ClientDoc
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.1100.840
        CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.ClientDoc12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.ClientDoc.dll
    CrystalDecisions.ReportAppServer.DataSetConversion
        Assembly Version 12.0.2000.0
        Win32 Version 12.0.2000.840
        CodeBase fileCWINDOWSassemblyGAC_MSILCrystalDecisions.ReportAppServer.DataSetConversion12.0.2000.0__692fbea5521e1304CrystalDecisions.ReportAppServer.DataSetConversion.dll
    CrystalDecisions.ReportAppServer.DataDefModel
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.1100.840
        CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.DataDefModel12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.DataDefModel.dll
    CrystalDecisions.ReportAppServer.Controllers
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.1100.840
        CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.Controllers12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.Controllers.dll
    CrystalDecisions.ReportAppServer.CubeDefModel
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.1100.840
        CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.CubeDefModel12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.CubeDefModel.dll
    CrystalDecisions.ReportAppServer.ReportDefModel
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.1100.840
        CodeBase fileCWINDOWSassemblyGACCrystalDecisions.ReportAppServer.ReportDefModel12.0.1100.0__692fbea5521e1304CrystalDecisions.ReportAppServer.ReportDefModel.dll
    BusinessObjects.Licensing.KeycodeDecoder
        Assembly Version 12.0.1100.0
        Win32 Version 12.0.0.840
        CodeBase fileCWINDOWSassemblyGACBusinessObjects.Licensing.KeycodeDecoder12.0.1100.0__692fbea5521e1304BusinessObjects.Licensing.KeycodeDecoder.dll
    JIT Debugging
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    For example
    configuration
        system.windows.forms jitDebugging=true
    configuration
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  • Why am I getting "The Report Filename Is Empty - Using CR13 vs2010 2003sqls

    I am enhancing a vb.net app that was originally written with vs2010 vb.net, crystal reports 10 and telerik.
    It has been running for a year.
    I have made enhancements using vs2010sp1 vb.net,  cr 13,  telerik framework updated.
    The server is a 2003 server.
    The reports are  loaded into the app using vb code.
    My version creates a message the filename is empty on initial loading of the report
    which the users will find annoying as they have to enter the report request.
    This message has to be internal because I not coded for this message
    I don't get this message when testing at my workstation.  It happens when I load the
    app to the server.
    Any ideas or solutions appreciated.
    Under the gun.
    Thanks in advance
    Isaac

    Hi,
    "The report filename was empty." is not a Crystal Reports error.
    Specify what the application exactly does i.e. view report, print, export report etc.
    Take a look at below thread.
    [Preview in web using Crystal Report Viewer Message:|Preview in web using Crystal Report Viewer Message:]
    Recheck the flow of the application if everything is in place.
    Refer to the developer guide :[http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip]
    Apply [SP2 on CR for VS 2010|http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_2.exe]
    Just as a test try a sample application without the telerik framework, see if it reproduces the issue.
    Hope this helps,
    Bhushan.
    Edited by: Bhushan Hyalij on Dec 9, 2011 8:47 PM

  • Crystal Reports for VS2010 cannot find crdb_adoplus.dll

    I installed Crystal Reports for VS2010 successfullly,   At least the report editor works without a problem and the viewer control can be placed on a form.  My problem is when I try to run it, I get the following exception:
    System.IO.FileNotFoundException was unhandled
      Message=Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
      Source=mscorlib
      FileName=file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
      FusionLog=WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    StackTrace:
           at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
           at System.Reflection.Assembly.LoadFrom(String assemblyFile)
           at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)
      InnerException:
    I used Windows Explorer and found that crdb_adoplus.dll is present in the directory, so it must be a "related file"  Has any one seen this error before and if so, do you know how to fix it??

    See if [this|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533323335333433333332%7D.do] KB resolves the issue.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Randomly hang in Crystal Reports for Visual Studio 2005

    after a certain number of prints  (PrintMyDoc) the application hangs on the line of code shown below
    the void is PrintMyDoc
    private ConnectionInfo CreateConnectionInfo(string User, string Password, string Server, string Database)
                ConnectionInfo objConn = new ConnectionInfo();
                objConn.UserID = User;
                objConn.Password = Password;
                objConn.ServerName = Server;
                objConn.DatabaseName = Database;
                return objConn;
    private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
                try
                    CrystalDecisions.CrystalReports.Engine.Database db = reportDocument.Database; // HUNGS HERE !!!!                CrystalDecisions.CrystalReports.Engine.Tables tables = db.Tables;
                    foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                        TableLogOnInfo tblInfo = new TableLogOnInfo();
                        tblInfo.ConnectionInfo = connectionInfo;
                        table.ApplyLogOnInfo(tblInfo);
                    foreach (CrystalDecisions.CrystalReports.Engine.ReportDocument subrep in reportDocument.Subreports)
                        foreach (CrystalDecisions.CrystalReports.Engine.Table table in subrep.Database.Tables)
                            TableLogOnInfo tblInfo = new TableLogOnInfo();
                            tblInfo.ConnectionInfo = connectionInfo;
                            table.ApplyLogOnInfo(tblInfo);
                catch (Exception ex)
                    MessageBox.Show(ex.Message); 
    the objects are disposed as shown in the lines here below.
            protected override  void Dispose(bool disposing)
                try
                    if (!(crystalReportViewer.ReportSource == null))
                        ((IDisposable)(crystalReportViewer.ReportSource)).Dispose();
                        crystalReportViewer.ReportSource = null;
                    try
                        objReport.Close();
                        objReport.Dispose();
                        objReport = null;
                    catch (Exception)
                    crystalReportViewer.Dispose();
                    crystalReportViewer = null;
                catch
                if (disposing && (components != null))
                            components.Dispose();
                base.Dispose(disposing);
    public void PrintMyDoc()
                SqlConnection conn = OpenConnection();
                if (conn != null)
                    if (System.IO.File.Exists(reportName))
                        ReportDocument myReport = new ReportDocument();
                        myReport.FileName = reportName;
                        myReport.PrintOptions.PrinterName = Stampante;
                        ConnectionInfo objConn = CreateConnectionInfo (Utente, Password, conn.DataSource, conn.Database);
                        SetDBLogonForReport(objConn, myReport); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                        this.crystalReportViewer.SelectionFormula = SelectionFormula;
                        if (Preview)
                            this.crystalReportViewer.ReportSource = myReport;
                            this.crystalReportViewer.RefreshReport();
                        else
                            myReport.RecordSelectionFormula = SelectionFormula;
                            myReport.Refresh();
                            myReport.PrintToPrinter(Numcopie , false, 0, 0);
                            objReport = myReport;
                            myReport = null;
                            this.Close();
                        conn.Dispose();
                else
                    MessageBox.Show("Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    Hope someone can help me asap
    thanks

    How did you come to the conclusion that it is a problem with the UFL? If it is a problem with the UFL then there is little that we can do to troubleshoot it because the UFL is developed outside of Crystal. The code can do anything. You'd need to follow up with the person who wrote the UFL.
    If you are still unsure of the cause, then I suggest you start testing with other reports. Use ones with no database connection as a control group, then use reports that DON'T include the UFL.
    After that, you could capture a stack dump of your application and look at the results. See if you can find where a problem library file is. One thing to note, we won't look at your stack dump here. That is beyond the help we offer on forums.
    You could also look at restructuring the portion of your application that handles Crystal Reports. Instead of calling Crystal within your application, you could spawn a new process that does your reporting then shuts down. It will help to isolate the reporting to its own application space that is only run when a report is requested. It doesn't sound like reporting is a large portion of this application if you run 20 reports a day and it runs for 10 hours straight.

  • Crystal report viewer version error

    Now I am tring to call reports in crystal reports server by asp.net.  My server is crystal reports server xi, and for develop I also installed crystal report server client-side part on my develop machine, and crystal reports xi designer xi,r2.
    My program is to call the rpt files on server and show them by CrystalReportViewer control, however I get the error message below:
    Parser Error Message: The base class includes the field 'CRViewer', but its type (CrystalDecisions.Web.CrystalReportViewer) is not compatible with the type of control (CrystalDecisions.Web.CrystalReportViewer).
    Source Error:
    Line 10:     <form id="form1" runat="server">
    Line 11:     <div>
    Line 12:       <CR:CrystalReportViewer ID="CRViewer" runat="server" AutoDataBind="true" />
    Line 13:     </div>
    Line 14:     </form>
    My code is:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CRSTest._Default" %>
    <%@ Register assembly="CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
          <CR:CrystalReportViewer ID="CRViewer" runat="server" AutoDataBind="true" />
        </div>
        </form>
    </body>
    </html>
    code behind:
               ReportDocument rd = new ReportDocument();
               string sampleReportName = "MyTest";
                SessionMgr sessionMgr = new SessionMgr();
                EnterpriseSession enterpriseSession;
                EnterpriseService enterpriseService;
                InfoStore infoStore;
                InfoObjects infoObjects;
                InfoObject infoObject;
                ReportAppFactory reportAppFactory;
                // Logon to an Enterprise session.
                  enterpriseSession = sessionMgr.Logon("Administrator", "1Qaz2wsx", "MOSSDEV-COYD:6400", "secEnterprise");
                // Query for the sample report from the Enterprise CMS.
                enterpriseService = enterpriseSession.GetService("InfoStore");
                infoStore = new InfoStore(enterpriseService);
                infoObjects = infoStore.Query("Select SI_CUID From CI_INFOOBJECTS Where SI_NAME='" + sampleReportName + "' And SI_INSTANCE=0");
                infoObject = infoObjects[1];
                string reportCUID = infoObject.CUID;
                rd.EnterpriseSession = enterpriseSession;
                rd.FileName = "cecuid:///" + reportCUID;
                rd.SetDatabaseLogon("sqluser", "123456", "172.31.69.90", "AVIS_FMIS");
                CRViewer.ReportSource = rd;
    I check my assembly folder, I found three CrystalDecisions.Web dlls with different version, 11.5.3700.0, 11.5.3300.0, 10.5.3700.0, I try to refer to 11.5.3700.0 it says there is two CrystalDecisions.Web ddls exist in GAC.
    Could you tell why? and how to refer to the right dll?
    Thanks in advance

    11.5.3700.0, is CrystalDecisions.Web.dll for XIR2 and the 2.0 framework
    11.5.3300.0, is CrystalDecisions.Web.dll for XIR2 and the 1.1 Framework
    10.5.3700.0, is CrystalDecisions.Web.dll for Crystal reports basic that ships with Visual Studion2008
    all of these can co-exist in the GAC, so that part is fine.  The problem is that you most likely have multiple references to CD.Web.dll in the config file of your application... IE an additional reference was added to the <add assembly..../> tag in your web.config.
    delete all <add assembly ../> tags from web.config except the one adding 11.5.3700.0
    If you have more than one project in your solution, make sure there are no other versions of CD.Web.dll in those projects as well.

  • Crystal report for Enterprise show latest instance shows URL not found error

    hi everyone,
    we recently upgraded our BO4.1 platform from SP2 to SP5.
    after the upgrade we are getting error while view the latest instance of Crystal report in BI launchpad, this error occurs only for Crystal report and that only when we scheduled in pdf format.
    anybody faced this issue before, any idea or resolution?
    Thanks in advance.
    Regards,
    Ganesh

    when I click on view latest instance, i am getting below error.
    The requested URL /BOE/portal/1503182223/CrystalReports/filename/CREnt_BICS_STS_Check.pdf was not found on this server
    but when see the path, I could see the path till /BOE/portal/1503182223/CrystalReports/
    is it remaining path, like the “file name” part generated at runtime?
    could you please support me, do we need changes required in tomcat?
    Regards,
    Ganesh

  • Crystal report Using Push Method (OutOfMemoryException)

    Hello,
    i am developping reports using Sap Crystal reports , i am using the push method ( which uses a DataSet for binding informations with the reports) , and i want to display a large data, but i m getting an OutOfMemoryException, because of using the dataset,
    is there any solution to solve this problem?

    This is my code, and i think it's correct, i was using this code for previous versions of crystal report (cr10) and it worked fine,
    now i am using crystal report v 13 sp1 with visual studio 2010,
    When i used the Data set , the next page and zoom worked fine, but with stored procedure it doesn't work,
    Note: when i open the Tree of Data on the left,  then click on the next page or the zoom, it become funtional, it's very weird,
            protected void Page_Init(object sender, EventArgs e)
                if (!IsPostBack)
                    reportDocument = (ReportDocument)this.Page.Session["_reportDocument"];
                    if (reportDocument != null)
                            string rptFile = reportDocument.FileName.Split('
    ', '/').Last();
                            LoadReportRessource(reportDocument);
                                TableLogOnInfo log = new TableLogOnInfo();
                                ConnectionStringSettings conn = WebConfigurationManager.ConnectionStrings[0]; //la premiere connectionstring
                                SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(conn.ConnectionString);
                                log.ConnectionInfo.ServerName = SConn.DataSource;
                                log.ConnectionInfo.DatabaseName = SConn.InitialCatalog;
                                log.ConnectionInfo.UserID = SConn.UserID;
                                log.ConnectionInfo.Password = SConn.Password;
                                log.ConnectionInfo.Type = ConnectionInfoType.SQL;
                                for (int i = 0; i < reportDocument.Database.Tables.Count; i++)
                                    reportDocument.Database.Tables<i>.ApplyLogOnInfo(log);
                                for (int i = 0; i < CrystalReportViewer1.LogOnInfo.Count; i++)
                                    CrystalReportViewer1.LogOnInfo<i>.ConnectionInfo = log.ConnectionInfo;
                            CrystalReportViewer1.ParameterFieldInfo = (ParameterFields)this.Page.Session["_paramFields"];
                            CrystalReportViewer1.ReportSource = reportDocument;
                            CrystalReportViewer1.DataBind();
                            CrystalReportViewer1.ShowFirstPage();
                else
                    CrystalReportViewer1.ReportSource = (ReportDocument)this.Page.Session [ "_reportDocument" ] ;

  • Crystal Report with text(csv) data file, can we set it as input parameter?

    Hi,
    I am a new user of Crystal Reports 2008.
    I have created a report with charts in it. The input data comes from a csv text file.
    Can I set the name of this text file as an input parameter?
    as I need to generate 44 similar reports with different text filenames(and data)?
    Thank you.
    Regards

    Brian,
    Thanks much.
    I did exactly what you said.
    Just to see any change, I first gave a bad report file name just to see if I am accidentally pointing to a different file,
    but I got an error saying report not found.
    Then I renamed my original datafile name and generated a report and it still generated one without giving an error.
    Then I also gave a junk name to the logoninfo and printed that name, the new name was assigned to logoninfo, but the code did not error out.
    It ended up generating the report.
    Now here is what I think is happening,
    1) The save data in report option seems to be still on even though I have turned it off in 2 locations
    a) file -> Report Options
    b) file -> Options -> Reporting tab.
    2) For some reason the logoninfo is getting ignored as well.
    Since I did not see any answers yesterday I posted a link to this thread on the .Net forum
    Crystal Report with text(csv) data file, can we set it as input param? C#
    and Ludek Uher says that I am connecting to the text file via a DAO database engine and so need to use the same code for changing the text file as for changing an Access database.
    But the link he gave me tells me to try the same thing that we have been trying..
    Here is my plan,
    1) I will first try and find out why my save data with report option is still on ( but it shows off in Crystal ).
    2) why is LogonInfo getting ignored.
    Meanwhile any suggestions from anyone are welcome.

Maybe you are looking for

  • TS3694 Can't restore and recover iPhone 4s. Keep getting The iPhone "iPhone" could not be restored. An unknown error occurred (14). Help please!

    Please help. I simply connected my iPhone 4s to my Dell laptop (Win 8) which connected to iTunes automatically (which it normally does) and was told that I needed to update my software (I believe for both iPhone OS and iTunes). I tried to update and

  • What's the easiest way to move the location of my CS6 install?

    Hello, I recently installed CS6. However, I installed it onto a storage drive without really thinking that through. I'd much rather it be on the primary drive instead. Because the download/install/activation/update etc was such a time-consuming heada

  • Why wont BLOBS commit in forms

    I used read-image-file in a 'When-image-pressed' trigger to insert the image. It did'nt work with message '47100 - Cant read image file ...'. I noticed other images in the example tables where all around 100k so i resized mine from 900k to 100k and t

  • Inline View

    I am working in very important sector in Canada and using Oracle widely. There is a group of experienced managers and developer who discourage to use inline views. They have some reasons in addition to (may be misleading) information pass on by Oracl

  • Material view

    hi guys, i am trying to manually refresh my material view. But encounter a error message saying: ORA-00054: resource busy and acquire with NOWAITthis happen when creating the INDEX. There is a schedule refresh at 0:00 am. This refresh is database one