Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: What's the order of processing? Post Reply Post New Topic
Author Message
hello
Groupie
Groupie
Avatar

Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
Quote hello Replybullet Topic: What's the order of processing?
     Posted: 10 Feb 2014 at 9:52am
I am getting weird printed results and I am not sure if my database is corrupt or if I just am using formulas in the wrong place.

I assume the formula created in Select Expert filters data WhileReadingRecords.

But what if your report also has formula fields in the detail section? Do those formulas get processed before or after the formula in Select Expert?

Thanks for any info.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Feb 2014 at 10:43am

different formula types can be processed in different report passes (I think there are 4 total passes???).

some formula are processed at the same time as the select statement and can be used in the sleect expert but in general I think it is best practice to use the source data as your select criteria (or sql expressions) so that the server can do the majority of the processing.
If you are using a group select criteria that is applied in a later data pass
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Feb 2014 at 4:54am
I thought that there were only 3 passes...but it's been a long time...

I know that there are directives like while reading records and while printing.

It would make sense that the record selection formulas would be while reading as they are a boolean that basically says include this record or exclude it from the reporting results.

I would think that just about everything else is post reading...since you can do dynamic grouping that would be in an earlier pass than a dynamic suppression or a dynamic display.

If you are confused about the data being returned, I would take the SQL that CR generates and run it in SQL Server or whatever your datasource is and then you can compare if the results match the report and if the results are what you expect.

HTH
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 11 Feb 2014 at 5:01am
There are three passes (I have document in front of me),  but there are two pre-passes.  Pre-pass #1 - Constant formulas, Pass#1 - Recurring formulas, Record selection formulas, Pass #2 - Print time formulas.

I believe this flow chart is in the Help.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum