Print Page | Close Window

Error - Group Specified on non-recurring field.

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2016
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7367
Printed Date: 15 Aug 2020 at 1:13am


Topic: Error - Group Specified on non-recurring field.
Posted By: GowthamSen
Subject: Error - Group Specified on non-recurring field.
Date 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
 



Replies:
Posted By: lockwelle
Date 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


Posted By: GowthamSen
Date 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.


Posted By: lockwelle
Date 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



Print Page | Close Window