Author Topic: In Report Writer how can you print the heading only once?  (Read 6163 times)

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
In Report Writer how can you print the heading only once?
« on: June 15, 2011, 12:01:57 PM »
In Report Writer how can you print the heading only once?
In other words, I only want the page headings and column headings to print once at the top of the report and for the data to print as if there are no page breaks.

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: In Report Writer how can you print the heading only once?
« Reply #1 on: June 16, 2011, 07:05:34 AM »
I'm not certain why you would want to do this, unless you were trying to set up a report for export to another application, e.g., Excel.  If that's the case, I recommend you output the report as a DIF instead of printing it.

If you need to print it, you have two options to supress headers.

1) Set up and select a printer stationery that has more rows than necessary.  We have a stationery set for 450 columns and 9999 rows.  This would let you print the report with headers when necessary.

2) In the Header section, set up a conditional field to skip the header and column header rows after page one.  If you have five header rows, the formula would be

IF(@RV.PAGE > 1, 5, 0)


Hope this helps.

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: In Report Writer how can you print the heading only once?
« Reply #2 on: June 16, 2011, 10:24:16 AM »
Yes it does help. Thank you.
Yes, the purpose was to export the data to Excel; which is becoming a very popular request.
One of the basic complaints is how Excel handles the data.  Excel sees a customer 'number' and decides its a 'number' and removes the leading zeros (very unpopular).  fyi. Prelude has a free fix for this issue but its per PC.  Each person must download "Prelude_XLConvert" and then set the ADS conversion flag in Prelude to "Y". XLConvert  is smart enough to determine a 'string' customer number from a 'numeric' sales dollar. But, in spite of some other flaws, I recommend it!

As far as my original issue of not wanting headers only on the first page; "report writer" is smart enough to know that, when you send the report to Excel.  or maybe it was the XLConvert.  Which ever it was, I'm happy... on to the next adventure.

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: In Report Writer how can you print the heading only once?
« Reply #3 on: June 16, 2011, 11:27:48 AM »
When exporting to Excel, you can avoid loosing leading zeros on numbers or having product numbers change to dates (e.g., 12-5173 will convert to December 1, 5173).   You need to define a slighty different field with the format

="data"

So, if you have

="000123",="12-5173"

Excel will treat these as character strings instead of numbers or dates.

If you set up your /RD for DIF format, be certain to leave TWO spaces between fields to make certain the columns are identified properly.  This will create a CSV file, which can be imported into Excel with almost no effort at all.

(Edited to include CSV comment)
« Last Edit: June 16, 2011, 11:30:09 AM by Tom Pellitieri »

Colin Alfke

  • Professional
  • ***
  • Posts: 23
Re: In Report Writer how can you print the heading only once?
« Reply #4 on: June 16, 2011, 12:51:33 PM »
Don't forget that both the smart query and /QRD reports will download, usually quite nicely, to Excel as well. You still have to watch the formatting for customer numbers with leading zeros. Creating a dictionary that precedes the value with a ' (apostrophe) that Excel uses to flag a number as text works - but not quite as well as expected.

hth
Colin

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: In Report Writer how can you print the heading only once?
« Reply #5 on: June 22, 2011, 02:14:29 PM »
Another related issue. (I don't know if its being caused by XLConvert )
When I send the output to Excel every 91 lines is a blank line.
Any idea of the cause?

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: In Report Writer how can you print the heading only once?
« Reply #6 on: June 27, 2011, 07:57:12 AM »
The "blank line" is a remnant from older versions of SB+.  Formerly, the file would only create 16K or 32K blocks of data, so xxWORK would get a series of items with the format name.port.seq.  Now, you get a single entry, but the old block break creates an extra blank line in the final file.

nathandube

  • Newbie
  • *
  • Posts: 1
Re: In Report Writer how can you print the heading only once?
« Reply #7 on: August 05, 2011, 10:42:27 AM »
Have either of you considered using Kevin's download definition routine to kick out this data to excel?