Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping with an Unbound Field

Status
Not open for further replies.

smil3y

IS-IT--Management
Jan 8, 2004
79
AU
I am using unbound fields in a crystal report and am wondering whether I can group on unbound fields. If so how do I do it. Thanks
 
In some way a value that gives rise to a group has to be related to the group members. If not table link, you may bind using formula. More details on your problem could help to assisst you better.
 
It doesn't make alot of sense to make a group out of a unbound field, but you can do it.

I created the following formula:
Code:
WhileReadingRecords;
"Hello"
I created a group on this field.

The "WhileReadingRecords" is what allows it to be used as a value you can group on.


~Brian
 
I have a table (tblTest) with fields RecID, RecSection, and RecHours. At runtime I add somewhere between 2 and 3 more fields to this table (Names such as RecClass1, RecClass2 etc). This depends on how many classes the operator has added to another table.

When I display my report I want the data grouped by RecSection. The only way I can see of including the tables I added at runtime is by using the unbound fields.

Hope this is clearer.

 
Thought I should update - I used the "WhileReadingRecords' to populate an 'unboundstring' with my RecSection records. Then I grouped on this unboundstring. This seems to work with my report grouping on the RecSection records.

Problem is that now I do not get any data coming up in the unboundnumber fields. I suspect that this is because I am missing something very basic (to do with grouping). ie my code below does not know that grouping at a higher level is occuring.

in my VB code I am using:
CODE
With IncReport
.UnboundNumber2.setunboundfieldsource "{tblTest.RecClass1}
end with
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top