cancel
Showing results for 
Search instead for 
Did you mean: 

CR SP26 VS2019 Parameter Panel Missing Parameters

kevin_hicks
Explorer

I have run the the update to SP26 for some reason my parameters are no longer showing up in the parameter panel on the web crystalreportviewer after the report has initially loaded. The parameter(s) is prompted initially to run the report.

As a work around I have set HasToggleParameterPanelButton= false, HasRefreshButton=true, and ReuseParameterValuesOnRefresh=false.

<CR:CrystalReportViewer ID="Report" Runat="server" AutoDataBind="true" Height="1250px" HasCrystalLogo="False" HasRefreshButton="True" HasToggleParameterPanelButton="false" BestFitPage="True" ReuseParameterValuesOnRefresh="false" ToolPanelView="None" DisplayStatusbar="True" HasToggleGroupTreeButton="false" EnableDatabaseLogonPrompt="False" PrintMode="ActiveX" />

This does show the parameter(s) as expected. My report parameters are set to editable and when you loop through the parameterfield using the code below the Usage2 values is already set to all the available values (side note, this snip came from another post, but if you try it you will get a Not Supported exception)

foreach (CrystalDecisions.Shared.ParameterField parameterField in reportDocument.ParameterFields)
{
  parameterField.ParameterFieldUsage2 = ParameterFieldUsage2.ShowOnPanel;
}

As you can see from pic here the parameter for this report is missing from the Parameter Panel. Not sure how to fix this issue. Any suggestions would be appreciated. Thinking it might be a bug. I included my code below for reference. Prior to SP25 I was clearing the parameterfieldinfo property using Report.ParameterFieldInfo.Clear() in the report init method. This might have something to do with the missing parameters, but I have no way of testing, because if I add that back I cannot get the report to load as when you click the OK on the parameter dialog the report's ajax postback just returns the parameter dialog back instead of the rendered report.

 Private crReportDoc As ReportDocument
 Private rpt As String

    Private Sub Report_Init(sender As Object, e As System.EventArgs) Handles Report.Init
        Dim exportFormatFlags As Integer = CInt(CrystalDecisions.[Shared].ViewerExportFormats.PdfFormat Or CrystalDecisions.[Shared].ViewerExportFormats.ExcelFormat)
        Report.AllowedExportFormats = exportFormatFlags
        'Report.ParameterFieldInfo.Clear() 'started causing prompt to not go away if set 'removed 12/13/19 CR SP25 & SP26
        LoadCRV()
    End Sub
    Sub LoadCRV()
        Try
            rpt = Request.QueryString("rpt")
            If rpt Is Nothing Then Response.Redirect("~/reports/crm.aspx")
            Dim rptPath As String = Nothing
            If rpt IsNot Nothing Then rptPath = Server.MapPath("~/reports/cr/" + rpt)
            If rptPath IsNot Nothing Then
                Try
                    crReportDoc = New ReportDocument
                    crReportDoc.Load(rptPath)
                    For Each rd As ReportDocument In crReportDoc.Subreports
                        crDBLogin(rd)
                    Next
                    crDBLogin(crReportDoc)
                    Report.ReportSource = crReportDoc

                    Report.RefreshReport()
                Catch ex As CrystalReportsException
                Catch ex As Exception
                End Try
            End If
        Catch ex As Exception
        End Try
    End Sub
    Private Sub cr_Unload(sender As Object, e As System.EventArgs) Handles Me.Unload
        If rpt IsNot Nothing Then
            If crReportDoc IsNot Nothing Then
                If crReportDoc.Subreports IsNot Nothing Then
                    For Each srDoc As ReportDocument In crReportDoc.Subreports
                        If srDoc IsNot Nothing Then
                            srDoc.Close()
                            'srDoc.Clone() 'idea from web post
                            srDoc.Dispose()
                            GC.Collect()
                            'GC.WaitForPendingFinalizers() 'idea from web post
                        End If
                    Next
                End If
                crReportDoc.Close()
                'crReportDoc.Clone() 'idea from web post
                crReportDoc.Dispose()
                GC.Collect()
                'GC.WaitForPendingFinalizers() 'idea from web post
            End If
            If Report IsNot Nothing Then
                Report.Dispose()
            End If
        End If
    End Sub

