Link to home
Start Free TrialLog in
Avatar of forestincentives
forestincentives

asked on

Navigation buttons donot function properly in Embedded Crystal in a VB 2005 Webform

I been experiencing this problem off and on where the navigation buttons go for example when you click next it goes to 2nd page if you click next the nav button again it stays at the second page. The nav Previous button takes you back to first record instead of the previous Page. Is there any Code I can use to force nav buttons to page properly.I am using the crystal version right out of the box of Visual Studio 2005. I have Crystal 11 but it is buggy while passing parameters in Crystal from a Webform. I am stuck with using the version of crystal included with VS 2005 Because of one web app I wrote that somehow everything in the Crystal Form works properly.
Please Help
Avatar of frodoman
frodoman
Flag of United States of America image

Is your Crystal for VS fully patched?  I haven't heard of the problem you describe so I'm wondering if it's a bug that's been fixed.

You can create your own navigation buttons if you want to do that - the code is very simple: http://support.businessobjects.com/library/kbase/articles/c2014766.asp
Avatar of forestincentives
forestincentives

ASKER

I tried making my own custom buttons however I had the same exact result. I created a page that crystal prompted me for Customer Id Value and DB Login and then the crystal report worked the nav buttons. But I have an Web App that passes values into Crystal that works Both apps are on the same WebServer and the code is the same for both Apps.Except in the problem child I hardcoded DB,SERVERNAME,LOGIN AND PASSWORD in the .vb File. I created a DSN Connection on the successful one. I tried to use a DSN with the problem app but no luck. 500 Points Thanks
Avatar of Mike McCracken
Did you install CR XI and VS 2005 on the machine?

If so you may be having a dll clash between the versions.

You might try uninstalling both CR and VS then just reinstall VS.

mlmcc
Originally I had CR XI and VS2005 together. This caused me problems in developing the Web Apps I was assigned to create. So I just installed VS and used the bundle version of Crystal in VS 2005. I created one Web App that passes parameters into Crystal and it worked successfully on the same Webserver I created another Web App with crystal and now on the one app I have the navigation button problem. I donot want to install Crystal XI R2 Because I donot want to break the one Web App that works because it is accessed by numerous Companies online. Here is the source code maybe someone can spot a something.



Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Partial Class _Default
    Inherits System.Web.UI.Page
    Private customerBySalesNameReport As ReportDocument
    Dim crTableLogonInfo As TableLogOnInfo
    Dim crTableLogonInfos As TableLogOnInfos
    Dim crConnectionInfo As ConnectionInfo

   
    Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load
        TextBox1.Text = Request.QueryString("P1")
        ConfigureCrystalReports()
    End Sub
    Private Sub ConfigureCrystalReports()
        customerBySalesNameReport = New ReportDocument()
        crTableLogonInfos = New TableLogOnInfos()
        crTableLogonInfo = New TableLogOnInfo()
        crConnectionInfo = New ConnectionInfo()
        With crConnectionInfo
            .ServerName = "Server_4"
            .DatabaseName = "DBName"
            .UserID = "sa"
            .Password = "password"

        End With
        If TextBox1.Text = "" Then
            Response.Redirect("http://www.mycompany.com")
        End If
        Dim reportPath As String = Server.MapPath("OpenOrders.rpt")
        customerBySalesNameReport.Load(reportPath)
        crTableLogonInfo.ConnectionInfo = crConnectionInfo
        crTableLogonInfos.Add(crTableLogonInfo)
        CrystalReportViewer1.LogOnInfo = crTableLogonInfos
        CrystalReportViewer1.ReportSource = customerBySalesNameReport
        customerBySalesNameReport.SetParameterValue("Customer Number", TextBox1.Text)

        CrystalReportViewer1.DataBind()
    End Sub
   
   
   
End Class
ASKER CERTIFIED SOLUTION
Avatar of forestincentives
forestincentives

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Interesting answer.

mlmcc
No objections.
No Objections