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

How To Show Column Headings in Crystal Reports

Status
Not open for further replies.

moonmonkey

Programmer
Jul 16, 2002
14
0
0
GB
Hi. I'm new to crystal reports, and we are using it (perhaps rather foolishly) to create CSV and word documents based on SQL Statements.

We are using the Report Designer Component in Visual Basic to do this. Can anyone tell me how to tell the component to include field headings when it creates a CSV and emails it?

The CSV is fine for what we need it for but we need the headings too.
 
i've just read in a crystal reports book that there is an option in the file-options menu, under the layout tab, which is a check box option that says "Show Field Names". How do you set this option from the crystal reports Report Designer component?
 
MoonMonkey: the 'show field names' in the layout tab refers to the display while in Design mode. It has nothing to do with exporting.

You might be using the wrong tool to do the exporting. Data Junction has tools that do that better.

Move the field names to the Report Header section of your report. That should do the trick. Howard Hammerman,

Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
800-783-2269
 
If you use CSV I think the report header fields will be part of every record. You can use the report header and export to text, but you will have to make your CSV layout for the rows. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Ken.
yes thats exactly what I found. When I used some textboxes as headings, it put the headings in every row, which is totally stupid. Why would you want that?

Does crystal reports really not print field headings? It seems unbelievable. I am having to create a separate csv with just the headings, from vb. Then create the CSV using crystal, and then manually concatinate the two, which is not ideal.

Any suggestions?
 
Crystal tends not to respect headers when exporting to csv, in my experience.

To workaround, I export it to Excel, (which is my default csv reading application anyway) where the headers and seperators are honoured. Saving to csv from the Excel export produces the expected results - but it's a tiresome step to have to add in.

txt exports also support headers from Crystal, but aren't as reliable.

Naith
 
Naith has the right idea. Maybe the next version of Crystal will do a better job of exporting. Howard Hammerman,

Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top