cancel
Showing results for 
Search instead for 
Did you mean: 

Web CrystalReportViewer error when trying to go to the next page or search

Former Member
0 Kudos

Recently I've updated my solution to CrystalReports for VS2010 (now I have 13.0.2000.0 version along with .NET 4.0 and C#). When I used CrystalReports 10.5.3700.0 CrystalReportViewer was situated inside an UpdatePanel and controlled with my own toolbar and everything worked fine. After an update this stuff refused to work at all (CrystalReportViewer was simply blank) and I according to advices on this board removed all UpdatePanels and ScriptManager from my page and began to use native CrystalReportViewer toolbar. Now first page of the report is rendering properly and Print and Export buttons of the native toolbar are working fine but when i'm trying to go to the next page of a report, I see only word "Error" in the report's area.

Fiddler log for this request:

POST http://127.0.0.1:56507/reportview.aspx?report=forms_graph&from_d=01.12.2007+00%3a00%3a00&to_d=22.03.2010+23%3a59%3a59&s%5b%5d=74%2c95%2c112%2c97%2c139%2c96%2c125%2c113%2c98%2c128%2c144%2c90%2c141%2c80%2c75%2c118%2c109%2c71%2c72%2c94%2c73%2c3%2c2%2c81%2c133%2c82%2c117%2c140%2c127%2c137%2c131%2c143%2c116%2c129%2c111%2c87%2c88%2c120%2c110%2c124%2c145%2c146%2c134%2c135%2c138%2c108%2c101%2c136%2c142%2c76%2c6%2c47%2c10%2c4%2c53%2c102%2c91%2c11%2c99%2c50%2c114%2c132%2c115 HTTP/1.1
Host: 127.0.0.1:56507
Connection: keep-alive
Referer: http://ipv4.fiddler:56507/reportview.aspx?report=forms_graph&from_d=01.12.2007+00%3A00%3A00&to_d=22.03.2010+23%3A59%3A59&s%5B%5D=74%2C95%2C112%2C97%2C139%2C96%2C125%2C113%2C98%2C128%2C144%2C90%2C141%2C80%2C75%2C118%2C109%2C71%2C72%2C94%2C73%2C3%2C2%2C81%2C133%2C82%2C117%2C140%2C127%2C137%2C131%2C143%2C116%2C129%2C111%2C87%2C88%2C120%2C110%2C124%2C145%2C146%2C134%2C135%2C138%2C108%2C101%2C136%2C142%2C76%2C6%2C47%2C10%2C4%2C53%2C102%2C91%2C11%2C99%2C50%2C114%2C132%2C115

__EVENTTARGET=StatReportViewer
__EVENTARGUMENT={"0":{"rptViewLabel":"u0413u043Bu0430u0432u043Du044Bu0439 u043Eu0442u0447u0435u0442", "gpTreeCurrentExpandedPaths":{}, "vCtxt":"/wEXAwUVSXNMYXN0UGFnZU51bWJlcktub3duaAUOTGFzdFBhZ2VOdW1iZXICAQUKUGFnZU51bWJlcgIB", "pageNum":1}, "common":{"width":"350px", "Height":"", "enableDrillDown":false, "drillDownTarget":"_self", "printMode":"Pdf", "displayToolbar":true, "pageToTreeRatio":6, "pdfOCP":true, "promptingType":"html", "viewerState":"...(HUGE VIEWSTATE STUFF)...", "rptAlbumOrder":["0"], "toolPanelType":"None", "toolPanelWidth":200, "toolPanelWidthUnit":"px", "iactParams":[], "paramOpts":{"numberFormat":{"groupSeperator":" ", "decimalSeperator":","}, "dateFormat":"dd.MM.yyyy", "timeFormat":"H:mm:ss", "dateTimeFormat":"dd.MM.yyyy H:mm:ss", "booleanFormat":{"true":"u0438u0441u0442u0438u043Du0430", "false":"u043Bu043Eu0436u044C"}, "maxNumParameterDefaultValues":"200", "canOpenAdvancedDialog":true}, "zoom":100, "zoomFromUI":false, "lastRefresh":"01.09.2011 15:14:03"}, "curViewId":"0"}
__VIEWSTATE=/wEPDwUKMTY3NzU4MzI2OQ9kFgICAw9kFgICEw8XAGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFEUxvZ2luU3RhdHVzJGN0bDAxBRFMb2dpblN0YXR1cyRjdGwwMw==
StatReportViewer_toptoolbar_search_textField=Find...
text_StatReportViewer_toptoolbar_selectPg=1 of 1+
text_StatReportViewer_toptoolbar_zoom=100%

On a reloaded page I see just a text "Error" in CrystalReportViewer area and the following stack trace in html markup:

Inner Stack Trace:
   at CrystalDecisions.Shared.Json.JsonArray..ctor(JsonTokener x)
   at CrystalDecisions.Shared.Json.JsonTokener.NextValue()
   at CrystalDecisions.Shared.Json.JsonObject..ctor(JsonTokener x)
