1. Gordon Leishman
  2. PowerBuilder
  3. Friday, 1 December 2017 04:44 AM UTC

Hi guys,

We have upgraded to 2017 and the users have noticed that the DataWindow SaveAs dialogue box (invoked by the data window SaveAs method) has changed from our previous installation under 12.6. 

They don't like the new one !!

As far as I am aware this is just a built in and there is no way of customising the dialogue box.

Is this just something that has changed in PB 2017 or am I missing something?

See below for screenshots from 2017 and 12.6.

PB 2017:

PB 12.6:

 

 

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 1 December 2017 07:31 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Gordon,

that indeed seems to be the old Explorer-style Save As, which was superseded by the Common Item Dialog. Dunno why the new PB2017 has brought it back, but you can work around as follows:


li_rc = GetFileSaveName ( "Select File", ls_path, ls_file, "TXT", "Text with headers (*.txt),*.txt" , "", 32770)
IF li_rc <> 1 Then Return
dw_1.SaveAs (ls_path, Text!, True)

 

Cheers,

Marco

Comment
  1. Gordon Leishman
  2. Monday, 11 December 2017 01:27 AM UTC
Thanks Marco, this helped a lot. 



I needed to give the users a couple of file type options so I ended up with the following:



li_rc = GetFileSaveName ( "Save As", ls_path, ls_file, "", "Excel12 with headers (*.xlsx),*.xlsx,Text with headers (*.txt),*.txt, CSV with headers (*.csv),*.csv" , "", 32770)

If li_rc > 1 Then Return

If Pos(ls_file, ".") = 0 Then Return

ls_extension = Upper(Mid(ls_file,LastPos(ls_file,".")+1))

Choose Case ls_extension

   Case "XLSX"

      dw_ctl_trans.SaveAs(ls_path,XLSX!,True)

   Case "TXT"  

      dw_ctl_trans.SaveAs(ls_path,Text!,True)

   Case "CSV"

      dw_ctl_trans.SaveAs(ls_path,CSV!,True)

End Choose

  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 4 December 2017 08:21 AM UTC
  2. PowerBuilder
  3. # 1

There is a problem with the 12.6 style dialog box: You can't specify the encoding.

In PB 2017 IDE there are also some save as dialogs (file editor, database painter) without the encoding selection option. This is really a problem.

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.