Crystal report navigation

I have a Crystal report that displays the result of two linked dropdownlists. The dropdownlist and report sub are nested in the page.ini sub while I have nothing in the page.load sub.
When i click the navigation button to go to the next page my report disapear. Can you help me to fix that? Here is my code:

Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        If Not IsPostBack Then
            If Not Session("SUBCATID") Is Nothing Then
                FillCat()
                ConfigureCrystalReports()
                ShowRept()
            Else
                FillCat()
                ConfigureCrystalReports()
            End If
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

 Private Sub ConfigureCrystalReports()
        CrystalReportViewer.HasPageNavigationButtons = True
        'CrystalReportViewer.ToolbarImagesFolderUrl = "~/Images"
        CrystalReportViewer.HasExportButton = False
        CrystalReportViewer.HasCrystalLogo = False
        CrystalReportViewer.HasToggleGroupTreeButton = False
        CrystalReportViewer.HasViewList = False
        CrystalReportViewer.HasPrintButton = False
        CrystalReportViewer.HasDrillUpButton = False
        CrystalReportViewer.HasSearchButton = False
        CrystalReportViewer.HasGotoPageButton = False
        CrystalReportViewer.HasZoomFactorList = False
        CrystalReportViewer.DisplayToolbar = True
        CrystalReportViewer.BorderWidth = 2
        CrystalReportViewer.BorderColor = Drawing.Color.DarkGreen
        CrystalReportViewer.DisplayGroupTree = False
        CrystalReportViewer.DisplayPage = True
        CrystalReportViewer.BestFitPage = True
    End Sub

 Sub ShowRept()
        Dim cryRpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
        Dim CrTable As CrystalDecisions.CrystalReports.Engine.Table
        Dim crtableLogoninfos As CrystalDecisions.Shared.TableLogOnInfo
        cryRpt.Load(Server.MapPath("~/CrystalReports/Catalogue1.rpt"), CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy)

        For Each CrTable In cryRpt.Database.Tables
            crtableLogoninfos = CrTable.LogOnInfo
            With crtableLogoninfos.ConnectionInfo
                .ServerName = "MYSERVER"
                .DatabaseName = "MYDB"
                .UserID = "sa"
                .Password = "12345"
            End With
            CrTable.ApplyLogOnInfo(crtableLogoninfos)
        Next CrTable

             Dim crParameterFieldDefinitions As ParameterFieldDefinitions
        Dim crParameterFieldDefinition As ParameterFieldDefinition
        Dim crParameterValues As New ParameterValues
        Dim crParameterDiscreteValue As New ParameterDiscreteValue

       
        crParameterDiscreteValue.Value = ddlSubCat.SelectedValue.ToString
        crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields
        crParameterFieldDefinition = crParameterFieldDefinitions.Item("@SUBCATID")
        crParameterValues = crParameterFieldDefinition.CurrentValues

        crParameterValues.Clear()
        crParameterValues.Add(crParameterDiscreteValue)
        crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)

        CrystalReportViewer.ReportSource = cryRpt
        btnPrnt.Visible = True
        btnPDF.Visible = True
    End Sub
pascalmartinAsked:
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.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
1
pascalmartinAuthor Commented:
Hi,
Please give me few day for implementing your solution, I have been extremely busy and not sitting at my desk for a while.
Best regards,
0
pascalmartinAuthor Commented:
Hi Ido,
I have been able to place the report into a session, but when I click on the navigation button the report disappear and only reappear with the next page after a postback.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

mlmccCommented:
Yes, navigation does do a postback which has to be handled in the code. I am not a .Net programmer so I don't know how to handle it.

mlmcc
0
pascalmartinAuthor Commented:
Can you clean up this question as no valid resolution was provided
0
pascalmartinAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for pascalmartin's comment #a41422545

for the following reason:

Self resolution of the problem
0
mlmccCommented:
How did you resolve the issue?

mlmcc
0
mlmccCommented:
You were given one possible solution which you never really addressed as to if it works or not.  There was also a comment that agreed you do get a postback and you have to handle it to get to the next page of the report.

WHat is your solution to the issue?

If there is no solution in the comments (yours or the experts) this question is useless and should be deleted.

mlmcc
0
pascalmartinAuthor Commented:
I solved the issue in the Page_Init and the page Page Load as following and didn't need to place the report DS in a session.

  Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        If Not IsPostBack Then
            If Not Session("SUBCATID") Is Nothing Then
                FillCat()
                ConfigureCrystalReports()
                ShowRept()
            Else
                FillCat()
                ConfigureCrystalReports()
            End If
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If chkPrice.Checked Then
                chkPrice.Text = "Hide prices"
            Else
                chkPrice.Text = "Show prices"
            End If
        Else
            If Session("SUBCATID") Is Nothing Then
                Return
            Else
                ShowRept()
            End If
        End If
    End Sub
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:
There is now a solution in the question.

It also appears you took my advice and handled the postback to solve the issue.

mlmcc
0
pascalmartinAuthor Commented:
I solved the issue on my own no other solution offered could resolve the problem.
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
Crystal Reports

From novice to tech pro — start learning today.