Stack Trace:
   at CrystalDecisions.Shared.Json.JsonObject..ctor(JsonTokener x)
   at CrystalDecisions.Shared.Json.JsonTokener.NextValue()
   at CrystalDecisions.Shared.Json.JsonArray..ctor(JsonTokener x)
   at CrystalDecisions.Shared.Json.JsonArray..ctor(String string_Renamed)
   at CrystalDecisions.Web.ReportAgentBase.LoadViewState(Object viewState, Boolean bRptSourceChangedByNavigation)
   at CrystalDecisions.Web.ReportAgent.LoadViewState(Object viewState, Boolean bRptSourceChangedByNavigation)
   at CrystalDecisions.Web.CrystalReportViewerBase.LoadViewState(Object viewState)
   at CrystalDecisions.Web.CrystalReportViewer.LoadViewState(Object viewState)

I don't know what additional information about this issue will be helpful. Any kind of help will be highly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

I've never seen a behavior where the word "Error" would be displayed in the report's area...

Try one of our sample apps (vbnet_web_simplepreviewreport.zip would be my suggestion) and see if you get the same behavior there. If not, what's the difference?

Sample apps are here:

https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Former Member
0 Kudos

I've never seen a behavior where the word "Error" would be displayed in the report's area...

>

Oh, it's quite simple, just leave attribute OnNavigate="CrystalReportViewer_Navigate" in Viewer declaration that will force the Viewer to reload full page and show message like this

I would like not to talk about differences now because there are too many of them (we use stored procedures with parameters for our reports, so I use

ParameterField

object to add parameters,

ConnectionInfo

to specify DB connection properties, restore

ReportDocument

object from Session and so forth).

The point is that after removing event handler attribute the behavior of ReportViewer changed and now it is using ajax POST request when I try to change page number or search.

Request:

__EVENTTARGET:
__EVENTARGUMENT:
__CRYSTALSTATEStatReportViewer:
{
"0":
{
"rptViewLabel":"u0413u043Bu0430u0432u043Du044Bu0439 u043Eu0442u0447u0435u0442",
"gpTreeCurrentExpandedPaths":{},
"vCtxt":"/wEXAwUVSXNMYXN0UGFnZU51bWJlcktub3duaAUOTGFzdFBhZ2VOdW1iZXICAQUKUGFnZU51bWJlcgIB",
"pageNum":1
},
"common":
{
"width":"350px",
"Height":"",
"enableDrillDown":false,
"drillDownTarget":"_self",
"printMode":"Pdf",
"displayToolbar":true,
"pageToTreeRatio":6,
 "pdfOCP":true,
"promptingType":"html",
"viewerState":"/(...HUGE VIEWSTATE HERE...)",
"rptAlbumOrder":["0"],
"toolPanelType":"None",
"toolPanelWidth":200,
"toolPanelWidthUnit":"px",
"iactParams":[],
"paramOpts":{"numberFormat":{"groupSeperator":" ", "decimalSeperator":","},
 "dateFormat":"dd.MM.yyyy", "timeFormat":"H:mm:ss", "dateTimeFormat":"dd.MM.yyyy H:mm:ss",
"booleanFormat":{"true":"u0438u0441u0442u0438u043Du0430", "false":"u043Bu043Eu0436u044C"},
"maxNumParameterDefaultValues":"200",
"canOpenAdvancedDialog":true
},
"zoom":100,
"zoomFromUI":false,
"lastRefresh":"02.09.2011 14:03:06"
},
"curViewId":"0"
}
__VIEWSTATE:/wEPDwUKMTY3NzU4MzI2OQ9kFgICAw9kFgICEw8XAGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFEUxvZ2luU3RhdHVzJGN0bDAxBRFMb2dpblN0YXR1cyRjdGwwMw==
searchTextBox:
StatReportViewer_toptoolbar_search_textField:u041Du0430u0439u0442u0438...
text_StatReportViewer_toptoolbar_selectPg:1 u0438u0437 1 
text_StatReportViewer_toptoolbar_zoom:100%
__CALLBACKID:StatReportViewer
__CALLBACKPARAM:{"tb":"next"}

Former Member
0 Kudos

Response:

s{'state':'{
'common':{
'width':'350px',
'Height':'',
'enableDrillDown':false,
'drillDownTarget':'_self',
'printMode':'Pdf',
'displayToolbar':true,
'pageToTreeRatio':6,
'pdfOCP':true,
'promptingType':'html',
'viewerState':'/(...HUGE VIEWSTATE HERE...)',
'rptAlbumOrder':['0'],
'toolPanelType':'None',
'toolPanelWidth':200,
'toolPanelWidthUnit':'px',
'iactParams':[],
'paramOpts':{'numberFormat':{'groupSeperator':' ','decimalSeperator':','},
'dateFormat':'dd.MM.yyyy','timeFormat':'H:mm:ss','dateTimeFormat':'dd.MM.yyyy H:mm:ss',
'booleanFormat':{'true':'u0438u0441u0442u0438u043Du0430','false':'u043Bu043Eu0436u044C'},
'maxNumParameterDefaultValues':'200',
'canOpenAdvancedDialog':true
},
'zoom':100,
'zoomFromUI':false,
'lastRefresh':'02.09.2011 14:12:59'
},
'curViewId':'0',
'0':
{
'rptViewLabel':'u0413u043Bu0430u0432u043Du044Bu0439 u043Eu0442u0447u0435u0442',
'gpTreeCurrentExpandedPaths':{},
'vCtxt':'/wEXAwUVSXNMYXN0UGFnZU51bWJlcktub3duaAUOTGFzdFBhZ2VOdW1iZXICAgUKUGFnZU51bWJlcgIC',
'pageNum':2
}
}',
'update':
{
'cons':'bobj.crv.newViewer',
'args':
{
'id':'StatReportViewer__UI',
'isDisplayModalBG':false,
'visualStyle':{'width':'350px','background':'White'},
'layoutType':'fitReport'},
'children':[
{
'cons':'bobj.crv.newExportUI',
'args':{'canSupportRange':true,'availableFormats':[{'name':'Crystal Reports (RPT)','value':'CrystalReports'},{'name':'PDF','value':'PDF'},{'name':'Microsoft Excel (97-2003)','value':'MSExcel'},{'name':'Microsoft Excel (97-2003) - u0442u043Eu043Bu044Cu043Au043E u0434u0430u043Du043Du044Bu0435','value':'RecordToMSExcel'},{'name':'u0420u0430u0431u043Eu0447u0430u044F u043Au043Du0438u0433u0430 Microsoft Excel u0442u043Eu043Bu044Cu043Au043E u0434u043Bu044F u0434u0430u043Du043Du044Bu0445','value':'RecordToMSExcel2007'},{'name':'Microsoft Word (97-2003)','value':'MSWord'},{'name':'Microsoft Word (97-2003) - u0440u0435u0434u0430u043Au0442u0438u0440u0443u0435u043Cu044Bu0439','value':'EditableRTF'},{'name':'Rich Text Format (RTF)','value':'RTF'},{'name':'u0417u043Du0430u0447u0435u043Du0438u044F u0441 u0440u0430u0437u0434u0435u043Bu0438u0442u0435u043Bu044Fu043Cu0438 (CSV)','value':'CharacterSeparatedValues'},{'name':'XML','value':'XML'}]}
},
{
'cons':'bobj.crv.newToolbar',
'args':{'visualStyle':{'className':'crtoolbar'},'id':'StatReportViewer_toptoolbar'},'children':[{'cons':'bobj.crv.newToolbarButtonGroup','args':{'id':'_btnGrp'},'children':[{'cons':'bobj.crv.newPrintButton','args':{'id':'StatReportViewer_toptoolbar_print','isDisabled':false}},{'cons':'bobj.crv.newToolbarButtonGroupSeparator'},{'cons':'bobj.crv.newExportButton','args':{'id':'StatReportViewer_toptoolbar_export','isDisabled':false}}]
},
{
'cons':'bobj.crv.newToolbarSeparator'
},
{
'cons':'bobj.crv.newSearchTextControl',
'args':{'id':'StatReportViewer_toptoolbar_search','searchText':''}
},
{
'cons':'bobj.crv.newToolbarSeparator'
},
{
'cons':'bobj.crv.newPrevPageButton',
'args':{'id':'StatReportViewer_toptoolbar_prevPg','isDisabled':false}
},
{
'cons':'bobj.crv.newNextPageButton',
'args':{'id':'StatReportViewer_toptoolbar_nextPg','isDisabled':false}
},
{
'cons':'bobj.crv.newSelectPageControl',
'args':{'curPage':2,'numPages':'2+','id':'StatReportViewer_toptoolbar_selectPg','showMenu':true}},{'cons':'bobj.crv.newZoomControl','args':{'id':'StatReportViewer_toptoolbar_zoom','initialZoom':100}},{'cons':'bobj.crv.newLogoIcon','args':{'id':'StatReportViewer_toptoolbar_logo','layoutAlign':'right'}}
]
},
{'cons':'bobj.crv.newReportAlbum','args':{'initTabIdx':-1,'displayDrilldownTab':false}}
]
},
'script':''
}

After clicking the Next page button I evidently see the popup that doesn't want to dissapear because of JS error:

Uncaught TypeError: Cannot read property 'length' of undefined

bobj.crv.ReportAlbum.update - allInOne.js:12

bobj.crv.Viewer.update - allInOne.js:12

bobj.crv.ViewerListener._onResponse - allInOne.js:12

F - allInOne.js:10

WebForm_ExecuteCallback - WebResource.axd:196

WebForm_CallbackComplete - WebResource.axd:188

So, the symptoms have changed but essence of a problem still remains the same.

former_member183750
Active Contributor
0 Kudos

