Skip to Content
0
Former Member
Feb 18, 2014 at 03:39 PM

Crystal report exported into PDF losses sort order

322 Views

Background: the crystal report RPT file was created using Crystal reports 2008 SP1.

.Net application: framework 4.0, platform : Any CPU , Type: Console application.

System: 64 Bit machine, Crystal report runtime 13 SP8 , Installed Crystal reports 14 Sp1.

Problem: The application was written in visual studio 2012 on a 32 bit machine with Crystal report 2008 runtime everything works as planned.

I created this application on windows 7 64 bit machine with crystal reports runtime 13 SP8. it only works partially. the application first runs individual records and exports them into pdf. I have an open source library called PDFSHARP that takes the page count of the individual PDF files

e.g. customer A, pages:2

customer B, pages:3

customer C ,pages:1

I store this customer number and page information in a dataset. So, lets assume this dataset has 10,000 records. I then split this dataset into 1,000 records each and provide it to the same RPT file as a data source. when it prints the 1,000 the order of record gets lost. So , what ends up happening is

customer A, pages:2

customer C, pages:3

customer B ,pages:1

However, if I only split the records max up to 125 records per file then they work as expected.

customer A, pages:2

customer B, pages:3

customer C ,pages:1

Attached is code Snippet Crystal_code.txt

I have tried almost everything under the sun but I cannot seem to find out why this application behaves differently on 64 bit environment. where it looses the order or records on anything over 125 records. Where as on a 32 bit machine with old runtime it works like a charm even for 1000 records at a time.

Any help is appreciated.

Attachments