Optional Parameter in Crystal Report XI designer

Hi,
Is there a way to have parameter as optional in Crystal Reports XI ?
I am okay to have the parameter shown but I dont want it to be mandatory.

In CR XI the only way to make a parameter optional is to assign it a default value.
For example:
If it is a date range parameter then give the date range parameter a default value say '1900-01-01'. Set this by editing the parameter and clicking on 'Default Value' in the options section.
Then, in your selection criteria have logic similar to this.
If minimum({?date parameter}) = date(1900,01,01)
and minimum({?date parameter}) = maximum({?date parameter}) then
{database.date} = {database.date}
else
{database.date} in {?date parameter};
If the users do not change the default value for the date range then it will pick up all records otherwise limited to the date range.
If it is a numeric parameter then assign a value of zero and for string perhaps 'z' (make sure the default value will never be equal to a DB value) and then in the selection criteria use:
If {?parameter} = 'z' then {database.field} = {database.field}
else
{database.field} = {?parameter};

Similar Messages

  • How to make Start Date as optional parameter in Crystal reports 2011

    Hi All,
    I have existing Start Date and End Date parameter how to make them as optional parameters.
    Thanks for your help in advance!!.

    Hi Mnnica,
    There is an option 'Optional Prompt' under value options, make that as true.  Do the same for both startdate and enddate then go in Record Selection Formula and write below formula :
    If Not (hasvalue({?Startdate}) then True else {?Startdate} >= {databasedatefield}
    and
    If Not (hasvalue({?Enddate}) then True else {?Enddate} <= {databasedatefield}
    Check below screen capture for Optional Prompt options :
    -Sastry

  • Optional Prompt for Date type parameter in Crystal Report.

    Hi Every One,
    I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
    But the Type field is gray out when I was selecting list of values Dynamic.
    Please suggest.
    Thanks and Regards
    DEV

    Hi,
    Please check SAP note:
    1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
    Reports Does Not Work
    Thanks & Regards,
    Nagarajan

  • Seagate Crystal Reports ActiveX Designer error '80043ac4'

    Website slows down when users are running reports. Users start getting errors when running any crystal report. After sometime main page itself stops loading and only static html is visible. Following is one of the errors users see:
    Seagate Crystal Reports ActiveX Designer error '80043ac4'
    Invalid directory.
    /opera_mort2/report/AlwaysRequiredSteps.asp, line 54
    Other errors seen on reporting site at that time are
    Active Server pages error 'ASP 0115'
    Unexpected error
    /opera_mort2/report/rpt_level.asp
    A trappable error (C00000005) occurred in an external object. The script cannot continue running.
    authentication and network errors.
    Rebooting the Web Server temporarily fixes the issue however the error recurs again after a day or two. We are seeing this problem in both our PROD and DR server. There was no change done to either of these boxes recently.
    Also at this pint IIS was crashing. Microsoft Support analyzed the crash dumps created from IIS and came up with the following:
    "All the memory dumps captured showed the same DLL that was accessing corrupted memory. This same DLL would also be the one that had originally written to those addresses. The DLL was craxdrt.dll from Crystal Reports 8.0 ActiveX Designer, which was version 8.0.1.0 from 1/28/2000. This DLL should be updated to see if this issue has already been fixed. Other options are to recycle IIS more frequently and move to a new version of Crystal Reports."
    Here is a detailed analysis from Microsoft Support:
    The issue appears to be heap corruption. Normally these are difficult to troubleshoot, however, in this case every memory dump that I looked at had the same component involved.
    start end module name
    42b30000 4307f000 craxdrt (export symbols) craxdrt.dll
    Loaded symbol image file: craxdrt.dll
    Image path: C:\Program Files\Seagate Software\Report Designer Component\craxdrt.dll
    Image name: craxdrt.dll
    Timestamp: Fri Jan 28 15:16:46 2000 (3892235E)
    CheckSum: 0055446A
    ImageSize: 0054F000
    File version: 8.0.0.371
    Product version: 8.0.1.0
    File flags: 22 (Mask 3F) Pre-release Special
    File OS: 40004 NT Win32
    File type: 2.0 Dll
    File date: 00000000.00000000
    Translations: 1009.04b0
    CompanyName: Seagate Software, Inc.
    ProductName: Crystal Reports 8.0 ActiveX Designer.
    InternalName: CRAXDRT
    OriginalFilename: CRAXDRT.DLL
    ProductVersion: 8.0.1.0
    FileVersion: 8.0.0.371
    PrivateBuild: 8.0.0.371
    SpecialBuild: 8.0.0.371
    FileDescription: Crystal Reports ActiveX Designer Runtime Support
    LegalCopyright: Copyright (c) 1991-1999 Seagate Software, Inc. All rights reserved.
    LegalTrademarks: Copyright (c) 1991-1999 Seagate Software, Inc. All rights reserved.
    Comments: Crystal Reports for Visual Basic
    This component is from the year 2000 and needs to be updated. I searched our old cases and found several where old version of this component caused the same heap corruption.
    Please help as this is a production issue. Please let me know if you need any more information.
    thanks and regards
    sudatta soman

    Something must have changed. Were any patches or auto updates done to the OS?
    CR 8.0 has been out of the support cycle for some time now.
    As Microsoft suggested please log in and download the patches for CR 8.0 from:
    https://www.sdn.sap.com/irj/sdn/businessobjects-support
    If that does not resolve the issue the only option will be to schedule sn IIS restart each night.

  • How to use Dynamic cascading parameter in crystal Report XI ?

    Hi,
    I want to use Dynamic cascading parameter in crystal Report XI which is to be viewed through the infoview without using the Business View.Is it possible?
    I could implemented Dynamic cascading parameter using the CR XI developer without using Business View, but cannot view the report when uploaded it to BOXI, through infoview.
    Please suggest..
    Thanks in advance..
    Rajneesh

    In the crystal reports field explorer>right click on parameter field>create new-->name the parameter field and select the type as dynamic. Now in the value field click the row and add the database field also add another field below that by clicking on the next row so..on. The order should be like this parent field first and then child field next...... Also click on the last column to add parmater for each level.
    Regards,
    Raghavendra

  • Crystal Reports ActiveX Designer Failed to open document

    Yesterday I created a report in Visual Studio 2008 with about 20 subreports, each subreport containing a single aggregate query (i.e count or sum). I then saved the report file. Hours later when I attempted to reopen the report in Visual Studio I recived the message box "Crystal Reports ActiveX Designer Failed to open document". The report file was completely unusable - it could not be opened for editting.
    Today I repeated the process twice (once ith multiple subreports and once with all aggregate queries combined in a single subreport), only to have the new report files become unusable with the same error message. I am completely shocked at this behaviour from Crystal Reports. I have now spent 10+ hours with no usable report. I realy need a fix for this ASAP!!! Any suggestions would be greatlhy appreciated.

    Hi Jeff,
    Just wanted to confirm you were on SP1.
    I've found that these types of error are usually due to corrupt system files or sometimes even Anti-virus software denying access. If there is no error it's not CR corrupting the file.
    Look in your AV logs to see if it's logging anything.
    Another possibility is with MS pushing out patches they can also cause problems. I've see them change permissions on our dependencies that can cause problems.
    Sorry I can't be specific but without seeing your report or any details you'll have to determine at which step in the report it stops working.
    Can you save any reports now?
    Steps to debug, create a new report with no subreports and save it. Then re-open, if that works then start adding one subreport and then save/open. It may be something related to either the subreports or the number of subreports.
    You could try doing a repair install of VS and SP1.
    Was this working at one time or is this something new, do you have other reports that are similar that have problems?
    You need to debug the report and find out what is causing it to be corrupted. Try adding the 20th subreport and then delete it also.
    Don

  • Crystal Reports ActiveX Designer Design and Runtime Library 11.0

    Hi to all,
               I want to design the CR at runtime because depending upon the situation the SProcs return 20 or 30 or 40 columns. so am using Crystal Reports ActiveX Designer Design and Runtime Library 11.0 COM component. but i dont know how to write the code for this dll and the same time i want to bind the image also from the SQL database as BLOB. Could any body post sample code.
    Tools am using :
    Asp.Net 2.0, SQL Server 2005, Crystal Report 11.0

    You will likely need them all.
    Here's another [link|https://boc.sdn.sap.com/developer/library] to our Diamond support site which has much more info and sample code.
    Find this section:
    Sample Code
    Download sample code projects to run in your BusinessObjects Enterprise XI 3.0 and Crystal Reports 2008 development environments.
    Title (click to download) Technology Topic
    BusinessObjects Enterprise Java SDK Sample Code  Java Enterprise Administration
    Report Application Server Java SDK Sample Code  Java Crystal Reports
    Viewers Java SDK Sample Code  Java Crystal Reports
    Report Engine Java SDK Sample Code  Java Web Intelligence
    Web Services Java SDK Sample Code  Java Web Services
    Data Access Driver Java Sample Code  Java Data Access
    Crystal Reports .NET SDK Sample Code  .NET Crystal Reports
    Report Application Server .NET SDK Sample Code  .NET Crystal Reports
    Web Services .NET SDK Sample Code .NET Web Services
    Desktop Intelligence COM SDK Sample Code COM Desktop Intelligence
    Thanks again
    Don

  • Crystal Reports ActiveX Designer Design and Runtime Library 11.5

    Hai to all,
                I'm new in crystal report 11.5, my task is desig time i just create a blank report during runtime programaticaly create Fieldobject,Blob object and so on, i came to know this is the right (Crystal Reports ActiveX Designer Design and Runtime Library 11.5) dll but, i dont know how to write the code. Experts please post simple code, i tried this site https://boc.sdn.sap.com/codesamples but there is no code related my task, experts please help me.
    Softwares am using:
    Visual studio 2005, asp.net 2.0, SQL server 2005 and crystal report 11.5
    Edited by: winseelan j on Aug 21, 2008 4:03 PM

    Hello,
    You are using the wrong SDK in this case. You cannot use ADO.NET (crdb_adoplus.dll) with the RDC. It would not recognise it. RDC only supports classic ADO (crdb_oledb.dll). Report Creation APi and the RDC was designed for Visual Basic 6.0.
    To do what you are trying to do you would have to use the Report Application Server (RAS) in .NET to create your reports.
    I recommend starting by creating a simple application with the report created in the Crystal Report designer using ADO.NET(XML) driver and Visual Studio .NET code to pass the dataset at runtime so you are familiar with the code and properties before trying to create the full report in code with RAS.
    You will find more information and samples in the Developer's Library:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    The samples are at:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/sampleList.htm
    Look for "VB_Web_Data_DataSets".
    If you create a dataset you want in Visual Studio .NET, you can write it to XML or and XML Schema and use that to create the report.
            'From a dataset, create an XML file to use creating a new report
            'using the full path to the .xml file, include the schema
            dataSet.WriteXml("C:\Temp\myReportData.xml", XmlWriteMode.WriteSchema)
            'Or create a schema to use building a report
            dataSet.WriteXmlSchema("C:\Temp\myReportData.xsd")
    Once you have the report format the way you want it, you can use the Report Application Server Samples from the Developer's Help to give you direction in building your report at runtime:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/sampleList.htm
    Elaine

  • Error from the seagate Crystal Reports ActiveX Designer

    Hi guys,
    I get the following message when I running a report application based on Web. The Message is as following:
    The Error Message was Error detected by database DLL from Seagate Crystal Reports ActiveX Designer
    Internet Explorer has encountered a problem wiht an add-on and needs to close.
    the following add-on is running when this problem occured
    Add-on Name:   CRview.dll
    Company Name: Crystal Decision, Inc
    Description: Crystal Viewer for ActiveX
    I think the crystal is old version , the IE is version 7
    Thank you very much
    Clara

    OK, an upgrade of Oracle causes Crystal Reports to throw "Error detected by database DLL". It may very well be that version 8 report will not be able to run that version of Oracle. E.g.; version 8 of CR will not run Oracle 10 g for sure...
    Something to look at; can you run the report in the CR 8 designer when connecting to that updated version of Oracle?
    You'll have to locate the platforms.txt file for CR 8 and see what version of Oracle it supported. I do not have a link or even an idea of where that may be as CR 8 has been out of support for soooo long.
    Ludek

  • I am looking for Crystal reports arleady designed.

    I am looking for Crystal reports already designed.  Does anyone know where I could fine them?

    Navin,
    Thanks for the reply, I have another question you might be able to answer.
    I have a picture field (blob field) on the same line as our Product ID field (regular data field) and i want the report to show the picture that goes with that Product ID. 50% of our products dont have pictures, so when I print the report, it currently prints large empty spaces for the Products that dont have pictures and makes the report quite long and unattractive.
    I have tried to supress the field and also put the field in its own section and use a formula for supressing if the data is blank, but I get the error message that says "Can not use a BLOB field in a formula".
    I need to find a way around this. Can you, or any of your experts help?
    I could send you the report with some data in it if that would help.
    Thanks again!
    JM

  • Passing Parameter to Crystal Report

    Hi Experts,
    I have created and designed a Report in Crystal Report 2005. I am displaying the report in SAP B1 using Win Form . Here I want to pass 2 parameters to Report ---@FromDate and @ToDate . I have coded to pass these two parameters this way :
    Dim RptDoc As New ReportDocument
            Dim ParamValue As String = String.Empty
            Dim crtableLogoninfos As New CrystalDecisions.Shared.TableLogOnInfos
            Dim crtableLogoninfo As New CrystalDecisions.Shared.TableLogOnInfo
            Dim crConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
            Dim CrTables As CrystalDecisions.CrystalReports.Engine.Tables
            Dim CrTable As CrystalDecisions.CrystalReports.Engine.Table
            Try
                RptDoc.Load(Application.StartupPath() & "\" & ReportName & ".rpt")
                RptDoc.SetParameterValue("@FromDate", "01/01/2008")
                RptDoc.SetParameterValue("@ToDate", "12/31/2008")
                Dim oForm_ReportViewer As Frm_ReportViewer = New Frm_ReportViewer()
                oForm_ReportViewer.CRViewer.ReportSource = RptDoc
                With crConnectionInfo
                    .ServerName = oCompany.Server  '"(local)"
                    .DatabaseName = oCompany.CompanyDB '"SBODemoIn"
                    .UserID = oCompany.DbUserName
                    .Password = "manager@123" 'oCompany.DbPassword
                 End With
                 CrTables = RptDoc.Database.Tables
                'Loop through each table in the report and apply the
                'LogonInfo information
                For Each CrTable In CrTables
                    crtableLogoninfo = CrTable.LogOnInfo
                    crtableLogoninfo.ConnectionInfo = crConnectionInfo
                    CrTable.ApplyLogOnInfo(crtableLogoninfo)
                Next
               oForm_ReportViewer.Text = frmTitle
                oForm_ReportViewer.WindowState = FormWindowState.Maximized
                oForm_ReportViewer.ShowDialog()
            Catch Ex As Exception
                MessageBox.Show(Ex.ToString)
            End Try
      But When I view the report in B1 , it throws an Exception "Report or Procedure expects parameter @FromDate which is not    supplied. "
    Please help me where I am making mistake , what could be the cause of this exception..
    Thanks and Regards,
    Pooja Singh.

    Hi Pooja Singh,
    You have only set Dim ParamValue As String = String.Empty.  Where are two parameter @FromDate and @ToDate?
    SetParameterValue will only work if you have defined the parameters already and the parameters have the right format.
    You may check this thread:
    Re: Crystal report open instead of PLD with same form reference.
    Thanks,
    Gordon

  • 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

  • Parameter in Crystal Report 8.8

    Dear Experts,
    I'm creating a stored procedures with few parameters. When I preview the report using Crystal Report 8.8, i can set parameters to NULL and the stored procedures will know to capture all information without any filtering.
    But when i Preview External Crystal Report in SAP B1 8.8, I don't have the option to set the Parameters to NULL, and SAP B1 is expecting all Parameters must be filled up, it prompts me an error Paramenter [] is mandatory.
    Is there any setting i can do to set parameter to NULL?
    Thanks.
    Regards,
    Lay Chin

    Have you tried, the  Optional Prompt, select True in the parameter field?
    Hope this helps.
    Edited by: Denisse Calaquian on Jun 29, 2011 11:58 AM

  • DateTime Parameter in Crystal Report

    hi,
      in one of my crystal reports i'm invoking a procedure which has begin date and end date as parameters.when trying to run the report it's prompting for both date and time. my requirement is just to prompt for date and time is not required. the option of editing the parameter at the report level has been disabled since the parameters dierctly get invoked form procedure , in which i've declared the datatype as
       samp_proc(p_begin_date date,p_end_date date,p_ref_cursor in out).
    can someone help me on this.
    Thanks,
    Sailaja.k

    Hi Sailaja,
    I'm not sure if this is a known issue or if this a bug, but there are workarounds.
    Create a blank report and Insert the original report as a Subreport. Now in the Main report, create a Sttaic parameter of 'Date' type. Create a new Formula called 'Date_conv' and type this:
    Datetime({?Date_parameter})
    Place this formula on the Report Header and place the subreport on the Report Header too.
    Right-click the subreport and select Change Subrpeort Links. Select the formula and move it to the Links to area. Next, from the drop-down on the bottom left select the datetime parameter of the subreport.
    You may suppress all the other sections of the main report. The Report should now prompt for a 'Date' instead of the Date time.
    Another workaround is by creating a registry key called useDateInsteadOfDateTime. Browse to HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\DatabaseOptions and create a string value called useDateInsteadOfDateTime. Set its value as the Database Server Name or the ODBC DSN name.
    I would still recommend using the 1st workaround.
    Hope this helps!
    -Abhilash

  • HTML View Error in Crystal Report 2008 Designer

    Hi,
       I am getting an Error when i am trying to see the HTML Preview on the Crystal Report Designer. but, It is working Properly From CMC.
    I was getting the following Error.
    "Failed to access the HTML Server Page
    Contact your system administrator and make sure the BOE servers are running properly/
    Also make sure that the default viewer URL is set Properly in the CMC of BOE
    You can set the Default Viewer URL by following Steps
    1) Log into the CMC
    2) Clicl the APpplication Link.
    3) On the applications page Select CMC, CLcik the Manage menu, A=and Select Processing Settings.
    4) In the set default viewerURL, the URL Should be similarto the fllowing:
    http://[hostname]:[portnumber]/OpenDocument/Opendoc/OpenDocument.jsp?sIDType=CUID&IDocID=O%SI_CUID%"
    Kindly let me know how to resolve this issue. It was working properly. Thanks for your support in advance.
    Regards
    Shiva,

    It is still an issue for me.  I have a new install and am using WebElements to improve my reports.  I am new to 2008 Server (OEM version) so it's probably something very basic.  When I do a submit it shows a path of:
      BOE/OpenDocument/Opendoc/OpenDocument.jsp?sIDType=CUID&IDocID=O%SI_CUID%
    I don't even have a BOE folder.  My setting as instructed on the page is correct.  I have tried making changes but then the HTML preview doesn't even load the 1st page.  That leads me to believe that the link is correct regardless of what debug says.  Unlike other posts I have seen, my pages do not work in InfoView.  After hitting submit I get:
    http//servicedeskcrs:8080/OpenDocument/opendoc/openDocument.jsp?sType=rpt@sDocName=Resolution%20Report.rpt&lsSSelect1=1
    Notice that there is no : after http.  I have a feeling it is in a setting somewhere but I can't find it.

Maybe you are looking for

  • HP Officejet Pro X47 not picking up paper

    My warranty expired after one year exactly two weeks ago. Suddenly the printer has stopped printing, as it does not pick up the paper any longer. Help. The printer should still be in very good condition. The console is stuck displaying " Now Printing

  • Asant problem with some tutorials

    Hey! I have a problem with asant build in the 1.4 tutorial and the chapter with SAAJ and MyUddiPing.java. I have done the changes in BUILD.PROPERTIES (j2ee.home=c:\\sun\\appserver). I can use asant on the Hello1 example but it doesn�t work with this

  • My ON OFF button

    My ON OFF button on the phone does not work. And my phone is warranted. What should I do?

  • When combo selected, user form sholud be open

    Hi In system form, when value is selected in the combo box, at same time  user form should be opened. what is the coding for this process? can anyone help me.. Regards Bhuvana

  • HT1329 what if you do not have the computer that your iphone was connected to?

    My iPhone is backed up to my old laptop that I cannot access anymore. How do I put it on a new one?