CDR Tickets

Issue Number 3220
Summary Editing Summary Comments Report in MS Word
Created 2010-09-09 11:58:56
Issue Type Improvement
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2010-09-27 09:12:05
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.107548
Description

BZISSUE::4908
BZDATETIME::2010-09-09 11:58:56
BZCREATOR::Robin Juthe
BZASSIGNEE::Volker Englisch
BZQACONTACT::William Osei-Poku

We would like to have the ability to edit the "Summaries Comments" report in MS Word, using either the Word icon on the browser or by going to File-->Edit in Microsoft Word. This will give us the ability to delete unwanted rows (e.g., when comments are addressed).

Comment entered 2010-09-09 15:56:38 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-09 15:56:38
BZCOMMENTOR::Volker Englisch
BZCOMMENT::1

I have modified the program to replace the form's POST method with a GET method to work around this Microsoft bug:
SummaryComments.py

This is ready for review on MAHLER.

Comment entered 2010-09-14 07:47:43 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2010-09-14 07:47:43
BZCOMMENTOR::Robin Juthe
BZCOMMENT::2

This is working, but the display in Word doesn't include the colors for different types of comments (internal, external, response). Is it possible to preserve that when converting the report into Word?

Comment entered 2010-09-14 10:42:25 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-14 10:42:25
BZCOMMENTOR::Volker Englisch
BZCOMMENT::3

(In reply to comment #2)
> Is it possible to preserve that when converting the report into Word?

The conversion is not done by us so we don't have any control over it.
I will have to see if there is maybe an option in IE or Word that might preserve color settings or if the colors need to be set differently (which I doubt since I'm already using CSS to display the colors).
A quick search on the Internet did not find anything this morning.

One option could be to create a macro to set the colors after the conversion?

Comment entered 2010-09-14 11:51:22 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2010-09-14 11:51:22
BZCOMMENTOR::Robin Juthe
BZCOMMENT::4

A macro to add the colors sounds like a good solution to me. I will check with Sharon to see if there's anything else she would want to have included in that (e.g., adding page numbers, the date, etc. as you've done for other macros).

Comment entered 2010-09-14 18:02:43 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-14 18:02:43
BZCOMMENTOR::Volker Englisch
BZCOMMENT::5

(In reply to comment #4)
> A macro to add the colors sounds like a good solution to me

Lucky for me I don't have to create a macro. Bob and I were able to figure out that the Word conversion tool does actually allow to use color in the HTML document that's being converted to Word.
With that knowledge I was able to track down a bug in Word in the way it handles the conversion of CSS elements.
If a class selector is specified as
.dada { color: blue; }
Word properly assigns the color but it does not if the class selector is specified as
*.dada { color: blue; }

Both versions are correct but only the first one seems to be accepted by Word.
I'll have to rewrite my CSS and then the colors (and all other styles used) should display as expected.

Comment entered 2010-09-14 18:23:22 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-14 18:23:22
BZCOMMENTOR::Volker Englisch
BZCOMMENT::6

The following report has been modified to please MS-Word:
SummaryComments.py

This is ready for review on MAHLER.

Please note:
Due to another bug (long URLs) the report only converts properly if Word is already open!

Comment entered 2010-09-16 09:32:39 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2010-09-16 09:32:39
BZCOMMENTOR::Robin Juthe
BZCOMMENT::7

This looks good on Mahler. Only thing I noticed was a giant red X at the top of the report when you convert it to Word. It can easily be deleted, but is there an easy way to prevent it from appearing in the first place?

I asked Sharon to take a look since she is the main user of this report and the originator of this request.

Comment entered 2010-09-16 09:53:46 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-16 09:53:46
BZCOMMENTOR::Volker Englisch
BZCOMMENT::8

(In reply to comment #7)
> I noticed was a giant red X at the top

OK, if you don't like giant red Xs I'll just take it out and ... pooff ... it's gone.

There is a hidden input field on the page and Word doesn't seem to know what to do with a hidden field, so it's showing it as large as possible.
We generally need this field to move from page to page but since the report is the last page in the sequence it's not needed here and can be deleted.

Comment entered 2010-09-16 09:55:51 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2010-09-16 09:55:51
BZCOMMENTOR::Robin Juthe
BZCOMMENT::9

You are a magician! Thank you :-)

Comment entered 2010-09-21 10:05:32 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-21 10:05:32
BZCOMMENTOR::Volker Englisch
BZCOMMENT::10

Sharon reported a problem with this report which was in fact a result of the bug I had already mentioned in comment #6:

When the report (or any of our QC reports) is converted to Word IE submits the URL for the report to Word as a parameter. Something like
Word.open('yourURLHere')
The length for the URL parameter is limited by Word and cut off if it's too long. However, if Word is already open the URL is passed to Word differently and there is no (or a different) length restriction for the passed parameter.
That is the reason why Word should be opened before a report is being converted and this is true for all QC reports.

Comment entered 2010-09-24 17:37:18 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2010-09-24 17:37:18
BZCOMMENTOR::Volker Englisch
BZCOMMENT::11

The report has been copied to FRANCK and BACH:
SummaryComments.py - R9901

Please verify on BACH and close this bug.

Comment entered 2010-09-27 09:12:05 by Juthe, Robin (NIH/NCI) [E]

BZDATETIME::2010-09-27 09:12:05
BZCOMMENTOR::Robin Juthe
BZCOMMENT::12

Verified on BACH. Closing bug. Thank you!

Elapsed: 0:00:00.001877