Print Page | Close Window

Need help with formula

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1792
Printed Date: 29 Apr 2024 at 12:05am


Topic: Need help with formula
Posted By: ausmoran
Subject: Need help with formula
Date Posted: 29 Nov 2007 at 8:02am
I have a simple formula in a CR version 9 report in which I want to arrange the content in sequential order.  Here is the formula:

StringVar LIST;
List:=List+", "+(tblArticles.ArticleNumber);


Note:  The ArticleNumber field is an Text field in which the content is normally something like "Article 1" or "Article 17" etc.  The tblArticles table also has a ArticleID associated with each ArticleNumber.  I would like to be able to sort the articles that are selected in the formula. 

As they show up in the report now, they are in any sort of order (EXAMPLE: Article 17, Article 5, Article 22)  I would like to have them show up in proper order (e.g.: Article 5, Article 17, Article 22).

Here is how the field is used in the report:


...which is a hearing concerning alleged violation of  {@Articles} of the Code of Ethics...

Any help you might offer will be gratefully appreicated.

THANKS,
Austin



Replies:
Posted By: BrianBischof
Date Posted: 29 Nov 2007 at 11:25am
A couple ideas. You could use some type of group field and within that group sort by the article number (or article Id if it will still be sequential). Then in the detail section have the formula that you mentioned already. This will build a list of the article numbers. Now, I assume that you don't want a separate row showing up for each article, so suppress the Detail section so it doesn't print. You can put the "...which is a hearing...." with the article list  in the group footer.

Another option is to use Global variables with subreports and use a sorted subreport to bulid the list. Then suppress the subreport but show the article list variable in the main report.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: downzy
Date Posted: 04 Dec 2007 at 5:21am
Also, you must be careful of your sort because "artical 5" will not sort before "artical 17", is that not true?

-------------
Life ain't nuthin but a funny, funny riddle...
J. Denver



Print Page | Close Window