cancel
Showing results for 
Search instead for 
Did you mean: 

Upgraded to the lastest SDK but reports not working.

former_member1261230
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member1261230
Participant
0 Kudos

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?

former_member1261230
Participant
0 Kudos

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.

former_member183750
Active Contributor
0 Kudos

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

former_member1261230
Participant
0 Kudos

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

former_member1261230
Participant
0 Kudos

I have managed to get other reports now working. I was not setting the correct SQL server name. I have a report that works just using memory tables but my main one still does not. The only difference I can see it is has subreports. I have attached a screen shot showing the code.

former_member1261230
Participant
0 Kudos

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

former_member183750
Active Contributor
0 Kudos

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:

Troubleshooting Issues with VS .NET Datasets and Crystal Reports - Business Intelligence (BusinessOb...

- Ludek

former_member1261230
Participant
0 Kudos

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

former_member183750
Active Contributor
0 Kudos

Hi Roger

In the code you sent a screenshot of on Aug 27, you were using datasets. In the last post you are connecting the report to a database. Thus a q: how are the reports and subreports supposed to be connecting? Direct to the database or via datasets? Or both?

- Ludek

former_member1261230
Participant
0 Kudos

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

Answers (0)