Value cannot be null. Parameter name: runtime

Posted by: khurramanis on 24 April 2018, 10:09 am EST

    • Post Options:
    • Link

    Posted 24 April 2018, 10:09 am EST - Updated 30 September 2022, 6:20 pm EST

    Trying to run report using HTML5 Viewer (v12.1.12924.0). Getting following error when we execute report (development environment). Web service is executed without any errors.

    Value cannot be null. Parameter name: runtime

    at GrapeCity.ActiveReports.Web.Runtimes.RuntimeRegistry.#dmz(IReportRuntime runtime, Guid token, Nullable

    1 lifeProlongationTime, Int32 version) at GrapeCity.ActiveReports.Web.ReportService.<>c__DisplayClassa.#zvH(IReportRuntime runtime) at GrapeCity.ActiveReports.Web.Utils.Maybe
    1.#r1[TResult](Func
    2 justMatcher, Func
    1 nothingMatcher) at GrapeCity.ActiveReports.Web.ReportService.OpenReport(Int32 version, String culture, String reportPath, ReportBinaryKind acceptedFormats, Int32 lifeTime)

  • Posted 25 April 2018, 1:31 am EST

    Hello,

    Could you please explain your issue in more detail.

    1: What type of report are you using?

    2: What type of data are you using?

    3: How are you loading the report in HTML5 Viewer?

    4: What is the purpose of the Web Service in your application?

    5: Is it working well with AR12 initial release?

    Thanks,

    Mohit

  • Posted 25 April 2018, 10:41 am EST

    I am using rdlx report. SQL server is data source, and using Webservice to dynamically set data source.

    This report is working fine in desktop application , with same active reports version.

    I haven’t tested with any earlier version. This is first time I am trying to implement HTML Viewer.

    Below is code we are using to call the report.

    
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
        <title>A sample test report</title>
    	<link href="css/bootstrap.css" rel="stylesheet">
    	<link href="css/bootstrap-datetimepicker.css" rel="stylesheet">
    	<link href="css/theme-cosmo.css" rel="stylesheet">
    	<link href="css/site.css" rel="stylesheet">
    	<link rel="stylesheet" href="GrapeCity.ActiveReports.Viewer.Html.css">
    </head>
    <body>
    	<div id="viewer" style="width:600px;height:480px;"></div>  
    
    	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    	<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    	<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.3.0/knockout-min.js" type="text/javascript"></script>
    	<script src="Scripts/GrapeCity.ActiveReports.Viewer.Html.js" type="text/javascript"></script>
    	<script type="text/javascript">
    		$(function () {
    			var viewer = GrapeCity.ActiveReports.Viewer(
    				{
    					element: '#viewer',
                        report: {
                            id: 'SystemRpts/RptSysBill.rdlx',
                            parameters: [
                                {
                                    name: 'p_ID',
                                    value: '41'
                                },
                                {
                                    name: 'p_Name',
                                    value: 'test name'
                                }
                                ,
                                {
                                    name: 'p_Tax1',
                                    value: 'GST'
                                }
                            ]
                        },
    					
    					reportService: { url: '/ReportView.asmx',},
    					uiType: 'desktop',
                        documentLoaded: function reportLoaded() {},
                        reportLoaded: function (reportInfo){} ,
      		   error: function (error) {
                            console.log("error");
                            console.log(error);
    					}
    				});
    		});
    	</script>
    	
    </body>
    </html>
    
  • Posted 26 April 2018, 2:09 am EST

    Hello,

    I have created the sample according to your requirements. Please refer the attached sample.

    If any issue occurs, please feel free to rever back.

    Thanks,

    Mohit

    Prj_HTML5WebService.zip

Need extra support?

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

Learn More

Forum Channels