crystal reports viewers, crystal reports schedulers, view crystal reports, report analyzers, burst reporting, report scheduler
 
view crystal reports, rpt viewer, crystal reports viewers, crystal reports schedulers, report analyzers, burst reporting, report scheduler
desktop viewer, crystal reports viewers, crystal reports schedulers, report analyzers, burst reporting, report scheduler

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  
Best sellers:
cView
Report Analyzer
cViewSERVER
ReCrystallize
 


Articles:
Administration
Advanced
Basic
Crystal eNL
Database
Financial
Problems Solved

Books:
CR Books

Database Books
Developer Books

 
Tools:
Analyzers
Bestsellers

CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs
ReCrystallizePro


Add'l:

About us

Contact Us
cViewSUITE Ppt
Support

 

CrystalReports
on Steroids

Crystal Reports: Heading List of Multi-value Ranges

To display a multivalue range you will need this formula:

stringvar d :=""; //start with empty string

numbervar i; //counter for the loop

datevar d1; datevar d2; // two variables to use in calculations

for i:=1 to count({?What Date}) do ( // for each parameter in the list

d1 :=minimum({?What Date} [i]); // Store first date in the range into d1

d2 :=maximum({?What Date} [i]); // Store last date in the range into d2

if d1 <>d2 then d := d + ", "+ // they are different so must be a range

Totext(d1,"dd-MMM-yyyy") + " to " +

Totext(d2,"dd-MMM-yyyy")

else d := d + ", "+ Totext(d1,"dd-MMM-yyyy") ;) ; // otherwise just show one value

"Date List: " + mid(d,3) // remove the first two characters (a comma and a space)

 

You can also put a range in the footer where the data aren't sorted. For example, we wanted to show the highest and lowest value of a field’s values on the page. The solution is a slight variation on the solution we used for the index in the page footer:

A formula in the Page Header: (Supress)

WhilePrintingRecords; global numbervar Top:={table.field}; global numbervar Bottom:={table.field}

A formula in the Details: (Supress)

WhilePrintingRecords; global numbervar Top; global numbervar Bottom;

If {table.field}> Top then Top:={table.field};

If {table.field} < Bottom then Bottom:={table.field}

A Formula in the Page Footer:

WhilePrintingRecords; global numbervar Top; global numbervar Bottom;

"Range: " + Totext(Top,0) " to " ToText(Bottom,0)

 

This technique can be used only on the page footer. The page header can only see the record at the top of the page. It is not aware (yet) of the other records to be printed on the page.

 

Speaking of footers, you can use two page footer sections for odd and even page footers.

If you look at any professionally prepared bound, double sided publication you will see the page footers are different on the odd and even pages. The Even numbered pages on the left of the binding often have the page numbers on the left, and other copyright information on the right, while the right hand, odd numbered pages have these fields the other way around.

The theory is that if you are looking for a specific page number, then you can thumb along the pages and see all the page numbers on the outer edge of the document.

You can achieve the same effect in your Crystal Reports by using a Page Footer a and Page Footer b section with the two layouts you want. Then conditionally suppress the sections using a formula of

Remainder(PageNumber,2)=0 //To suppress if page number is even

And

Remainder(PageNumber,2)=1 //To suppress if page number is odd

You might also want to use the section formatting option "Reserve Minimum Page Footer" to give you a little more room for data on the page.

 

 

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.