1. Andrew Davis
  2. PowerBuilder
  3. Saturday, 17 February 2018

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

Govinda Lopez Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Tuesday, 20 February 2018
  2. PowerBuilder
  3. # 1
Marco Meoni Accepted Answer Pending Moderation
0
Votes
Undo

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
Cool, didn't know. /m

  1. Michael Kramer
  2. Sunday, 18 February 2018
Okay, than that sounds good, I will try that

  1. Andrew Davis
  2. Monday, 19 February 2018
There are no comments made yet.
  1. Sunday, 18 February 2018
  2. PowerBuilder
  3. # 2
Michael Kramer Accepted Answer Pending Moderation
0
Votes
Undo

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
so is this a bug then, exporting a datawindow when you cant see the data?

  1. Andrew Davis
  2. Monday, 19 February 2018
There are no comments made yet.
  1. Sunday, 18 February 2018
  2. PowerBuilder
  3. # 3
Marco Meoni Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Sunday, 18 February 2018
  2. PowerBuilder
  3. # 4
  • Page :
  • 1


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