Passing Parameters to Crystal OCX 
Author Message
 Passing Parameters to Crystal OCX



I'm loading the parameters using the following code:

    If chkPrepRpts(1).Value = vbChecked Then ' Detail report
        With crDetail ' Crystal Reports OCX control
            .ReportFileName = App.Path & "\reports\bmidetail.rpt"
            .DiscardSavedData = True


            .CopiesToPrinter = 1
            .Action = 1
        End With
    End If

When I execute this code I get prompted for values before the report runs.
How do I set this up to suppress the prompt and use the passed strings I'm
setting as the default?

Thanks

Craig



Fri, 17 Jan 2003 03:00:00 GMT  
 Passing Parameters to Crystal OCX

ParameterFields(n).  Second, if you don't want to be prompted for the
values, the last part of those lines should be TRUE instead of false.

    .ParameterFields(0) = "StartDate;" & sStartDate & ";TRUE"

HTH, Paul
--
Paul Little
San Diego, CA


Quote:


> I'm loading the parameters using the following code:

>     If chkPrepRpts(1).Value = vbChecked Then ' Detail report
>         With crDetail ' Crystal reports OCX control
>             .ReportFileName = App.Path & "\reports\bmidetail.rpt"
>             .DiscardSavedData = True


>             .CopiesToPrinter = 1
>             .Action = 1
>         End With
>     End If

> When I execute this code I get prompted for values before the report runs.
> How do I set this up to suppress the prompt and use the passed strings I'm
> setting as the default?

> Thanks

> Craig



Sat, 18 Jan 2003 03:00:00 GMT  
 Passing Parameters to Crystal OCX


get prompted for values, but the input boxes have no data in them (when I
use false I get prompted but the data I assigned programatically appears.

How do I stop the promt screen from showing?

Craig


Quote:

> ParameterFields(n).  Second, if you don't want to be prompted for the
> values, the last part of those lines should be TRUE instead of false.

>     .ParameterFields(0) = "StartDate;" & sStartDate & ";TRUE"

> HTH, Paul
> --
> Paul Little
> San Diego, CA


message



> > I'm loading the parameters using the following code:

> >     If chkPrepRpts(1).Value = vbChecked Then ' Detail report
> >         With crDetail ' Crystal reports OCX control
> >             .ReportFileName = App.Path & "\reports\bmidetail.rpt"
> >             .DiscardSavedData = True


> >             .CopiesToPrinter = 1
> >             .Action = 1
> >         End With
> >     End If

> > When I execute this code I get prompted for values before the report
runs.
> > How do I set this up to suppress the prompt and use the passed strings
I'm
> > setting as the default?

> > Thanks

> > Craig



Sat, 18 Jan 2003 03:00:00 GMT  
 Passing Parameters to Crystal OCX
I have tried this with BOTH true and false parameters, either way I still
get prompted when I call the report.  Any more ideas?

Craig


Quote:

(the

still
> get prompted for values, but the input boxes have no data in them (when I
> use false I get prompted but the data I assigned programatically appears.

> How do I stop the promt screen from showing?

> Craig




> > ParameterFields(n).  Second, if you don't want to be prompted for the
> > values, the last part of those lines should be TRUE instead of false.

> >     .ParameterFields(0) = "StartDate;" & sStartDate & ";TRUE"

> > HTH, Paul
> > --
> > Paul Little
> > San Diego, CA


> message

> > > I have a Crystal 7.0 report with two paramaters I've defines as


6.0.
> > > I'm loading the parameters using the following code:

> > >     If chkPrepRpts(1).Value = vbChecked Then ' Detail report
> > >         With crDetail ' Crystal reports OCX control
> > >             .ReportFileName = App.Path & "\reports\bmidetail.rpt"
> > >             .DiscardSavedData = True

";false"

> > >             .CopiesToPrinter = 1
> > >             .Action = 1
> > >         End With
> > >     End If

> > > When I execute this code I get prompted for values before the report
> runs.
> > > How do I set this up to suppress the prompt and use the passed strings
> I'm
> > > setting as the default?

> > > Thanks

> > > Craig



Sat, 18 Jan 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Passing parameter from Crystal OCX to a report that uses a stored procedure

2. Passing Parameters from C# to Crystal Report / Crystal Report Viewer

3. passing parameters from html to ocx

4. Passing Byref parameter to an ocx method

5. passing parameters to ocx control

6. passing parameters to OCX

7. Passing a parameter value using OCX

8. Passing parameters via CR6 ocx -- kill prompt

9. Can not pass parameters to crystal32.ocx

10. Pass an Object (a Form) as a parameter to an OCX: possible

11. parameter passing to Crystal Reports 9

12. Passing parameters to crystal report

 

 
Powered by phpBB® Forum Software