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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# & Crystal Reports: Enforce column headings....

Status
Not open for further replies.

salooo

Programmer
Sep 11, 2003
30
US
Hi,

I am using C# with MS VS.NET and deploying reports in Crystal. I want to know if there is a way to enforce the column header (by this I mean the column headings/labels) to continiously stay visible in the report viewer.

The thing is that I have a couple of reports that are displayed in a reportViewer in a form. It is not possible to see the complete report on the screen and that is why the user has to scroll down and see the remaing part of the report. This is where the user cannot see the column headings and has trouble keeping track of the corresponding columns.

I would really appreciate if someone can tell me if there is a feature in Crysta that can solve this problem. If not then I am open for suggestions to deal with this issue.

Any help would be greatly appreciated.

Thanks.

Salmaan.
 
I assume you're looking for something like the Excel freeze column/rows function. I can't speak for 8.5 or 9.0, but there is no feature like this in 8.0.

As a workaround, you could place the column headings in a detail_a section, with your detail fields now in detail_b, and then go to format section->details->suppress->x+2 and enter:

remainder(recordnumber,25) <> 0 //where you substitute the 25 for the number of lines that can be scrolled through without a page header.

If you have multiple groups, where the recordnumber would not take into account the group headers and footers, you could create a formula {@linect}:

whileprintingrecords;
numbervar linect := linect + 1;

Place this in each section (group headers and footers, and detail_b) and then change the suppression formula to

remainder({@linect}, 25) <> 0

If you wanted to reset the count per page, you could place a reset formula {@resetlinect} in the page header:

whileprintingrecords;
numbervar linect := 0;

Another approach, if you want to make the headers optional, is to create an on-demand subreport called &quot;Show column headings&quot; that contains the column headings, and place that in the detail_a section. Again, you'd probably want to limit that to every n lines. Then users could click on that to view the headings.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top