1. Andrew Davis
  2. PowerBuilder
  3. Saturday, 17 February 2018 17:20 PM UTC

When I try to export my crosstab - the column description are not exported instead I get for example year_1 year_2 year_3 - instead of 2016 2017 2018

It is a very simple cross tab - account as the row - year (invoice_date)  as the column - no sub total or any complexities 

It seems that it is the same whatever version of excel or text I export -

I am wokring with version 2017 build 1681 - I have not tried the r2 yet.

Is there any way to fix this ? 

 

thanks in advance 

Andrew

Marco Meoni Accepted Answer Pending Moderation
  1. Sunday, 18 February 2018 10:31 AM UTC
  2. PowerBuilder
  3. # 1

Ciao Andrew,

I do not recall the reason why CrossTab is affected by this issue when exported, however I work around by saving as HtmlTable!

I love HtmlTable! since it retains alignments, fonts and decorations.

dw_1.SaveAs('dw.xls', HtmlTable!, True)

Cheers,

Marco

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Sunday, 18 February 2018 12:53 PM UTC
  2. PowerBuilder
  3. # 2

Hi Andrew,

This is a "feature" of the crosstab DataWindow expressing itself when exported with column names:

  • The column from which the crosstab columns are built has name = "year".
  • Therefore, the columns in the crosstab get names = "year_1", "year_2", ...
  • The values in these column headers are  "2016", "2017", ...

I like Marco's suggestion although it requires you can handle HTMLTable in the tool that reads the data file you "export".

HTH /Michael

Comment
  1. Andrew Davis
  2. Monday, 19 February 2018 20:55 PM UTC
so is this a bug then, exporting a datawindow when you cant see the data?

  1. Helpful
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Sunday, 18 February 2018 17:51 PM UTC
  2. PowerBuilder
  3. # 3

maybe I forgot to point out that if you save the DW as HtmlTable and give the output file xls extension (or xlsx), then Excel can open it out of the box.

Cheers,

.m

Comment
  1. Michael Kramer
  2. Sunday, 18 February 2018 17:56 PM UTC
Cool, didn't know. /m

  1. Helpful
  1. Andrew Davis
  2. Monday, 19 February 2018 20:55 PM UTC
Okay, than that sounds good, I will try that

  1. Helpful
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 20 February 2018 00:58 AM UTC
  2. PowerBuilder
  3. # 4

Hi Andrew,

 

Some presentation styles translate better into HTML than others. The Tabular, Group, Freeform, Crosstab, and Grid presentation styles produce good results. The Composite, RichText, OLE 2.0, TreeView, and Graph presentation styles produce HTML tables based on the result set only and not on the presentation style. DataWindows with overlapping controls in them might not produce the desired results. Nested reports are ignored; they are not included in the generated HTML.

 

You may find more information about this here (page 219).

 

Regards,

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.