Notes about my upgrade:

I ran the exe as the admin as instructed. I let it install the 64bit msi. The 32bit msi was already installed, but did not get updated. I updated it manually. The VS toolbox still has the .3500 controls referenced so I removed them and added the new items (not sure if that was suppose to happen automatically). I did remove all my references in the image below and added them back which updated the project file to the .4000 dll's.

Project Specs
x86, 4.7.2 framework

kevin_hicks
Explorer
0 Kudos

So I have made some progress. I have updated my viewer to the following:

<CR:CrystalReportViewer 
           ID="crReportViewer" Runat="server" AutoDataBind="True" Height="1250px" HasCrystalLogo="False" BestFitPage="True" DisplayStatusbar="True" ToolPanelView="None" PrintMode="ActiveX"
           EnableDatabaseLogonPrompt="False" 
           ReuseParameterValuesOnRefresh="True" 
           HasRefreshButton="True" 
           HasToggleParameterPanelButton="True"
           HasToggleGroupTreeButton="True" 
           /> 

Now the parameters are showing in the parameter panel and the report is loading correctly after the original parameter prompt closes. However, now whenever there is a postback on reports that includes optional prompts in the report, the parameter prompt is shown again with just those optional parameters. He is an example of the flow.

1. Load report in web viewer that include 4 parameters, 2 of which are optional
2. Built-in viewer parameter dialog shows and only the required parameters are picked and click OK
3. Report loads in viewer correctly.
4. Any postback is fired from viewer (this example let's say you click Next Page button)
5. Built-in viewer parameter prompt appears with only the 2 optional parameters
6. You just click OK and the prompt closes, but you are still on page 1.
7. You click Next Page again, but this time when the 2 optional parameters appear you select values for both and click OK. 8. Report not loads with values set for all 4 parameters.
9. You not click Next Page again, but this time you are shown page 2 as expected.

So it appears to me something is up with the optional parameters after the initial loading of the report. Here is my code that handles my report loading. I cannot figure out what I am doing wrong. Like I said before this all worked prior to SP25. Something has changed and I am not sure what I need to do now for the optional parameters not to appear after the report is loaded unless I pick the parameter from parameter panel.

  Private crReportDoc As ReportDocument
    Private rpt As String

    Sub LoadCRV()
        Try
            rpt = Request.QueryString("rpt")
            If rpt Is Nothing Then Response.Redirect("~/reports/crm.aspx", False)
            Dim rptPath As String = Nothing
            If rpt IsNot Nothing Then rptPath = Server.MapPath("~/reports/cr/" + rpt)
            If rptPath IsNot Nothing Then
                Try
                    crReportDoc = New ReportDocument
                    crReportDoc.Load(rptPath)

                    For Each rd As ReportDocument In crReportDoc.Subreports
                        crDBLogin(rd)
                    Next
                    crDBLogin(crReportDoc)

                    crReportViewer.ReportSource = crReportDoc

                    'crReportViewer.RefreshReport()
                Catch ex As CrystalReportsException

                Catch ex As Exception

                End Try
            End If
        Catch ex As Exception

        End Try
    End Sub

    Private Sub crReportViewer_Init(sender As Object, e As EventArgs) Handles crReportViewer.Init
        Dim exportFormatFlags As Integer = CInt(CrystalDecisions.[Shared].ViewerExportFormats.PdfFormat Or CrystalDecisions.[Shared].ViewerExportFormats.ExcelFormat)
        crReportViewer.AllowedExportFormats = exportFormatFlags
        'crReportViewer.EnableParameterPrompt = False
        'Report.ParameterFieldInfo.Clear() 'started causing prompt to not go away if set 'removed 12/13/19 CR SP25 & SP26
        LoadCRV()
    End Sub

    Sub crDBLogin(ByVal rptDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Try
            Dim crCI As New CrystalDecisions.Shared.ConnectionInfo
            With crCI
                .ServerName = System.Configuration.ConfigurationManager.AppSettings("sqlserver")
                .DatabaseName = System.Configuration.ConfigurationManager.AppSettings("database")
                .UserID = System.Configuration.ConfigurationManager.AppSettings("user")
                .Password = System.Configuration.ConfigurationManager.AppSettings("pwd")
                .Type = CrystalDecisions.Shared.ConnectionInfoType.SQL
                .IntegratedSecurity = False
            End With
            For Each crTable As CrystalDecisions.CrystalReports.Engine.Table In rptDoc.Database.Tables
                Dim li As CrystalDecisions.Shared.TableLogOnInfo = crTable.LogOnInfo
                li.ConnectionInfo = crCI
                crTable.ApplyLogOnInfo(li)
                'crTable.Location = crCI.DatabaseName & ".dbo." & crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1)
            Next
            'rptDoc.SetDatabaseLogon(ConfigurationManager.AppSettings("user"), ConfigurationManager.AppSettings("pwd"), ConfigurationManager.AppSettings("sqlserver"), ConfigurationManager.AppSettings("database"))
            rptDoc.VerifyDatabase()
        Catch ex As CrystalDecisions.Shared.CrystalReportsException


        End Try
    End Sub

    Private Sub cr_Unload(sender As Object, e As System.EventArgs) Handles Me.Unload
        If rpt IsNot Nothing Then
            If crReportDoc IsNot Nothing Then
                If crReportDoc.Subreports IsNot Nothing Then
                    For Each srDoc As ReportDocument In crReportDoc.Subreports
                        If srDoc IsNot Nothing Then
                            srDoc.Close()
                            'srDoc.Clone() 'idea from web post
                            srDoc.Dispose()
                            GC.Collect()
                            'GC.WaitForPendingFinalizers() 'idea from web post
                        End If
                    Next
                End If
                crReportDoc.Close()
                'crReportDoc.Clone() 'idea from web post
                crReportDoc.Dispose()
                GC.Collect()
                'GC.WaitForPendingFinalizers() 'idea from web post
            End If

            If crReportViewer IsNot Nothing Then
                crReportViewer.Dispose()
            End If
        End If
    End Sub
kevin_hicks
Explorer
0 Kudos

And just to be clear. I can load this very same report is optional parameters in CR 2013 SP12 and after the initial parameter selection I go directly to page two without getting prompted for the optional parameter. So this would make me believe nothing is wrong with the actual report itself.

former_member752739
Discoverer
0 Kudos

Is there any resolution to this issue? I am having the same problem with my reports. Parameter panel is missing parameters.

Former Member
0 Kudos

I saw your posted comment. Please raise a new question and follow our rules of engagement: https://community.sap.com/resources/rules-of-engagement. I suggest using the "I have a similar question" option under the question to get started. Feel free to take our Q&A tutorial at: https://developers.sap.com/tutorials/community-qa.html. With these tips you'll be able to prepare questions that draw responses from our members.

Best,

Your SAP Community moderator

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Here's the KBA and Incident numbers:

2889303 - Crystal Reports for Visual Studio SP 26 - Next Page causes Optional Parameter to prompt for value

Incident 89393 / 2020 / Paging causes Optional Parameter to prompt each time

Expected to be released in SP 27 due out in April, maybe... no date set at this time.

Answers (15)

Answers (15)

0 Kudos

SP 27 is now available...

Have a great day

Don

0 Kudos

Hi Kevin,

I ran out of time getting the image update to date but I ping my Developer in R&D and he tested it as well and confirmed it works in BOE .NET but not in CR for VS so it is a regression issue.

We'll try to get it fixed in SP 27.

I'll update this post with the KBA and Incident number I create once I get it done...

Thanks for your patience... You can let your users know it will be fixed and an update should be out in April if all goes well...

Don

kevin_hicks
Explorer
0 Kudos

Sweet! Thank you for your patience with me too. 🙂

0 Kudos

Hi Kevin,

I did but Paid cases come first. This is a community and free so it's on the bottom of the list for to get to...

I did some more testing, I used VB and added postback and sessions and I too am getting the same thing.

So I'm getting a new image running and will install SP 21 and see what happens, to see if it's a regression issue or something because we changed the Flash component.

I'll ping R&D but they are in Shanghai and due to the epidemic over there they are not responding and all still home for the Chinese New Year holiday.... may be a week before I hear anything back from them....

kevin_hicks
Explorer
0 Kudos

don.williams thanks for the feedback. I understand about the paid thing. Currently I just put my load method back in the Page_Load. Rather have the paging not work, then users getting optional parameter prompts. Haha. I look forward to hearing about what you discover.

Kevin

0 Kudos

Hi Kevin,

Changing it back is not under our control, that is a specification by Microsoft as defined by the Page_Load and Page_Init.

A good explanation of how it works is here:

https://docs.microsoft.com/en-us/previous-versions...

Load should be used to preload all of the default's including PostBack methods and does not get called when you page through a report so the initial values are used. Page_Init refreshes the cached page and applies the update values, so it stays in scope. Otherwise the same values or no values are passed through the CR Next/Previous Page events.

If I get some time next week I'll do some testing as well, no one else has reported this being a problem so it's likely environmental.

Are you setting All CR Properties including log on properties in the Page_Init as well?

Try a simple test app and just page through it, with the viewer in the Page_Init section it should prompt for log on info once and then simply page through the report using Sessions/PostBack in the Page Init.

Actually if you just use these 3 lines in the Page_Init section it should prompt you for the dB log on info and then the Parameter values and then simple page through the report..

Looking closer at your test app I see now you are not using the Engine to load the report but simply using the Viewers Load event.

I'll have to find some old samples and see if does the same thing...

Don

kevin_hicks
Explorer
0 Kudos

Hey don.williams hope all is well. I had to step away from this for a few days. I wanted to answer your question on the CR properties. I just ran through my code and everything is in the page_init. See code:

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

Partial Public Class cr
    Inherits System.Web.UI.Page

    Private rpt As String
    Private rd As ReportDocument

    Private Sub cr_Init(sender As Object, e As EventArgs) Handles Me.Init
        Dim exportFormatFlags As Integer = CInt(CrystalDecisions.[Shared].ViewerExportFormats.PdfFormat Or CrystalDecisions.[Shared].ViewerExportFormats.ExcelFormat)
        crReportViewer.AllowedExportFormats = exportFormatFlags

        rpt = Request.QueryString("rpt")
        If rpt Is Nothing Then Response.Redirect("~/reports/crm.aspx", False)

       If Session("ReportName") IsNot Nothing Then
            If Session("ReportName") <> rpt Then
                Session("ReportName") = rpt
                Session("Report") = Nothing
            End If
        Else
            Session("ReportName") = rpt
        End If

        If rpt IsNot Nothing Then
            crReportViewer.ID = rpt.Replace(".rpt", "")
        End If

        LoadReport()
    End Sub
    Private Sub cr_Load(sender As Object, e As EventArgs) Handles Me.Load
        'LoadReport() ''''not using this currently
    End Sub
    Private Sub LoadReport()
        If Session("ReportName") IsNot Nothing Then
            Dim reportName = Session("ReportName").ToString()
            Dim cachedReport As String = reportName + Session.SessionID

            If Session("Report") Is Nothing Then
                rd = New ReportDocument
                rd.Load(Server.MapPath("~/reports/cr/" + reportName))

                For Each srd As ReportDocument In rd.Subreports
                    crDBLogin(srd)
                Next
                crDBLogin(rd)

                Session("Report") = rd
                'Cache.Insert(cachedReport, rd, Nothing, DateTime.MaxValue, TimeSpan.FromMinutes(20))
            Else
                rd = CType(Session("Report"), ReportDocument)
            End If

            If rd.ParameterFields.Count = 0 Then
                crReportViewer.ToolPanelView = ToolPanelViewType.None
            End If

            crReportViewer.ReportSource = rd
        End If
    End Sub
    Sub crDBLogin(ByVal rptDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Try
            Dim crCI As New CrystalDecisions.Shared.ConnectionInfo

            With crCI
                .ServerName = System.Configuration.ConfigurationManager.AppSettings("sqlserver")
                .DatabaseName = System.Configuration.ConfigurationManager.AppSettings("database")
                .UserID = System.Configuration.ConfigurationManager.AppSettings("user")
                .Password = System.Configuration.ConfigurationManager.AppSettings("pwd")
                .Type = CrystalDecisions.Shared.ConnectionInfoType.SQL
                .IntegratedSecurity = False
            End With

            For Each crTable As CrystalDecisions.CrystalReports.Engine.Table In rptDoc.Database.Tables
                Dim li As CrystalDecisions.Shared.TableLogOnInfo = crTable.LogOnInfo
                li.ConnectionInfo = crCI
                crTable.ApplyLogOnInfo(li)
            Next

            rptDoc.VerifyDatabase()
        Catch ex As CrystalDecisions.Shared.CrystalReportsException

        End Try
    End Sub
    Private Sub cr_Unload(sender As Object, e As System.EventArgs) Handles Me.Unload
        If crReportViewer IsNot Nothing Then
            crReportViewer.Dispose()
        End If
    End Sub
End Class

Based on my production code I am using the Engine. I am also using a method to logon to the database and set the EnableDatabaseLogonPrompt property to false on the viewer control.

<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="cr.aspx.vb" Inherits="MJHCRM.cr" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!doctype html>
<html lang="en">
<head>
    <title>Report Viewer</title>
</head>
<body>
    <form id="crForm" runat="server">
       <CR:CrystalReportViewer 
           ID="crReportViewer" Runat="server" AutoDataBind="True" Height="1250px" HasCrystalLogo="False" BestFitPage="True" DisplayStatusbar="False" ToolPanelView="ParameterPanel"
           EnableDatabaseLogonPrompt="False" 
           HasRefreshButton="True"
           ReuseParameterValuesOnRefresh="False"
           HasZoomFactorList="False"
           HasPrintButton="False" 
           HasDrillUpButton="False" HasDrilldownTabs="False" 
           Width="100%" BorderStyle="None" SeparatePages="True"
           />
        <asp:HiddenField runat="server" ID="current_page" />
    </form>
</body>
</html>

So I understand that you all cannot move your wiring up for the viewer back to the Page_Load method. I am thinking what happened is that the CR viewer development team overlooked how the optional parameters are loaded into state during the Page_Init. As I have stated and shown early on this thread the optional parameter state works correctly when moving my LoadReport method into Page_Load. However, when LoadReport is called from Page_Init the optional parameters get displayed on viewer postback (ie: next page, previous page, zoom, etc) I really just think the CR viewer developer team needs to give this a quick look. I just feel something to do with optional parameter state management was overlooked when migrating the code over to using Page_Init.

Thanks,
Kevin

kevin_hicks
Explorer
0 Kudos

don.williams just circling the wagon to see if saw my previous post....thanks, Kevin

0 Kudos

Hi Kevin,

Shawn tracked this with R&D and they changed the Session type so it will not work with StateServer, we don't know why but it is by design now due to corruption of the session when it is used.

Only option is to not use that session type.

Don

kevin_hicks
Explorer
0 Kudos

don.williams so I have verified that the InProc session setting works, but unfortunately we have the same issue as above in regards to the optional parameters getting shown on postback of the viewer when the viewer reportsource is loaded in the Page_Init. If you set the reportsource in the Page_Load then you don't get the parameter prompt when the viewer sends a postback, but the previous and next button don't work. Now this could actually be a bug related to R&D moving the requirement to set the ReportSource in the Page_Init instead of Page_Load. Probably something R&D overlooked when the viewer is wired up. What do you think?

0 Kudos

Hi Kevin,

That all makes sense and yes it is working as designed. MS changed the Page_Load and Page_Init, we used to use the Page_Load as default but now you do need to use the Page_Init to keep the report in scope.

I did some searching and found this in a KBA when we had a .NET version of our BOE Interface:

1729138 - Unable to serialize the session state in share point server

.....

Resolution

This error can happen if the asp.net process is in "StateServer" or "SQLServer" session mode.

To change this setting, you will need to find your web.config file for your SharePoint site and find the section titled "sessionState"

e.g.
<sessionState mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:4200"
cookieless="false"
timeout="120"/>

Change the mode to "InProc" and restart the asp.net worker process.

I'll check with Shawn, he's much more up on using Sessions and see if he has any suggestions...

He wrote that KBA but no explanation as to why you can't use it.

Other than that I suspect your only option is to not use StateServer.

Don

0 Kudos

Search for the KBA number at the end of the url, google will find it.

Please test it first.

Also, don't post the same question again...

If it's that important purchase an incident:

https://www.sapstore.com/

Community is low priority for SAP support, when I have time I come here.

This is not a support site where you can request a screen share or direct contact.

kevin_hicks
Explorer
0 Kudos

don.williams I am back. 🙂 Sorry for my previous comment, just got frustrated.

Okay, so here are some details that are relevant to our discussion.

After reading several items online related to using session to store the report, one critical footnote seems to be missing in KBA 1985571. If you are using a database or ASP.NET State Service for managing session, then serialization of the ReportDocument object will not work correctly. I am using ASP.NET State Service so that explains why was haven't been able to get the examples working. However, I was able to implement Caching which does seem to work and I made it session unique. I will show code at the end of my comments.

Unfortunately, even when I loaded the report from the cache I was still being prompted for the optional parameters when initiating a postback from the viewer (ie: zoom, page nav, etc). Now, if I move my report loading code from the Page_Init method to the Page_Load method, then the optional prompts do not show up as you would expect and you are free to set them via the ParameterPanel.

However, if I implement the report loading in the Page_Load method you end up breaking the built-in report page navigation buttons. If you had a 7 page report, then you cannot navigate past page 2. You can navigate to those pages manually using the page dropdown. So it is just the previous and next page buttons that don't work. If you look at the code below you will see that the viewinfo property is correct before you set the value for viewer.reportsource. Once you set the reportsource back to the cache the viewinfo is reset and when the Navigate method is then fired the values for current page and previous page are both 1.

Now, if you leave the report loading in the Page_Init the built-in page next and previous navigation buttons work, but only for reports that do not have optional parameters.

I have seen a few example where people have wrapped the viewer.reportsource in a IF Not IsPostback conditional and this does not work because if you do this then you get a Database Login Failed error.

So Page_Load gets rid of the optional parameter prompt, but breaks next and previous navigation when setting reportsource on postback but you cannot not do that or you get a Database Login Failed

Page_Init the next and previous buttons work when the report does not have any optional parameters.

    Private rpt As String
    Private rd As ReportDocument

    Private Sub cr_Init(sender As Object, e As EventArgs) Handles Me.Init
        rpt = Request.QueryString("rpt")
        If rpt Is Nothing Then Response.Redirect("~/reports/crm.aspx", False)

        If Session("ReportName") IsNot Nothing Then
            If Session("ReportName") <> rpt Then
                Session("ReportName") = rpt
            End If
        Else
            Session("ReportName") = rpt
        End If

        If rpt IsNot Nothing Then
'my clever way of setting the name of the export file :) crReportViewer.ID = rpt.Replace(".rpt", "") End If LoadReport() End Sub Private Sub cr_Load(sender As Object, e As EventArgs) Handles Me.Load 'LoadReport() End Sub
Private Sub LoadReport() If Session("ReportName") IsNot Nothing Then Dim reportName = Session("ReportName").ToString() Dim cachedReport As String = reportName + Session.SessionID If Cache(cachedReport) Is Nothing Then rd = New ReportDocument rd.Load(Server.MapPath("~/reports/cr/" + reportName)) For Each srd As ReportDocument In rd.Subreports crDBLogin(srd) Next crDBLogin(rd) Cache.Insert(cachedReport, rd, Nothing, DateTime.MaxValue, TimeSpan.FromMinutes(20)) Else rd = CType(Cache(cachedReport), ReportDocument) End If

Dim vi As ViewInfo = crReportViewer.ViewInfo 'vi.PageNumber is right untill reportsource is set on page navigation postback and thus wrong when navigate event is fired
'If Not IsPostBack Then
crReportViewer.ReportSource = rd ' End If End If End Sub
0 Kudos

OK, I see what you are doing. I set both parameters values which is the way it should work.

What you are doing is leaving the param empty, even though your text says optional it's not.

CR still needs a value even though it's set as optional.

Next issue is because it's a parameter you need to use sessions and PostBack so when you page it uses the existing values and not prompt for new ones.

so you need to use this:

https://launchpad.support.sap.com/#/notes/1985571

Don

kevin_hicks
Explorer
0 Kudos

don.williams the color parameter is an optional parameter prompt. Please look at the report and you will see this. I added that label in the report itself. See snip below. Crystal viewer should not need the optional parameter to load the report. If it did then you would not be able to click OK on the first parameter prompt that loads. Currently if you click OK without anything selected the built-in view just shows that the name parameter is required. If you select the name prompt the report does load when clicking OK.

Also, I cannot access the link you included. See snip below.

If you would like to jump on a screen share to discuss this further it might be helpful. Feel like we are just going back and forth. Let me know.

Thanks,

Kevin

kevin_hicks
Explorer
0 Kudos

don.williams I was going to send you a direct message chat request, but I guess you need to start that from your end. Thanks, Kevin

0 Kudos

Video link no longer works.

Your test app works for me so it's environmental on your system likely causing the problem.

Parameter prompts are handled by js files in the Viewer folder:

C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13\js

Note there is a new Parameter reference in the project you need to use. So remove the old Flash component from your references, then it should work again for you.

kevin_hicks
Explorer
0 Kudos

Try video again please. Changed privacy setting.

https://vimeo.com/383845145

Not using flash. What is parameter reference you are talking about?

Video shows the issue I’m experiencing. Hopefully you can view it and repeat the issue on your end.

Thanks,

Kevin

0 Kudos

Hi Kevin,

Thanks for the test app andf the viewer warning.

So I copied the CR viewer folder into the AppData folder:

C:\inetpub\wwwroot\CrystalReportsWebSite12\CrystalReportsWebSite1\App_Data\crystalreportviewers13

It works for me:

Use Fiddler and see where it's trying to load the various CR resources from.

The JS file it's not finding is in here:

C:\inetpub\wwwroot\CrystalReportsWebSite12\CrystalReportsWebSite1\App_Data\crystalreportviewers13\prompting\js

Thanks again

Don

kevin_hicks
Explorer
0 Kudos

don.williams I have made a quick video to make sure we are both on the same page. Still feel like we are looking at a bug here.

Video link

Thanks, Kevin

kevin_hicks
Explorer
0 Kudos

don.williams did you have a chance to watch my video in above post? I am assuming you did and were able to replicate the issue at hand. If so, any timeline on a possible fix or work-around?

Thanks,
Kevin

kevin_hicks
Explorer
0 Kudos

don.williams hate to keep bugging you, no pun intended, haha. I assume at this point something is in in the works about the bug I have identified in my video and sample solution. Could you please provide some kind of update so I can respond to my team accordingly?

Thanks,
Kevin

0 Kudos

Yes, monitor the web server

kevin_hicks
Explorer
0 Kudos

Ok don.williams I have run the processmonitor, but I have no clue what I am looking for. I ran it just on iisexpress and only when I clicked the next page button in the crystal report viewer and when it prompted for the optional parameters I clicked stop on the process montior. Captured 42000 events. Should I filter those events with just SAP in the path? I am going to start reviewing now just to see if I can find anything that makes sense.

Also, I added two additional notes to the main question. I am starting to believe this might a bug related to handling optional prompts (parameters). Thanks for the help so far!

kevin_hicks
Explorer
0 Kudos

don.williams so now I am really thinking this might be a bug with SP26. Will you please see if you can reproduce the optional prompt issue?

I have attached a sample project. (sample project here) This project was created using the crystal reports website template. I have one test.rpt file. Run the project and select the Name property only. Once report loads, then click next page. You should get a prompt for Color which is the optional parameter. If you just hit ok, then window closes but still on page 1. If you select a color it updates the report, but still on page 1. Only then can you click next page and page 2 will load.

My project is a web app and this a newer website project, so I am convinced it has to be a bug. Hopefully you will get the same results.

Don't forget to add the asp_net virtual directory to the vs/applicationhost.config file so the viewer loads. I also updated the physicalPath, but you might have to update that too if VS doesn't do it for you.

0 Kudos

just add your EXE to the filter...

kevin_hicks
Explorer
0 Kudos

This is a web app, what process do I need to monitor, IIS Express or something else?

0 Kudos

Theres's been updates to resources. Try ProcessMonitor and see what it's looking for.

kevin_hicks
Explorer
0 Kudos

Do you have a good link on how to use that tool?

0 Kudos

Are you using Sessions and Postback to keep the report in scope?

See this KBA:

https://launchpad.support.sap.com/#/notes/1985571

Don

kevin_hicks
Explorer
0 Kudos

Strange since I have never had an issue prior to SP25. Is this a new thing? Also, I tried setting my ReportDocument to the sesssion, but get this exception.

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

Caused By: System.NotSupportedException Not supported within subreports

0 Kudos

Don't install the 32 bit MSI on your DEV PC, not required. Just install the EXE.

Make sure the Viewer was updated as well to 13.0.4000.0

kevin_hicks
Explorer
0 Kudos

Don, thanks for the response. I went ahead and uninstalled the 32 bit MSI. All references are using 13.0.4000.0. Removed all project references and added them back as instructed in the wiki. Here is my complete viewer code. I went ahead and switched HasToggleParam and ReuseParam values back to true and false, but the values still do not appear on the parameter panel.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="cr.aspx.vb" Inherits="MJHCRM.cr" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!doctype html>
<html lang="en">
<head>
    <title>CR Viewer</title>
</head>
<body>
    <form id="crForm" runat="server">
       <CR:CrystalReportViewer ID="Report" Runat="server" AutoDataBind="true" Height="1250px" HasCrystalLogo="False" HasRefreshButton="True" HasToggleParameterPanelButton="true" BestFitPage="True" ReuseParameterValuesOnRefresh="true" ToolPanelView="None" DisplayStatusbar="True" HasToggleGroupTreeButton="false" EnableDatabaseLogonPrompt="False" PrintMode="ActiveX"  />
    </form>
</body>
</html>