p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Re: ParameterPromptingEnabled


Message #1 by "Hilary Bonney" <hilary.bonney@c...> on Fri, 4 Oct 2002 10:25:38
I am also trying to pass a Boolean parameter to Crystal Report from vb6 
and have tried your code but I when I come to the Set Rep = app.openreport 
my app. options do not include a .openreport.  Have you included any 
references that are not standard?  If so could you let me know . Thanks



> I=92m trying to pass parameters using Vb6  to Crystal report. I=92m 
using
CRPEAuto Dll

My Code is:

Option Explicit
Private Rep As CRPEAuto.Report
Private winopt As CRPEAuto.PrintWindowOptions
Private Param As CRPEAuto.ParameterFieldDefinition
Private Params As CRPEAuto.ParameterFieldDefinitions

Private sub ExecuteReport()
    Dim intParamIndex As Integer
    Dim intValueType As Integer

    Set Rep =3D app.OpenReport(prmReportName)
 
    Rep.ParameterPromptingEnabled =3D False
    Set Params =3D Rep.ParameterFields

    For Each Param In Params
        intParamIndex =3D intParamIndex + 1
        Param.SetCurrentValue CStr(Trim$(arrParameters(intParamIndex)))

    Next

   
 Set Params =3D Nothing
 Set Param =3D Nothing


  Rep.ReadRecords
  Rep.DiscardSavedData

 Set View =3D Rep.Preview(, , , , , m_ReportStyle)
 Set Win =3D View.Parent


Does anybody know why I still see the prompt window???

  Return to Index