Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How to suppress Crystal Reports 7 Parameter Prompt

Posted on 2007-08-10
Medium Priority
Last Modified: 2008-01-09
We're supporting a client using a VB6 application and an Access 97 database to produce Crystal Reports version 7 (Standard Edition). They require some urgent changes, including a new report. The report requires the VB app to pass a parameter to display on the page header. So far so good and no problems doing any of this. However, Crystal keeps displaying the parameter prompt prior to showing the report and we simply cannot find a way of suppressing it.

Here's how we're passing the parameter to be displayed in a Crystal parameter field named 'SelectionCriteria'

ParameterFields(0) = "SelectionCriteria;" & PValue$ & ";False"

Changing False to True also results in the parameter prompt display appearing.

Surely there must be a way of suppress this annoying popup.

Any help greatly appreciated.

Question by:dmarch100
  • 2
LVL 53

Accepted Solution

Dhaest earned 750 total points
ID: 19668468
I'm not sure that cr7 supports setParameterValue..

The following code is an example of how to use the
SetParameterValue() method in a Visual Basic.NET application:

Dim rpt As New ReportDocument
rpt.SetParameterValue("Country", "Canada")

The SetParameterValue() method can only be used to
pass a single value to a report parameter field.
It cannot be used to pass multiple or range values.


Author Comment

ID: 19668542
I don't have a problem passing/displaying/printing the parameter value... what I need to do is suppress Crystal Reports from displaying the Parameter Prompt screen
LVL 53

Expert Comment

ID: 19668562
I read somewhere that the setparametervalue automatically supresses the prompt screen

Assisted Solution

itkmanoj earned 750 total points
ID: 19668566
    Dim rptpath As String = Server.MapPath("YourReport.rpt")
            Dim oReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument

            Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = oReport.Database
            Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables
            Dim oCRTable As CrystalDecisions.CrystalReports.Engine.Table
            Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
            Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
            Dim oCREndDateParam As CrystalDecisions.Shared.ParameterField
            oCRConnectionInfo.DatabaseName = dbname
            oCRConnectionInfo.ServerName = srvname
            oCRConnectionInfo.UserID = uname
            oCRConnectionInfo.Password = pwd
            For Each oCRTable In oCRTables
                oCRTableLogonInfo = oCRTable.LogOnInfo
                oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo
                oCRTable.Location = oCRTableLogonInfo.ConnectionInfo.DatabaseName & ".dbo." & oCRTable.Name

            oReport.SetParameterValue(0, parameter1)
            oReport.SetParameterValue(1, parameter2)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question