Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2016 : Report Design
Message Icon Topic: Error - Group Specified on non-recurring field. Post Reply Post New Topic
Author Message
GowthamSen
Groupie
Groupie


Joined: 03 Jun 2009
Location: India
Online Status: Offline
Posts: 65
Quote GowthamSen Replybullet Topic: Error - Group Specified on non-recurring field.
    Posted: 13 Aug 2009 at 12:56pm
Hi,
 
I created a variable as follows.
 
"global numbervar pagebreak;
If ({CRY_.PRDCT}="S" and previous({CRY_.PRDCT})="S") then
pagebreak := pagebreak
else
pagebreak := pagebreak + 1;
"
 
This working fine. And I created a group based on above variable.
 
While viewing the report, its throwing an error "Error - Group Specified on  non-recurring field."
 
Any one please help me in this?
 
Thank you,
Regards,
 
Gowtham Sen
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4285
Quote lockwelle Replybullet Posted: 14 Aug 2009 at 6:20am
pagebreak is a variable, and Crystal doesn't like to group on a variable, as it's value is indeterminate prior to report being displayed...another way of putting it is, Crystal can't do a sort of the data prior to display.
 
If you get the data from a stored proc, you might be able to add a column that has the values that you want, and then Crystal can group on it...
 
I guess another way of stating how to get around this error is that Crystal only groups on fields in the database.  You can construct a formula that uses fields from the database and Crystal will be happy to group on them (I do this all the time) but make it a variable, and Crystal is not happy.
 
HTH
IP IP Logged
GowthamSen
Groupie
Groupie


Joined: 03 Jun 2009
Location: India
Online Status: Offline
Posts: 65
Quote GowthamSen Replybullet Posted: 14 Aug 2009 at 7:38am
Hi Lockwelle,
 
Thanks a lot. Its a very nice explanation. I don't know of not using variables while defining group sections.
 
What actually, I intended to do is, I am having a column.  I would like to check the current column value and previous column value.
 
Based on that, I would like to define the groups and display the pictures.
 
 
Thank you
Regards,

Gowtham Sen.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4285
Quote lockwelle Replybullet Posted: 14 Aug 2009 at 12:07pm
if you have a column, then you can use the next/previous...and actually if there is already a column in the dataset, just group on that.

HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.