Crystal Reports is not written to conform to AJAX standards so this is probably where the issue starts...

See the following for possible solutions:

[1184664 - "Print" and "Export" buttons are not working while placing Crystal Reports Viewer inside AJAX Update Panel control|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333133383334333633363334%7D.do]

[1528503 - CRVS2010 - Microsoft JScript runtime error: 'Sys.Application' is null or not an object|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533323338333533303333%7D.do]

- Ludek

Former Member
0 Kudos

Crystal Reports is not written to conform to AJAX standards so this is probably where the issue starts...

Probably no It may use any standards it likes I'm not invading in it's job at all. Error is in Crystal Reports own JS as I wrote in my last message.

> [1184664 - "Print" and "Export" buttons are not working while placing Crystal Reports Viewer inside AJAX Update Panel control|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333133383334333633363334%7D.do]

I wrote in my first message that a) I don't have Update panel or Script manager on my page; b) Print and export buttons are working on my page. The problem is in pagination, search and zoom. So, it's not about this issue, sorry

> [1528503 - CRVS2010 - Microsoft JScript runtime error: 'Sys.Application' is null or not an object|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533323338333533303333%7D.do]

I don't have this error also.

Former Member
0 Kudos

I compared two responses: the response on changing zoom factor in sample solution and the response on the same action in mine.

The response from the sample solution is as follows:

/wEWCQLc/7atBAKd5I/lCgLU3pCYBgLJusy4CwKB4e/aDQLChcKzAQK8ibSGBQKR6u+1BwKM54rGBtysP/woDQc3fF3zdX/xNMQoBr1UBjnZAWmXwtzVzduc
{
	'state':
	'{
		'common':
		{
			'width':'350px',
			'Height':'',
			'enableDrillDown':false,
			'drillDownTarget':'_self',
			'printMode':'Pdf',
			'displayToolbar':true,
			'pageToTreeRatio':6,
			'pdfOCP':true,
			'promptingType':'html',
			'viewerState':'/...(HUGE VIEWSTATE HERE)...',
			'rptAlbumOrder':['0'],
			'toolPanelType':'None',
			'toolPanelWidth':200,
			'toolPanelWidthUnit':'px',
			'iactParams':[],
			'paramOpts':
			{
				'numberFormat':{'groupSeperator':' ','decimalSeperator':','},
				'dateFormat':'dd.MM.yyyy','timeFormat':'H:mm:ss','dateTimeFormat':'dd.MM.yyyy H:mm:ss',
				'booleanFormat':{'true':'u0438u0441u0442u0438u043Du0430','false':'u043Bu043Eu0436u044C'},
				'maxNumParameterDefaultValues':'200',
				'canOpenAdvancedDialog':true
			},
		'zoom':200,
		'zoomFromUI':false,
		'lastRefresh':'06.09.2011 16:45:56'
		},
		'curViewId':'0',
		'0':
		{
			'rptViewLabel':'u0413u043Bu0430u0432u043Du044Bu0439 u043Eu0442u0447u0435u0442',
			'gpTreeCurrentExpandedPaths':{},
			'vCtxt':'/wEXAwUVSXNMYXN0UGFnZU51bWJlcktub3duZwUOTGFzdFBhZ2VOdW1iZXICAQUKUGFnZU51bWJlcgIB',
			'pageNum':1
		}
	}',
	'update':
	{
		'cons':'bobj.crv.newViewer',
		'args':
		{
			'id':'CrystalReportViewer1__UI',
			'isDisplayModalBG':false,
			'visualStyle':{'width':'350px','background':'White'},
			'layoutType':'fitReport'
		},
		'children':
		[
			{
				'cons':'bobj.crv.newExportUI','args':{'canSupportRange':true,'availableFormats':[{'name':'Crystal Reports (RPT)','value':'CrystalReports'},{'name':'PDF','value':'PDF'},{'name':'Microsoft Excel (97-2003)','value':'MSExcel'},{'name':'Microsoft Excel (97-2003) - u0442u043Eu043Bu044Cu043Au043E u0434u0430u043Du043Du044Bu0435','value':'RecordToMSExcel'},{'name':'u0420u0430u0431u043Eu0447u0430u044F u043Au043Du0438u0433u0430 Microsoft Excel u0442u043Eu043Bu044Cu043Au043E u0434u043Bu044F u0434u0430u043Du043Du044Bu0445','value':'RecordToMSExcel2007'},{'name':'Microsoft Word (97-2003)','value':'MSWord'},{'name':'Microsoft Word (97-2003) - u0440u0435u0434u0430u043Au0442u0438u0440u0443u0435u043Cu044Bu0439','value':'EditableRTF'},{'name':'Rich Text Format (RTF)','value':'RTF'},{'name':'u0417u043Du0430u0447u0435u043Du0438u044F u0441 u0440u0430u0437u0434u0435u043Bu0438u0442u0435u043Bu044Fu043Cu0438 (CSV)','value':'CharacterSeparatedValues'},{'name':'XML','value':'XML'}]}
			},
			{
				'cons':'bobj.crv.newToolbar','args':{'visualStyle':{'className':'crtoolbar'},'id':'CrystalReportViewer1_toptoolbar'},'children':[{'cons':'bobj.crv.newToolbarButtonGroup','args':{'id':'_btnGrp'},'children':[{'cons':'bobj.crv.newPrintButton','args':{'id':'CrystalReportViewer1_toptoolbar_print','isDisabled':false}},{'cons':'bobj.crv.newToolbarButtonGroupSeparator'},{'cons':'bobj.crv.newExportButton','args':{'id':'CrystalReportViewer1_toptoolbar_export','isDisabled':false}}]},{'cons':'bobj.crv.newToolbarSeparator'},{'cons':'bobj.crv.newSearchTextControl','args':{'id':'CrystalReportViewer1_toptoolbar_search','searchText':''}},{'cons':'bobj.crv.newToolbarSeparator'},{'cons':'bobj.crv.newPrevPageButton','args':{'id':'CrystalReportViewer1_toptoolbar_prevPg','isDisabled':false}},{'cons':'bobj.crv.newNextPageButton','args':{'id':'CrystalReportViewer1_toptoolbar_nextPg','isDisabled':false}},{'cons':'bobj.crv.newSelectPageControl','args':{'curPage':1,'numPages':'1','id':'CrystalReportViewer1_toptoolbar_selectPg','showMenu':true}},{'cons':'bobj.crv.newZoomControl','args':{'id':'CrystalReportViewer1_toptoolbar_zoom','initialZoom':200}},{'cons':'bobj.crv.newLogoIcon','args':{'id':'CrystalReportViewer1_toptoolbar_logo','layoutAlign':'right'}}]
			},
			{
				'cons':'bobj.crv.newReportAlbum',
				'args':{'initTabIdx':0,'displayDrilldownTab':false},
				'children':
				[
					{
						'cons':'bobj.crv.newReportView',
						'args':
						{
							'viewStateId':'0',
							'label':'u0413u043Bu0430u0432u043Du044Bu0439 u043Eu0442u0447u0435u0442',
							'isMainReport':true
						},
						'children':
						[
							{
								'cons':'bobj.crv.newReportPage',
								'args':{'width':1632,'height':2112,'documentView':'PrintLayout','content':'...(HUGE CSS & HTML HERE)...'}
							}
						]
					}
				]
			}
		]
	},
	'script':''
}

