V17 Reports failing to load in viewer when any scripting has been added

Posted by: jnissen on 7 June 2023, 3:40 am EST

  • Posted 7 June 2023, 3:40 am EST

    Hi

    I’m having a strange issue where a subset of my reports are not loading in the .NET viewer when run from the deployed application. When running the application locally through Visual Studio I have no issues at all with viewing any of the reports I have generated. But when testing the reports through a deployed version of the application we noticed that a large subset of reports do not load in the Viewer and instead we see an error message:

    Exception details:
    System.ArgumentException: Empty path name is not legal. (Parameter 'path')
       at System.IO.Strategies.FileStreamHelpers.ValidateArguments(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share)
       at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare)
       at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation)
       at GrapeCity.ActiveReports.Core.Scripting.CodeCompiler.GenerateVBCode(String sourceCode)
       at GrapeCity.ActiveReports.Core.Scripting.CodeCompiler.GenerateCode(Language language, String sourceCode)
       at GrapeCity.ActiveReports.Core.Scripting.CodeCompiler.TryCompile(Language language, String sourceCode, String[] references, IAssemblyLoader loader, Assembly& assembly, IEnumerable`1& compilationResults, Boolean enableDebug)
       at GrapeCity.ActiveReports.SectionReport..TryCompile(Language language, String sourceCode, String[] references, Assembly& assembly, IEnumerable`1& compilationResults, Boolean enableDebug)
       at GrapeCity.ActiveReports.SectionReport..GrapeCity.ActiveReports.IScriptCompiler.TryCompile(Language language, String sourceCode, String[] references, Assembly& assembly, IEnumerable`1& compilationResults, Boolean enableDebug)
       at GrapeCity.ActiveReports.Internal..Compile()
       at GrapeCity.ActiveReports.Internal..ExecuteMethod(String methodName, Object[] parameters, Boolean& success)
       at GrapeCity.ActiveReports.SectionReport.ProcessInit(Boolean bDelayedInit)
       at GrapeCity.ActiveReports.SectionReport.RunImpl(Boolean syncDocument)
       at GrapeCity.ActiveReports.SectionReport.Run(Boolean syncDocument)
       at GrapeCity.ActiveReports.Viewer.Common.Internal.RpxReport.LoadDocument(SectionDocument document)
       at GrapeCity.ActiveReports.Viewer.Common.Internal.RdfDocumentReportBase..<LoadImpl>b__4()
       at GrapeCity.ActiveReports.Viewer.Common.Internal...<DoAsync>b__2(Object <p0>, DoWorkEventArgs <p1>)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

    When trying to determine the source of the error I found that if I open one of these reports, go to the scripting tab, and delete all code in there the report will start to load correctly in the viewer. If I then go back and add any amount of code, even a single line just importing a standard library then this error will return. Having scripting is not exclusive to these reports, I have other reports with scripting as well that do not have this issue.

    Very confused about what is causing this as there is nothing really exclusive to these reports that set them apart from the others.

  • Posted 8 June 2023, 4:04 pm EST

    Hi Joseph,

    I would suggest you to test this behavior out with the latest version of ActiveReports 17 i.e., ActiveReports 17.1.1. You may download ActiveReports 17.1.1 using the following link: Download ActiveReports

    If the issue persists then please share the following information with us so we can reproduce the issue at our end and get back to you accordingly:

    • A stripped down sample reproducing the issue
    • Steps to reproduce the issue.(Including the steps for deployment)
    • Sample report files reproducing the issue

    You could also use one of our sample available on GitHub to produce a simplified sample: JSViewer Samples

  • Posted 9 June 2023, 2:39 am EST

    Thank you for the response. I downloaded the latest version, installed it, re-published my application and am still seeing the same issue. I will work on getting a reproducible sample available to share.

  • Posted 11 June 2023, 2:54 pm EST

    Hi Joseph,

    Alright, I will be looking forward for the sample.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels