Embedded Crystal Report Viewer Pops Up Enter Parameter Values After User Clicks Next Page in Viewer

Crystal Report Viewer embedded in Visual Basic 6 always promps the user for parameters after user clicks on next page in the viewer at run time.
xskydivexAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

matthewrhoadesCommented:
This could be a lot of different things.  If it is an issue that happens not when you load, but when you change records it sounds like there is something in the load event that supplies the initial variable, but is lost when the page changes.  

Check the form that calls the report viewer for the missing parameter and see how it is supplied when the form is loaded.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mlmccCommented:
What code are you using to call the report?

Are you intercepting the NEXT PAGE click?

mlmcc
0
xskydivexAuthor Commented:
Select Case gsReportName
Case "BBUP"
      'Set and pass the parameter field to the report.
        'Cycle through the ParameterFieldDefinitions collection for report
        Set Report1 = Nothing
        Set crpParamDefs = Report1.ParameterFields
   
   
    'Change the location of each DatabaseTable in the Reports DatabaseTable Collection
     
        For Each crxDatabaseTable In Report1.Database.Tables
            crxDatabaseTable.SetLogOnInfo "10.1.1.55", "master", "BC_Reports", "PondL@ke"
        Next crxDatabaseTable
       
        Report1.EnableParameterPrompting = False
        For Each crpParamDef In crpParamDefs
            With crpParamDef
                Select Case .ParameterFieldName
                    Case "@ForeCast"
                         gsForecastPeriod = Me.CboPeriod.Text
                        .SetCurrentValue gsForecastPeriod
                    Case "@DeptNo"
                         .SetCurrentValue gsDeptNo
                    Case "@CompanyID"
                        .SetCurrentValue glCurrCpnyID
                    Case "@CFiscYr"
                        .SetCurrentValue gsCurrCpnyNextBudgetYr
                    Case "@CBLedgerID"
                        .SetCurrentValue gsCurrCpnyNextBudgetLedgerID
                    Case "@PFiscYr"
                        .SetCurrentValue gsCurrCpnyCurrBudgetYr
                    Case "@PBLedgerID"
                        .SetCurrentValue gsCurrCpnyCurrBudgetLedgerID
                    Case "@PALedgerID"
                        .SetCurrentValue gsCurrCpnyCurrActBudgetLedgerID
                    Case "@F1LedgerID"
                    .SetCurrentValue gsCurrCpnyCurrProjForecast_1BudgetLedgerId
                    Case "@F2LedgerID"
                       .SetCurrentValue gsCurrCpnyCurrProjForecast_2BudgetLedgerId
                    Case "@F3LedgerID"
                      .SetCurrentValue gsCurrCpnyCurrProjForecast_3BudgetLedgerId
                    Case "@PPLedgerID"
                        .SetCurrentValue gsCurrCpnyCurrProjBudgetLedgerID
                End Select
            End With
        Next
     
        Report1.Database.Verify
        iRpt = 1
        Screen.MousePointer = vbHourglass
        frmRptPrev.CRViewer1.ReportSource = Report1
        'Enables the SCR Animation Control
        frmRptPrev.CRViewer1.EnableAnimationCtrl = True
        'Shows Report1
        frmRptPrev.CRViewer1.ViewReport
        Screen.MousePointer = vbDefault
        Unload Me
        frmRptPrev.Show 1
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

xskydivexAuthor Commented:
Are you intercepting the NEXT PAGE click?
------
I am not intercepting the NEXT PAGE click.  Click next the enter parameters box appears.  If I enter the parameters the report moves to page 2 from 1.

Now if I go to previous page(1) and then click on next.  The next page appears without prompting for parameters again.  

Then if I click on next page from 2 to go to 3 I am prompted again for parameters

and so on and so on till I get to the end of the report.
0
mlmccCommented:
I have never seen that or even heard about it.

Does this happen on all reports?

mlmcc
0
matthewrhoadesCommented:
What parameters is it prompting for?  
0
xskydivexAuthor Commented:
I have never seen that or even heard about it.

Does this happen on all reports?

mlmcc

----
Yes
0
xskydivexAuthor Commented:
matthewrhoades:
What parameters is it prompting for?  
----
All of them.
0
matthewrhoadesCommented:
If it is prompting for all of the field values on the report than you have an issue with your data source connection.

1.  Are there multiple records?
2.  What event is the above code being run under?  Is that a report load event or a current event of some sort?
0
xskydivexAuthor Commented:
matthewrhoades:If it is prompting for all of the field values on the report than you have an issue with your data source connection.

1.  Are there multiple records?
2.  What event is the above code being run under?  Is that a report load event or a current event of some sort?
--------

1.  Yes there are mult. records.
2.  Command Button Click Event.
0
xskydivexAuthor Commented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.