on 08-25-2015 9:14 AM
Hi,
I have downloaded the latest SDK for VS2010 :-
SAP Crystal Reprots runtime engine for .NET Framework (64-bit) 13.0.14.1720
SAP Crystal Reports, version for Microsoft Visual Studio 13.0.14.1720
I then installed the latest version of the runtime library's on Windows Server 2012 :-
SAP Crystal Reports runtime engine for .NET Framework (64-bit) 13.0.14.1720.
My web based project now runs on the new server with references to Crystal reports but when it comes to this command:-
ExportFormatType.PortableDocFormat, Response, False, "CIC Preview")
The report returns and exception:-
The system cannot find the file specified.
The strange thing is it steps over the report.load line of code because I have put traps in. I have also output the full path / filename it is trying to load and this is correct to.
Any help please as I need to transfer to the new server as soon as possible because the old one is being de-commissioned soon.
Thank you for any help,
Roger
I have used the process monitor and a search for access denied and this is what I found:-
HKU\.DEFAULT\software ACCESS DENIED
And also :-
HKLM\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\SavedData NAME NOT FOUND
Does this help in any way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One thing I haven't mentioned is to design the report I created an access database with the necessary tables so I can drop the fields on. When I print I create tables in memory and you setdatasource to those tables which I populate in code behind. This works on our old web server but no server 2012.
Hi Roger
The two out takes from ProcMon are, I suspect, a red herring. For now, let's set those aside.
My suspicion is that there is some issue reading the dataset. Before SP 14, you would have gotten a DB logon prompt. For some reason, I noticed that in SP 14, we throe this silly path error...
I'd like you to take a look at the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports - Business Intelligence (BusinessOb...
Follow the steps there, see if this points you towards a solution.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
Hi Ludek,
Thank you for the advice. I think it is definitely something to do with database paths. Some of my other reports were reporting the same message and I noticed I was setting the server to the old server name. By changing this these reports works.
My problem with my main report is when I created it I generated a temp table in access and designed the report. In code I create the temp table in memory, populate it with data and then assign this to the report so I am un-sure how to fix this.
Any help please,
Roger
I must also add that this report works fine on Windows Server 2008 R2 using version 11 of the runtimes.
Any help please Ludek or Dell. I have really hit a wall here and need to find a solution fast because I have no control on when our old server is going to be upgraded.
Many Thanks,
Desperate Roge
Well, we're close - I think...
The most likely issue is that one of the subreports is getting a dataset that it does not understand. E.g.; it's format is different than what it expects. To troubleshoot this:
1) Back up the report
2) Delete one subreport.
3) Save.
4) Alter your code to reflect the removal of the subreport.
5) Run the app.
Repeat the above until you get the app working. Then saved out the problem subreport and run it in a new test app as a main report, passing it the dataset and following the troubleshooting steps in the following wiki:
- Ludek
Hi Ludek,
Thank you for your reply. I did what you said and it works as a flat report. When I add a sub report this is where I am getting the same error message. I am setting the connection information for the sub report as below:-
With crConnectionInfo
If IO.Directory.Exists("e:\aaaaa-it") Then
.ServerName = "aaaa\aaaa
Else
.ServerName = "NEW-SERVER"
End If
.DatabaseName = "Database_HQ"
.IntegratedSecurity = True
crConnectionInfo.Type = CrystalDecisions.Shared.ConnectionInfoType.SQL
End With
crDatabase = rptCICPrint.Database
crTables = crDatabase.Tables
For Each crTable In rptCICPrint.Database.Tables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
crSections = rptCICPrint.ReportDefinition.Sections
For Each crSection As CrystalDecisions.CrystalReports.Engine.Section In crSections
Dim crReportObjects As CrystalDecisions.CrystalReports.Engine.ReportObjects = crSection.ReportObjects
For Each crReportObject As CrystalDecisions.CrystalReports.Engine.ReportObject In crReportObjects
If crReportObject.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
crSubReportObject = crReportObject
crSubreportDocument = crSubReportObject.OpenSubreport(crSubReportObject.SubreportName)
crDatabase = crSubreportDocument.Database
crTables = crDatabase.Tables
For Each crTable In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogonInfo)
iTable += 1
Next
End If
Next
Next
iTable is equal to 2 which is the number of tables in the subreport so it is getting set.
Any more ideas please?
Roger
Hi Ludek,
I have managed to resolve the problem, you was on the money with regards to connections / paths for the database.
Basically the original report was created using temp tables in Access and then in my web application create the same tables in memory, populate them with data and then run the reports. This works fine with version 11 of the SDK's but not the latest one's which I am having to use because the web server is being upgraded to Windows Server 2012.
So to resolve the problem I first created the same tables in my SQL master database and pointed the connections to them but this also did not work. I then re-wrote the report so it pointed to the SQL temp tables not Access. Again this did not work. So I removed all the connection code for the master / sub reports and hey presto it works.
Thanks again for all your help and I hope this helps others,
Regards,
Roger
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.