1. Boris Krylov
  2. PowerBuilder
  3. Thursday, 20 May 2021 21:15 PM UTC

Hello there,

We recently implemented data encryption at rest in our databases and just stumbled upon a problem on the unexpected end. When we pull data from db it comes encrypted, so in order to show decrypted values we use computed fields in our datawindows and everything works fine.

The problem is when we export data in Excel format using datawindow SaveAs(dw_report, filename, Excel8!,  FALSE) function it doesn't export computed fields and exports encrypted values instead.

Is there a good and cheap solution to export datawindow computed fields in excel format?

Thanks,

Boris

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 20 May 2021 23:03 PM UTC
  2. PowerBuilder
  3. # 1

Hi Boris;

   Just convert your DWO computed fields into SQL computed columns. The SQL CC's are in the DWO's primary buffer & thus will get exported on the SaveAs() command.

   The other alternative is to keep your current DWO's "as is". However on the SaveAs (), use a DataStore with a DWO that uses SQL CC's - copying the primary data across. Then copy the DWO computed fields into the DS's SQL CC's. Then export.

Food for thought. HTH

Regards ... Chris

Comment
  1. Boris Krylov
  2. Thursday, 20 May 2021 23:18 PM UTC
Hi Chris, thank for reply.

I should have mentioned that we have hundreds of datawindows that all can appear in one window and that one window has Export button, so we don't want to check datawindow every time, check columns for existence and we don't want to go through all our datawindows and manually change columns or their types.

We had one line of code and now it doesn't work, so it would be nice to have something as cheap.
  1. Helpful
  1. René Ullrich
  2. Friday, 21 May 2021 06:08 AM UTC
Hi Boris,

PowerBuilders SaveAs to Excel can only export the values in the Primary Buffer. So it doesn't export the layout and also no computed field.

You can find a lot of articels about this problems and some workarounds. Or you check Dw2XLS (http://desta.com.ua/dw2xls/).
  1. Helpful
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.