cancel
Showing results for 
Search instead for 
Did you mean: 

Export "Data Only" Excel - *All* Page Headers

Former Member
0 Kudos

I've been googling this issue all day and can't find a solution.

What complicates matters is that I'm using the Crystal Reports for Visual Studio.  There are numerous articles out there that talk about dialogs that I don't get, options that I don't get to use, etc.  This is specifically for Crystal Reports Basic for Visual Studio 2008 (In our newer code it's the latest Crystal for Visual Studio 2013 = downloaded from this site - but I'm in an older project right now).

And I do understand that one would want to have fields and headers lined up, and same widths, etc.  That's not my issue.

The issue for me is getting every Page Header, when they are on multiple lines, to export.  I can only ever get ONE line to export.

Let's start with an image so we are working from the same baseline (can also be viewed here: http://i57.tinypic.com/vqsg90.jpg😞

Let's take PageHeaderSection3.  It's really two "lines" (for lack of a better word) of text objects in one Page Header.  The top line of multiple text objects are all positioned at a Top of 0.  The 2nd "line" of multiple text objects are all positioned at a Top of 240.  No matter what I do, only the 2nd line (the text objects that have a Top of 240) gets exported - well, with one caveat: That's as long as PageHeaderSection4 is suppressed.

The second I un-suppress PageHeaderSection4, I get NO Page Header's exported.

It's as if the export only ever wants to take the "last line".  With only PageHeaderSection3 enabled, it's only exporting the line at a Top of 240.  With both PageHeaderSection3 and PageHeaderSection4 enabled, it's only exporting PageHeaderSection4 (which is blank at this moment - that's why I wouldn't see anything).

Now, the reason that I did have the two sections was because I tried putting ONLY the Top 0's of PageHeaderSection3 in PageHeaderSection3 (with the Height of the PageHeader equal to the height of the fields).  Then, in PageHeaderSection4, I put the Top 240's (again with the height of the PageHeader equal to the height of the fields).  So, PageHeaderSection3 was broken up into two "one line" PageHeaderSection's (3 and 4).

Again, the only thing that got exported was PageHeaderSection4's "line" (which in this case would have text).  It's always just the "last line".  How do I get ALL lines exported?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

You might be able to "fake" this using the same technique that's used to create page headers in subreports:

1.  Create an outer Group on something that only occurs once on the report.  If there isn't anything that only occurs once, create a formula that just contains the number 1 and group on that formula.

2.  Right-click on the grey area to the left of this new group header section and select "Change Group..."

3.  Turn on "Repeat Group Header on Each Page".

4.  Now create as many group header sections as you need for page headers and put your page header information in them.

-Dell

Former Member
0 Kudos

Here is what I found to be an issue using Group Headers:

Imagine your "Group section is 2 lines worth of data to display".  Here's what a report would look like:

*** Page 1 ***

Page Header Line 1

Page Header Line 2

Group Header Line 1

Group Header Line 2

Detail Section

...

Group Header Line 1

.. end of page ...

*** Page 2 ***

Page Header Line 1

Page Header Line 2

Group Header Line 2

Detail Section

...

And so on.

You get the Group Header for every grouping (my report already had some grouping), which means that the "fake" Page Header (the group headers) would be repeated numerous times through each page ... and ... if it doesn't fit all of the group headers before you hit the page break, you get the remainder of the group headers on the next page (notice my Group Header Line 2, and not Line 1 on Page 2).

Even if you don't display the Page Headers at all, it's not right.

I had to come up with a solution that utilized both Page Headers and Group Headers while using the onfirstrecord formula.

So, it's odd that I have to repeat the same exact data in the Page Headers and Group Headers, but I got it to work.  I only display the Group Headers on Page 1 (which will get the export to print all the headers), and then the Page Headers take over on Page 2 through End Of Page.

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Hi William

Re.:


What complicates matters is that I'm using the Crystal Reports for Visual Studio.  There are numerous articles out there that talk about dialogs that I don't get, options that I don't get to use, etc.

It may be an idea to download the 30 day eval of CR 2013. You will then get all those dialogs, options, etc. Create the report. RUn it in you r app that uses the "SAP Crystal Reports, Developer Version for Visual Studio .NET". There will be no issues with that report at all.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Well, some of the dialogs I was referring to was at run-time.  This isn't a WinForms, or old VB6 app.  This is the Crystal Report Viewer that's displayed through ASP.NET.

This seems like some type of limitation in Crystal.  How does it not print all of the Page Header, and just the "last line"?  It doesn't make sense (to me).