cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report exported into PDF losses sort order

Former Member
0 Kudos

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.

 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Solution:

This is what worked for me:

I changed the .net framework to 3.5.

in the application settings I (properties) I changed the Platform target to X86

and platform to Any CPU.

Also I installed the x86 runtime of cr 12.0.2000.

This solved my issue... As a next step  I am going to upgrade my cr runtime to 13.8 and see if that also works.

i

Answers (2)

Answers (2)

former_member183750
Active Contributor
0 Kudos

I'd like you to follow the steps in this wiki and see if you can reproduce the issue.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Ludek,

I will try this tomorrow and will let you know how it went.

Thanks,

Arpan

Former Member
0 Kudos

Ludek,

I tried the troubleshooting and it worked fine when the data set was provided to the rpt file. however I think this is an issue with .net framework 4.0 and crystal report runtime.  on a 32 bit machine this application works as expected  find the attached screen shot for the GAC but I cant find the same runtime for 64 bit machine.

This is a screen shot of 32 bit machine assembly.  hope this sheds some light on the issue.

What would be the compatible runtime for 64 bit machine ?

Former Member
0 Kudos

Hi Soni,

It appears you are experiencing an issue similar to the one we have here http://scn.sap.com/thread/3503799.

Can you confirm that the data is in the order you expect? Are you using groupings on the report? Are all of the groupings set to original order. If so, changing them to ascending/descending may help (if feasible).

Regards,

Raju, S.

Former Member
0 Kudos

Hi Raju,

I have confirmed that the data is in the order. I have printed the dataset and sort order is correct.  however when that dataset is passed to rpt file the outcome is not what is expected.