Former Member
0 Kudos

The response from my solution you can see in the message from 2nd of September (it's a response on clicking the Next page button but in doesn't make significant difference). I've noticed two major differences:

1. I have only letter 's' before JSON object in my solution but in the sample solution I have a big ViewState-like string;

2. I don't have children field in object with 'cons':'bobj.crv.newReportAlbum', but in a sample solution it has one 'cons':'bobj.crv.newReportView' child which has a 'cons':'bobj.crv.newReportPage' child with a content property in it's args field.

To my mind both of the differences can cause a error in CrystalReports JS and if you give me a tip how to debug allInOne.js I will find out what is the reason (this JS file is minified and it's a hard challenge to debug it like this). But anyway I don't make any changes in the POST response and don't have even a suggestion what can cause this differences in responses.

Edited by: osharper on Sep 6, 2011 4:18 PM

former_member183750
Active Contributor
0 Kudos

I've gone over this thread a number of times and one thing I keep coming up with; why does this error \ issue not show up for everyone else? If the JS file was incorrect, presumably everyone would be getting the same problems(?). How do I reproduce the problem here? To that end, I'd like you to replace your ALLInOne.JS file with the one attached.

Another question worth investigating; do you get the same problems if you create a new test app? Perhaps something as simple as;

CrystalReportViewer1.ReportSource = <path to a report>

- Ludek

lorenzo_comastri
Explorer
0 Kudos

Hello Ludek,

I have a very similar error in our application.

We use VS2010 with CR for VS2010 runtime sp2, reports are created with CR 2008.

The same app using CR2008 reportviewer and VS2005 works witout problems.

After moving to VS2010, reports shows up but doesn't do anything when paging or searching.

I tried a very simple app with a report containing only text, no db access.

In firefox I don't see any error even in debugging, while in ie9 I see a js error very similar to that reported by osharper.

The allnone.zip file now seems to be 0 kb, I can d/l it but it's empty, so I can't even try to replace my js files.

Any suggestion?

Former Member
0 Kudos

Hello Ludek,

We are facing a similar issue with Crystal reports in VS2010 & IE9

On VS2010, reports shows up the first page on the viewer but on paging or searching an error occurs on Allinone.Js.

It seems that the issue comes up in IE 9 Quirks mode(in IE9 Standards mode its ok)

on below function in ALLINONE.JS getLayer(A.id) returns null casuing all errors

function Widget_init(){

var A=this;

A.layer=getLayer(A.id);

  A.css=A.layer.style;

  A.layer._widget=A.widx;

if(A.initialHTML){

  A.setHTML(A.initialHTML)

}

}

Would appreciate any Help

Thanks

Former Member
0 Kudos

I am also having the same problem, exactly.  There is a problem with Crystal's Javascript.  Is there a solution.  My problem is when I page past page 2, page 2 of the report just keeps coming up.  However if I enter page 3 or 4 then those pages will come up.  I had this problem in VS2008 and a hot fix fixed the problem.

Thanks

Former Member
0 Kudos

Your link doesn't work.

Former Member
0 Kudos

former_member183750
Active Contributor
0 Kudos

I'm not sure if this will work / help, as the other thread never confirmed anything. Please do let me know how this works out for you. There are at least three other forum threads that indicate a similar issue, so this may be something to test here. Unfortunately, tests from forums are pretty low on the priority list . Anyhow, let me know how this file works out and if it does not, I'll see about doing a test on it. If it is confirmed as an issue, I'll escalate it for a fix.

Oh - you'll have to remane the file to .JS

- Ludek

Message was edited by: Ludek Uher

Former Member
0 Kudos

Tried with attached allinone.js with out any luck.

It seems that the GetLayer function returns null for the Crystal reports viewer Id

below are fields values in function Widget_init()

A.id= "RptViewer_BeamRptViewer__UI"

this

{...}

    id: "RptViewer_BeamRptViewer__UI"

    layer: null

    css: null

    getHTML: function(){var B=bobj.html;var C={overflow:"hidden",position:"relative",left:this.visualStyle.left,top:this.visualStyle.top};var A=B.DIV({dir:"ltr",id:this.id,style:C,"class":"dialogzone"},this._topToolbar?this._topToolbar.getHTML():"",this._separator?this

    beginHTML: function Widget_getHTML(){return""}

    endHTML: function Widget_getHTML(){return""}

    write: function Widget_write(A){_curDoc.write(this.getHTML(A))}

    begin: function Widget_begin(){_curDoc.write(this.beginHTML())}

    end: function Widget_end(){_curDoc.write(this.endHTML())}

    init: function(){this.initOld();this._initSignals();if(this._reportAlbum){this._reportAlbum.init()}if(this._topToolbar){this._topToolbar.init()}if(this._leftPanel){this._leftPanel.init()}if(this._statusbar){this._statusbar.init()}if(this._leftPanelResizeGrabber)

    move: function Widget_move(A,C){var B=this.css;if(A!=null){if(_moz){B.left=""+A+"px"}else{B.pixelLeft=A}}if(C!=null){if(_moz){B.top=""+C+"px"}else{B.pixelTop=C}}}

    resize: function(A,B){if(bobj.isNumber(A)){A=A+"px"}if(bobj.isNumber(B)){B=B+"px"}this.visualStyle.width=A;this.visualStyle.height=B;this._doLayout()}

    setBgColor: function Widget_setBgColor(A){this.css.backgroundColor=A}

    show: function Widget_show(A){this.css.visibility=A?_show:_hide}

    getWidth: function Widget_getWidth(){return this.layer.offsetWidth}

    getHeight: function Widget_getHeight(){return this.layer.offsetHeight}

    setHTML: function Widget_setHTML(A){var B=this;if(B.layer){B.layer.innerHTML=A}else{B.initialHTML=A}}

    setDisabled: function Widget_setDisabled(A){if(this.layer){this.layer.disabled=A}}

    focus: function Widget_focus(){safeSetFocus(this.layer)}

    setDisplay: function Widget_setDisplay(A){if(this.css){this.css.display=A?"":"none"}}

    isDisplayed: function Widget_isDisplayed(){if(this.css.display=="none"){return false}else{return true}}

    appendHTML: function Widget_appendHTML(){append(_curDoc.body,this.getHTML())}

    setTooltip: function Widget_setTooltip(A){this.layer.title=A}

    initialized: function Widget_initialized(){return this.layer!=null}

    widx: 64

    isDisplayModalBG: false

    isLoadContentOnInit: false

    layoutType: "fitReport"

    visualStyle: {...}

    widgetType: "Viewer"

    _topToolbar: {...}

    _reportAlbum: {...}

    _leftPanel: {...}

    _separator: {...}

    _print: {...}

    _export: {...}

    _promptDlg: null

    _reportProcessing: {...}

    _eventListeners: []

    _statusbar: {...}

    _leftPanelResizeGrabber: {...}

    initOld: function Widget_init(){var A=this;A.layer=getLayer(A.id);A.css=A.layer.style;A.layer._widget=A.widx;if(A.initialHTML){A.setHTML(A.initialHTML)}}

    _boundaryControl: {...}

    _modalBackground: {...}

    LayoutTypes: {...}

    PromptingTypes: {...}

    onGrabberMove: function(A){if(this._leftPanel){this._leftPanel.resize(A,null);this._doLayout()}}

    keepFocus: function(){var A=bobj.crv.params.FlexParameterBridge.getSWF(this.id);if(A){A.focus()}}

    addChild: function(A){if(A.widgetType=="ReportAlbum"){this._reportAlbum=A}else{if(A.widgetType=="Toolbar"){this._topToolbar=A;this._separator=bobj.crv.newSeparator()}else{if(A.widgetType=="Statusbar"){this._statusbar=A}else{if(A.widgetType=="PrintUI"){this._print=A}

    _onWindowResize: function(){if(this._currWinSize.w!=winWidth()||this._currWinSize.h!=winHeight()){this._doLayout();this._currWinSize.w=winWidth();this._currWinSize.h=winHeight()}}

    _initSignals: function(){var B=MochiKit.Base.partial;var D=MochiKit.Signal.signal;var A=MochiKit.Signal.connect;var C=MochiKit.Iter.forEach;if(this._topToolbar){C(["zoom","drillUp","firstPage","prevPage","nextPage","lastPage","selectPage","refresh","search","export","pr

    getLeftPanel: function(){return this._leftPanel}

    _initLeftPanelSignals: function(){var B=MochiKit.Base.partial;var D=MochiKit.Signal.signal;var A=MochiKit.Signal.connect;var C=MochiKit.Iter.forEach;if(this._leftPanel){C(["grpDrilldown","grpNodeRetrieveChildren","grpNodeCollapse","grpNodeExpand","resetParamPanel","resizeToolPan

    _isMainReportViewSelected: function(){var A=this._reportAlbum.getSelectedView();return A&&A.isMainReport()}

    _doLayoutOnLoad: function(){this.css.visibility=this._oldCssVisibility;this._doLayout()}

    _doLayout: function(){var H=this._topToolbar?this._topToolbar.getHeight():0;var D=this._topToolbar?this._topToolbar.getWidth():0;var K=this._separator?this._separator.getHeight():0;var M=this._statusbar?this._statusbar.getHeight():0;var R=this._leftPanel?this._leftPa

    _onSwitchPanel: function(A){var B=bobj.crv.ToolPanelType;if(B.GroupTree==A){MochiKit.Signal.signal(this,"showGroupTree")}else{if(B.ParameterPanel==A){MochiKit.Signal.signal(this,"showParamPanel")}else{if(B.None==A){MochiKit.Signal.signal(this,"hideToolPanel")}}}this._left

    setPageNumber: function(B,A){if(this._topToolbar){this._topToolbar.setPageNumber(B,A)}}

    showPromptDialog: function(B,A){if(!this._promptDlg){var C=MochiKit.Base.bind(this._onShowPromptDialog,this);var D=MochiKit.Base.bind(this._onHidePromptDialog,this);this._promptDlg=bobj.crv.params.newParameterDialog({id:this.id+"_promptDlg",showCB:C,hideCB:D})}this._promptD

    updatePromptDialog: function(A){A=A||"";var B=function(C,D){return function(){C.updateHtmlAndDisplay(D)}};bobj.loadJSResourceAndExecCallBack(bobj.crv.config.resources.HTMLPromptingSDK,B(this._promptDlg,A));if(bobj.isParentWindowTestRunner()){setTimeout(MochiKit.Base.partial(M

    showFlexPromptDialog: function(G,M){var B=bobj.crv.params.FlexParameterBridge;var C=bobj.crv.params.ViewerFlexParameterAdapter;if(!B.checkFlashPlayer()){var E=L_bobj_crv_FlashRequired;this.showError(E.substr(0,E.indexOf("{0}")),B.getInstallHTML());return }C.setViewerLayoutType(

    sendPromptingAsyncRequest: function(A){MochiKit.Signal.signal(this,"crprompt_asyncrequest",A)}

    setDisplayModalBackground: function(A){A=this.isDisplayModalBG||A;if(this._modalBackground){this._modalBackground.show(A)}}

    _onShowPromptDialog: function(){this._adjustWindowScrollBars();this.setDisplayModalBackground(true)}

    _onHidePromptDialog: function(){this._adjustWindowScrollBars();document.onkeypress=this._originalDocumentOnKeyPress;this.setDisplayModalBackground(false)}

    isPromptDialogVisible: function(){return this._promptDlg&&this._promptDlg.isVisible&&this._promptDlg.isVisible()}

    hidePromptDialog: function(){if(this.isPromptDialogVisible()){this._promptDlg.show(false)}}

    hideFlexPromptDialog: function(){if(this._promptDlg){if(_ie){this._promptDlg.focus()}this._promptDlg.style.visibility="hidden";this._promptDlg.style.display="none";this.setDisplayModalBackground(false);if(this._promptDlg.closeCB){this._promptDlg.closeCB()}}}

    _adjustWindowScrollBars: function(){if(_ie&&this.layoutType==bobj.crv.Viewer.LayoutTypes.CLIENT&&this._promptDlg&&this._promptDlg.layer&&MochiKit.DOM.currentDocument().body){var E,B;var A=MochiKit.DOM.currentDocument().body;var D=this._promptDlg.layer;if(this.getReportPage()&&this

    showError: function(C,A){var B=bobj.crv.ErrorDialog.getInstance();B.setText(C,A);B.setTitle(L_bobj_crv_Error);B.show(true)}

    update: function(C){if(!C||C.cons!="bobj.crv.newViewer"){return }if(C.args){this.isDisplayModalBG=C.args.isDisplayModalBG}this.hidePromptDialog();for(var A in C.children){var B=C.children[A];if(B){switch(B.cons){case"bobj.crv.newReportAlbum":if(this._reportAlbum){

    getToolPanel: function(){if(this._leftPanel){return this._leftPanel.getToolPanel()}return null}

    getParameterPanel: function(){var A=this.getToolPanel();if(A){return A.getParameterPanel()}return null}

    getReportPage: function(){if(this._reportAlbum){var A=this._reportAlbum.getSelectedView();if(A){return A.reportPage}}return null}

    scrollToHighlighted: function(){if(!this._reportAlbum){return }var A=this._reportAlbum.getSelectedView();if(A){A.scrollToHighlighted(this.layoutType.toLowerCase()==bobj.crv.Viewer.LayoutTypes.FITREPORT)}}

    addViewerEventListener: function(C,B){var A=this._eventListeners[C];if(!A){this._eventListeners[C]=[B];return }A[A.length]=B}

    removeViewerEventListener: function(E,B){var A=this._eventListeners[E];if(A){for(var D=0,C=A.length;D<C;D++){if(A[D]==B){A.splice(D,1);return }}}}

    getEventListeners: function(A){return this._eventListeners[A]}

former_member183750
Active Contributor
0 Kudos

I'll see if I can do test the issue this week. Please note that if this is a critical issue for anyone, it is best to create a phone incident to get dedicated engineer and immediate attention. Phone incidents can be created here:

http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyV...

- Ludek

Answers (3)

Answers (3)

Former Member
0 Kudos

Image Did Not Show in CrystalReportView and got error

GET http://localhost:4576/aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/d... 403 (Forbidden)bobj.crv.ReportPage.updateHTML @ allInOne.js:12bobj.crv.ReportPage.init @ allInOne.js:12bobj.crv.ReportView.init @ allInOne.js:12bobj.crv.ReportAlbum.init @ allInOne.js:12bobj.crv.Viewer.init @ allInOne.js:12bobj.crv.ViewerListener @ allInOne.js:12

please tell me , why it is not display image in crystal report viewer. same problem after host application on iis.

Thanks & Regards,

Atul Sharma

Former Member
0 Kudos

Does anyone found solution to this problem. I am facing same issue after postback event of web page. I am able to see only "Error" text in CrystalReportViewer. I am using VS 2010 with Crystal report version 13.0.2000.0. One difference is that I am using master pages as a part of web page. There is no AJAX used.

former_member183750
Active Contributor
0 Kudos

Hello Tushar

This post started with Ajax related query and that is where it should have stayed. We're now discussing issues unrelated to Ajax, so I'd like to ask you to create a new thread. Also, specify the exact version of CR you are using. 13.0.2000.0 does not give me enough information - give me the version of the crpe32.dll.

- Ludek

Former Member
0 Kudos

Hi,

Thak you for your reply. Here is new discussion thread. I hope this information will helpfule to evaluate the problem.

http://scn.sap.com/thread/3361146

- Tushar

Former Member
0 Kudos

Hello Ludek,

                  I too facing some problem.

                  When running report which hosted in web server am getting blank report.

                  I developed report using Visual Studio 2010 and Crystal Report Version : 13.0.2000.0

                  crpe32.dll Version is : 7.0.0.192

                        My OS : Windows 7 Professional 64 Bit

                 Report Working fine in my Development machine.

                 My Problem occurs only when I hosted the report to server.

             

                 And I have already Created on Question in SCN Blog.

                 Link is :

                 Hope You help me to solve this problem.

Thanks in Advance,

Udhaya Kumar

Message was edited by: UDAYA KUMAR

former_member183750
Active Contributor
0 Kudos

Well, you already got a reply from Don on the other link ( Crystal Report Displaying Blank in Hosting Server), so why ask here? E.g.; continue on with Don. BTW.; how do you know arvixe has installed the correct CR runtime? Umm, something to add for Don on the other thread....

- Ludek

Former Member
0 Kudos

Hello Ludek,

                   Thanks for your reply.

                   Sorry to again ask the question here.

                   Finally My Crystal Report Working fine.

Thanks,

Udhaya

Former Member
0 Kudos

I am also having the same problem, exactly.  There is a problem with Crystal's Javascript.  Is there a solution? My problem is when I page past page 2, page 2 of the report just keeps coming up.  However if I enter page 3 or 4 then those pages will come up.  I had this problem in VS2008 and a hot fix fixed the problem.

Thanks

Lori Latta