×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Build Index Page in Report Footer

Build Index Page in Report Footer

Build Index Page in Report Footer

(OP)
Hello,

I am using Crystal Reports 2013.

I have a SQL table that looks like this with thousands of records.


My report groups by and does a page break on Dept. There are many pages per Dept. The current report (mainframe COBOL) I am converting, has an index page at the end that shows each Dept analyst the page number where their fuel charges begin and end.

Is there a way to do this in Crystal Reports?

Thanks in advance for any assistance you can provide.
TimothyP

RE: Build Index Page in Report Footer

How many departments are there? Does the report always contain the same departments?

-LB

RE: Build Index Page in Report Footer

(OP)
There are 30 departments. The report always contains the same departments.

TimothyP

RE: Build Index Page in Report Footer

Create three formulas:

//{@start} to be placed in the department group header:
whileprintingrecords;
stringvar array dept;
numbervar array spg;
numbervar i := i + 1;
if i <= 30 then (
redim preserve dept[i];
redim preserve spg[i];
if onfirstrecord or
{table.dept}<>previous({table.dept}) then
(
dept[i] := {table.dept};
spg[i] := pagenumber
));

//{@end} to be placed in the department group footer:
whileprintingrecords;
stringvar array dept;
numbervar array spg;
numbervar array endpg;
numbervar j := j + 1;
stringvar z;
if j <= 30 then (
redim preserve endpg[j];
if onlastrecord or
{table.dept}<>next({table.dept}) then
endpg[j] := pagenumber
);
z := z + dept[j]+": "+totext(spg[j],0,"")+" - "+totext(endpg[j],0,"")+chr(13)

//{@display index} to be placed in the report footer and formatted to "can grow":
whileprintingrecords;
stringvar z;

-LB

RE: Build Index Page in Report Footer

(OP)
LB,

Works like a champ. Thank you!

TP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close