cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports on Windows 10 64-bit using CR13 runtimes fails

0 Kudos

Hello,

I am facing an issue to generate the reports in 64-bit OS. I am using CR13 .Net runtimes. Same code works with 32-bit not a problem at all, but 64-bit it throws an exception "A first chance exception of type 'CrystalDecisions.CrystalReports.Engine.DataSourceException' occurred in CrystalDecisions.ReportAppServer.DataSetConversion.dll".

Things to be noted:

1. I face this issue with both dataset and when connecting to the database.

2. Following is the source code we use a C++ Windows application and use Managed CLR project to call the crystal .Net APIs:

	reportDoc->ReportOptions->EnableSavePreviewPicture = false;
	reportDoc->ReportOptions->EnableUseIndexForSpeed = true;
	reportDoc->ReportOptions->EnableSaveDataWithReport = false;
	CrystalDecisions::Shared::ExportOptions ^exportOpts = reportDoc->ExportOptions;
	CrystalDecisions::Shared::DiskFileDestinationOptions ^diskOpts = exportOpts->CreateDiskFileDestinationOptions();
	diskOpts->DiskFileName = gcnew System::String(filePath);
	exportOpts->ExportDestinationOptions = diskOpts;
	exportOpts->ExportDestinationType = CrystalDecisions::Shared::ExportDestinationType::DiskFile;
	SetPDFExportOptions(exportOpts);//Function is defined below for reference
	reportDoc->Export(exportOpts);//This is where I get an exception
	void SetPDFExportOptions(CrystalDecisions::Shared::ExportOptions ^exportOpts)
	{
		exportOpts->ExportFormatType = CrystalDecisions::Shared::ExportFormatType::PortableDocFormat;
		CrystalDecisions::Shared::PdfFormatOptions ^pdfFormatOptions = exportOpts->CreatePdfFormatOptions();
		pdfFormatOptions->UsePageRange = false;
		exportOpts->ExportFormatOptions = pdfFormatOptions;
	}

Can anyone help out?

Thanks,

Jai

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Jai,

What I suggest for new comers is to open reports in CR Designer, full version not the one embedded in VS. In your case open the report and set DB location in the DB menu, select the TTX if you have it if not then select the XML file, requires the Schema to be embedded in it also. Then Verify, if anything doesn't match a Mapping pop up will show up, fix your data source.

Be default when you did select ttx a default dummy set of data was used until the data file was found.

Play with the designer first, .NET SDK uses the same features so the work flow is the same. Once you get one report converted search for this KBA -

1553921Is there a utility that would help in writing database logon code?

Run the app and it will generate the connection info required to convert the reports data source in code. Then use a Flag to show if the reports been converted, if it has don't jump into that routine. If it hasn't then save it as a new file and/or use it from now on...

Lot's of sample code out there, main download WIKI has 2 samples also, one for parameters, which has log on code, and one for printing...

Don

Answers (9)

Answers (9)

0 Kudos

Thanks Don.

I am very much new to Crystal reports, the current scenario in my organization we use .ttx files to design the report(.rpt file) but these .ttx files are never deployed to the customer. I have the following doubts just to understand how was is it used:

1. Are they only used in designing phase?

2. Are they embedded into the reports during the initial phase?

I know there is no more support provided for the same, but still I am in the process of converting the .ttx files into xsd to give 64-bit support and we have a very large set of reports, want to do the minimal possible changes.

3. Is there a tool to convert the ttx file to xsd?

4. or do I have to redesign all the reports with the xsd file?

Thanks,

Jai

0 Kudos

The TTX driver has been deprecated and there is no 64 bit version of it.

You'll have to convert to a Dataset or XML as the data source.

Don

0 Kudos

Using Try/Catch Block I am getting the error Failed to load database information.

Upon further investigation I found that the reason to be using .ttx files to set the field definition when generating reports. Are those files embedded into .rpt file during the report generation phase?

0 Kudos

That is normal for only one file in that folder. They are mostly in the folder above that one.

Try wrapping it in a Try/Catch block and see what else is missing.

If you have the Viewer on the form what happens when you export from the Viewer?

0 Kudos

I have tried multiple times installing and uninstalling, I only have one file in the dotnet folder in win64_64 path "C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet\", but I do have all the .dll files in C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\" folder.

I do get an exception from the CrystalDecisions.ReportAppServer.DataSetConversion.dll which is available in the assembly folder "C:\Windows\assembly\GAC_MSIL"

I tried checking with Procmon, it shows it is accessing the file from the assembly folder "C:\Windows\assembly\GAC_MSIL"

0 Kudos

No you did not install it completely, last thing the installer asks is if you want the 64 bit runtime installed, you may have unchecked it.... Try doing a repair/modify and install it again.

Don

0 Kudos

I was going through the runtimes installed. I have only one file in win64_64 path: "C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet\CrystalDecisions.Data.AdoDotNetInterop.dll". Is that the reason? I did install it properly as its very straightforward used the CRforVS13SP25_0-10010309.EXE and also executed the 64-bit setup.

0 Kudos

Hi Don,

Thanks for your reply.

I have being the latest one CRforVS13SP25_0-10010309.EXE

Thanks

0 Kudos