export with headings vs. sortable columns

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Larelyn
Profound User
Posts: 30
Joined: Thu Mar 20, 2014 2:31 pm
First Name: Lisa
Last Name: Lawrence
Company Name: The Scoular Company
Contact:

export with headings vs. sortable columns

Post by Larelyn »

Hi, when I try to use both the "sortable columns" property along with "export with headings" on a grid, it seems the export property turns off the ability to click on the column header to sort. The user must use the right-click-and-sort feature of the export property to sort at all. Is this intentional? Shouldn't the column header click work regardless of the state of the export property? (this isn't urgent by any means by the way)

Thanks!
Larelyn
Profound User
Posts: 30
Joined: Thu Mar 20, 2014 2:31 pm
First Name: Lisa
Last Name: Lawrence
Company Name: The Scoular Company
Contact:

Re: export with headings vs. sortable columns

Post by Larelyn »

apologies - not the "export with headings" but rather the "export option". That is the property that doesn't play nicely with sortable columns.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: export with headings vs. sortable columns

Post by Scott Klement »

I'm trying to reproduce this problem, but it seems to be working for me... I can sort by clicking the column header or by using the right-click option. Both work perfectly in my tests. I have the following:
SortExport.png
SortExport.png (8.74 KiB) Viewed 748 times
Can you tell me how to reproduce the problem you're seeing?
bluttman
Profound User
Posts: 35
Joined: Mon Feb 20, 2012 6:45 pm
First Name: Brian
Last Name: Luttman
Company Name: BEPCO, Inc.
Contact:

Re: export with headings vs. sortable columns

Post by bluttman »

I'm having a similar problem. Simple grid with the following properties:
Image

When you right click the column you get only the Export option. And the column is not sortable. It is resizeable and moveable.

Also, I am getting a csv file with ONLY headings but no data.

I am filling the grid with a custom sql statement in javascript.

Sometime in the last 2 months the export feature stopped working.

Image
bluttman
Profound User
Posts: 35
Joined: Mon Feb 20, 2012 6:45 pm
First Name: Brian
Last Name: Luttman
Company Name: BEPCO, Inc.
Contact:

Re: export with headings vs. sortable columns

Post by bluttman »

Update to export issue.

Apparently sometime in the last few months something has changed that now requires me to "cast" some fields into ccsid 37 when using export with a custom sql built grid.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: export with headings vs. sortable columns

Post by Scott Klement »

Do all of the problems (given in this discussion thread) only occur with database-driven grids? That could be why I couldn't reproduce it.
bluttman
Profound User
Posts: 35
Joined: Mon Feb 20, 2012 6:45 pm
First Name: Brian
Last Name: Luttman
Company Name: BEPCO, Inc.
Contact:

Re: export with headings vs. sortable columns

Post by bluttman »

Actually I recall now that sortable columns won't work with a custom sql driven screen. Had to do something with not being able to update the "Order by" clause.

The need to cast the fields in order change the ccsid is new to me.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: export with headings vs. sortable columns

Post by Scott Klement »

Can you post the SQL settings that you are using (including the CAST, etc)? thanks!
bluttman
Profound User
Posts: 35
Joined: Mon Feb 20, 2012 6:45 pm
First Name: Brian
Last Name: Luttman
Company Name: BEPCO, Inc.
Contact:

Re: export with headings vs. sortable columns

Post by bluttman »

select
cast(rpicut||' '||rpicu as char(10) ccsid 37) as Batch,
cast(rpdct||' '||rpdoc as char(25) ccsid 37) as Invoice,
cast(rpsdct||' '||rpsdoc as char(20) ccsid 37) as Order,
rpalph as DESC,
char(xdatej(rpdgj),USA) as GLDATE,
rpag*.01 as AMOUNT
FROM f0311
WHERE RPICUT = 'R' and rppn = 4 and rpfy = 14
order by rpicu, rpdoc

Original:
select
rpicut||' '||rpicu as Batch,
rpdct||' '||rpdoc as Invoice,
rpsdct||' '||rpsdoc as Order,
rpalph as DESC,
char(xdatej(rpdgj),USA) as GLDATE,
rpag*.01 as AMOUNT
FROM f0311
WHERE RPICUT = 'R' and rppn = 4 and rpfy = 14
order by rpicu, rpdoc

Some fields in this JDEdwards database are ccsid = 65535
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: export with headings vs. sortable columns

Post by Scott Klement »

There was a change made to CSV export in Profound UI 4.6.3 where we ask the database (IBM DB2 for i) to return our SQL query in UTF-8 format. Prior to that, it returned the SQL data in EBCDIC, and we subsequently converted it to UTF-8. The problem with getting it in EBCDIC is that if the customer had any Unicode fields in the database, they'd lose any characters that didn't exist in their job's EBCDIC, causing big problems.

I can only guess that this change broke compatibilty with non-text fields. (CCSID 65535 means "this is not text, it is raw hex data"). I don't know WHY it would... (I can't see why it's easier to translate CCSID 65535 to EBCDIC than it would be to translate it to UTF-8... but, nevertheless, I'm guessing that IBM decided to translate one but not the other.)

The CAST solution seems like it should work. Is that a good enough solution? Or do you have too many programs to change?

The "sortable columns" problem... I'm only guessing here, but I think it's perhaps because your column is defined as a whole expression (like rpicut||' '||rpicu) When you click on the column to sort it, it tells DB2 to order by on the column named "rpicut||' '||rpicu", which obviously won't work.

You could fix the order by problem by loading the subfile manually in your RPG program. If you run the SQL statement there, you won't have to worry about the CCSID problem, and if you do a "load all" subfile, the sorting will be handled in the browser, so there won't be a need to have SQL use order by. Will that work for you?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests