cancel
Showing results for 
Search instead for 
Did you mean: 

Parameters Panel Empty in Crystal Reports Web Viewer

Former Member
0 Kudos

Hi all,

I am currently working on a report with user input parameters for a web application. I am using CRforVS_13_0_19.exe on Visual Studio 2013. When I enter the parameters in, the report runs perfectly fine, but the parameter panel on the left is completely empty. I want the user to be able to re-enter new parameters and rerun the report without having to refresh the page. I have set:

Me.myCrystalReportViewer.HasToggleParameterPanelButton = True
Me.myCrystalReportViewer.EnableParameterPrompt = True
Me.myCrystalReportViewer.ToolPanelView = ToolPanelViewType.ParameterPanel
Me.myCrystalReportViewer.ReuseParameterValuesOnRefresh = True

Below is the full code I currently have with some personal information removed:

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Web


Public Class _Default
    Inherits System.Web.UI.Page
    Private myReportDoc As ReportDocument


    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        myReportDoc = New ReportDocument
        Dim strReportPath As String = "path"


        If Not IO.File.Exists(strReportPath) Then
            Throw (New Exception("Unable to locate report file:" & vbCrLf & strReportPath))
        End If


        myReportDoc.Load(strReportPath)
        myReportDoc.SetDatabaseLogon("username", "password")
        myCrystalReportViewer.ReportSource = myReportDoc


        Me.myCrystalReportViewer.HasCrystalLogo = True
        Me.myCrystalReportViewer.HasDrilldownTabs = True
        Me.myCrystalReportViewer.HasDrillUpButton = True
        Me.myCrystalReportViewer.HasExportButton = True
        Me.myCrystalReportViewer.HasGotoPageButton = True
        Me.myCrystalReportViewer.HasPageNavigationButtons = True
        Me.myCrystalReportViewer.HasPrintButton = True
        Me.myCrystalReportViewer.HasRefreshButton = True
        Me.myCrystalReportViewer.HasSearchButton = True
        Me.myCrystalReportViewer.HasToggleGroupTreeButton = True
        Me.myCrystalReportViewer.HasToggleParameterPanelButton = True
        Me.myCrystalReportViewer.ReuseParameterValuesOnRefresh = True
        Me.myCrystalReportViewer.ShowAllPageIds = False
        Me.myCrystalReportViewer.EnableDrillDown = True
        Me.myCrystalReportViewer.HasZoomFactorList = True
        Me.myCrystalReportViewer.SeparatePages = True
        Me.myCrystalReportViewer.ToolPanelView = ToolPanelViewType.ParameterPanel
        Me.myCrystalReportViewer.EnableParameterPrompt = True


    End Sub
End Class

Thanks In Advance,

Evan

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Go into the properties of the Crystal Viewer and set the Reuseparameter... property to false. It's true by default.

Don

Answers (2)

Answers (2)

Create your own button to handle the refresh and hide the viewers refresh button.

Since it is a WEB app you also need to use Sessions and Postback. Search KBA, I have a sample on how to.

Don

Former Member
0 Kudos

Hey Don,

Thanks for the reply. I have added Sessions and Postback to my code, but am still experiencing the empty parameter panel unless I refresh the page. Refreshing the page allows the user to enter parameters that were programatically set before-hand which we do not want. I think the issue has something to due with the CurrentValue not being set, but I am not certain that is the problem. This issue was not occurring when running the web form using Runtime for .NET Framework 13.0.3, but is happening when running Runtime for .NET Framework 13.0.6. Any and all help is greatly appreciated.

Thanks,

Evan

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Web


Public Class _Default
    Inherits System.Web.UI.Page
    Private myReportDoc As ReportDocument


    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            myReportDoc = New ReportDocument
            Dim strReportPath As String = "C:\source"


            myReportDoc.Load(strReportPath)
            myReportDoc.SetDatabaseLogon("user", "password")


            If (Session.Item("CrystalDocument") Is Nothing) Then
                Session.Add("CrystalDocument", myReportDoc)
            End If


            Me.myCrystalReportViewer.HasCrystalLogo = True
            Me.myCrystalReportViewer.HasDrilldownTabs = True
            Me.myCrystalReportViewer.HasDrillUpButton = True
            Me.myCrystalReportViewer.HasExportButton = True
            Me.myCrystalReportViewer.HasGotoPageButton = True
            Me.myCrystalReportViewer.HasPageNavigationButtons = True
            Me.myCrystalReportViewer.HasPrintButton = True
            Me.myCrystalReportViewer.HasRefreshButton = True
            Me.myCrystalReportViewer.HasSearchButton = True
            Me.myCrystalReportViewer.HasToggleGroupTreeButton = True
            Me.myCrystalReportViewer.HasToggleParameterPanelButton = True
            Me.myCrystalReportViewer.ReuseParameterValuesOnRefresh = True
            Me.myCrystalReportViewer.ShowAllPageIds = False
            Me.myCrystalReportViewer.EnableDrillDown = True
            Me.myCrystalReportViewer.HasZoomFactorList = True
            Me.myCrystalReportViewer.SeparatePages = True
            Me.myCrystalReportViewer.ToolPanelView = ToolPanelViewType.ParameterPanel
            Me.myCrystalReportViewer.EnableParameterPrompt = True
        End If

        myCrystalReportViewer.ReportSource = CType(Session.Item("CrystalDocument"), ReportDocument)
    End Sub
End Class
0 Kudos

We don't patch CR for VS, only available in full builds.

Download SP 19 and test again:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Don

Former Member
0 Kudos

Hey Don,

Thanks again for your help. I downloaded SP19 from the link provided and the same problems are still occurring. The parameter panel is still showing up empty and there is no parameter panel button on the sidebar next to the group tree button.

Evan