cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent Result on 64 bit machine

Former Member
0 Kudos

Hi there,

We wrote a XML to PDF years ago using Visual Studio 2005 which calls the Crystal Report Run time "CrystalDecisions.CrystalReports.Engine.ReportDocument". The XML to PDF program basically load the XML file with the Crystal Template to generate a PDF report. It has been okay for years.

Now, we need to support for the 64-bit OS. After some research in the forum, we used Visual Studio 2008 and compile its target to x64. We installed the CRRedist2008_x64.msi to the client machine which is on Window Server 2003 Enterprise x64 Edition. However, with the same XML file and RPT Crystal Template, I got inconsistent result. 2 of the 8 times, it works fine but sometime, It messed up the sequence of the Line Detail in the report.

When we compile this program with Target Platform set it to x86, the executable using the same XML and RPT Crystal Template and run it fine on 32 bit machine (both XP and Vista.

In the Crystal Template, have tried to checked the "Link ordering is enforced" setting in Database Expert => Links => Order Links but it still does not help.

Does anyone has similar problem?

Many thanks.

Kelvin

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Make sure you applied SP1:

https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe

If that does not help, maybe a bit more description of the issue will be good. E.g.; "It messed up the sequence of the Line Detail in the report. " doe snot tell me much...

Ludek

Answers (6)

Answers (6)

Former Member
0 Kudos

The issue has resolved.

I ends up compile the Project and set the compile Target Platform to x86. Uninstall the CRRedist2008_x64.msi run time from my 64-bit machine and install the 32-bit version.. So, in fact, it is a 32-bit program running on a 64-bit OS in 32-bit mode but that's okay as it worked for me.

I do still believe there's bug in the 64 bit run time though.

Many thanks.

Kelvin

Former Member
0 Kudos

Thanks for the info and I go through the documents in the blog as well.

Typically, either of the following will happen:

You will get a u201CMap Fieldsu201D dialog. This indicates that the XML written off of your dataset does not match what the report is expecting. This may be due to incorrect fields name, incorrect field type, etc. You will now need eliminate the difference.

Incorrect data or no data. There is an issue with your dataset and you need to determine why the data is not present in your dataset. Looking at the XML may be a good place to start.

I reviewed the XML files many times and the dataset seems to be fine... Strange thing is, the same XML and same RPT were used and ran okay on a 32-bit machine.

Is it possible there is an issue with the 64-bit Crystal Runtime and produce inconsistent result?

Thanks.

Kelvin

former_member183750
Active Contributor
0 Kudos

Not that I am aware of. It may be a good idea to get phone support and have a tech do a webex with you, exchange files, etc. Phone cases can be created here;

http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryI...

If this is a bug, your case will be refunded.

Ludek

Former Member
0 Kudos

Actually, I am using the Crystal Reports Basic for Visual Studio 2008 Service Pack 1 instead of CR2008..

The executable is able to compile and run okay when set the target to x64 only it print inconsistent result.

At my 64-bit machine, I had also installed CRRedist2008_x64.msi.

Thanks.

Kelvin

former_member183750
Active Contributor
0 Kudos

Ok. Then go through the blog I recommended a few post ago and see if that will help.

Ludek

Former Member
0 Kudos

I just installed the CR2008 SP1 and recompile my project target to x64.

Ran my program again... same issue remains.

Thanks for the info for the ADO.NET link. However, the same XML file and RPT file are being used in 32-bit machine and had no problem.

In the 64 bit machine, sometimes it works (2 out of the 10 times) but sometimes it doesn't. It is pretty random and inconsistence.

Thanks.

Kelvin

former_member183750
Active Contributor
0 Kudos

Only CR 10.5 and CR 10.2 are 64 bit. So you can not compile CR 2008 to x64. Nor can you compile these to "Any". You must compile this as x86.

Ludek

Former Member
0 Kudos

Thanks for your quick response..

Here is the batch file we created.

"c:
XML2PDF\XML2PDF.EXE"

"c:\l1_PO.rpt"

"c:\Sample.xml"

"c:\Sample.pdf"

P

ExportOnly

"Canon_iR1023"

Here is a simplified version of the code...

CrystalDecisions.CrystalReports.Engine.ReportDocument reportDocument1=new CrystalDecisions.CrystalReports.Engine.ReportDocument();

reportDocument1.PrintOptions.PrinterName = args[5];

ds = new DataSet();

ds.ReadXml(args[1]);

if (args[3] == "P")

{

reportDocument1.PrintOptions.PaperOrientation=PaperOrientation.Portrait;

}

else

{

reportDocument1.PrintOptions.PaperOrientation=PaperOrientation.Landscape;

}

if (args.Length>6&&args[6] == "P") //preview mode

{

Form1 form2 = new Form1();

form2.LoadReport(reportDocument1,args[3]);

reportDocument1.SetDataSource(ds);

if (args[3] == "P")

{

form2.crystalReportViewer1.Zoom(1);

}

else

{

form2.crystalReportViewer1.Zoom(2);

}

form2.ShowDialog();

}

else

{

reportDocument1.SetDataSource(ds);

if (args[4] == "ExportOnly" || args[4] == "PrintAndExport")

{

ExportOptions expOptions = reportDocument1.ExportOptions;

if (args[2].EndsWith(".pdf"))

{

expOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

}

DiskFileDestinationOptions dfdoCustomers = new DiskFileDestinationOptions();

reportDocument1.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

dfdoCustomers.DiskFileName = args[2];

reportDocument1.ExportOptions.DestinationOptions = dfdoCustomers;

reportDocument1.FormatEngine.Export();

}

}

return 0;

}

former_member183750
Active Contributor
0 Kudos

Ok. So you're using ADO .NET Datasets (btw., I'm still not sure if you have applied SP 1?).

See if the blog [Troubleshooting Issues with VS .NET Datasets and Crystal Reports|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13270] [original link is broken] [original link is broken] [original link is broken]; blog helps you in troubleshooting the issue.

Ludek

Former Member
0 Kudos

Is CR2008 Basic part of the Visual Studio 2008 License? Do I need to buy any license?

What I mean for messing up the sequence is below:

The XML has three tables. ReportInfo, Header and Detail. The relationship is we always have only one ReportInfo. One ReportInfo can have many Header; One Header can have many Detail.

Let's say Header 1 have 2 Details. Header 2 have 4 Details. When it messed up, some of the Details belongs to Header 2 shows up under Header 1, sometimes vice versa... Sometime, the details in the Header 2 does not appear in the same sequence order.

Is there anyway I can attach the XML and RPT file to the message?

Thanks.

Kelvin

former_member183750
Active Contributor
0 Kudos

Is CR2008 Basic part of the Visual Studio 2008 License?

yes

Do I need to buy any license?

no

Is there anyway I can attach the XML and RPT file to the message?

No. But you can create a phone case and supply the files then. Phone cases can be created here;

http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryI...

Have you applied SP1?

How are you passing the xml info to the report?

Ludek