This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > March 2004 > Building Reports in XML ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Building Reports in XML ?
|
|
| James Pannozzi 2004-03-18, 6:30 pm |
| XML tyro seeking ideas.
I am modernizing a legacy app written in C++
which has about 25 different reports, many of which are very similar.
The C++ app builds the reports a line at a time, each of which has a heading
on each page followed by 3 or 4 columns of data of about 10-15 characters
width each,
using spaces to position the columns(an obvious bad idea but no right
justify
tabs were available for the early Rich Edit control that existed when this
program was written)..
The legacy app (C++, MFC) then was used to send the space formatted
text to the RichEdit control when the user clicked on a button.
I'd like to modernize this by dumping the Rich Edit
and building a metadata description layout of the reports
in XML, having the program send the data to the template
and let XML/Word Doc functions build the report.
Columns would be positioned by either tabs or column number
and numbers under the columns would be right justifed using
right justify tabs or, better yet, Word tables.
Can one specify column locations in XML?
Any suggestions or examples where I can find Word document descriptions
in XML specifying layout, headers, column positioning etc.
I guess the main working idea right now is that once I get
an XML description of the reports, it should be easy to
get them into a Word doc. (or should I be building the
report layout in Word and get the XML from that??).
Thanks for any guidelines, ideas, suggestions or caveats.
Jim
| |
| Neil Smith [MVP Digital Media] 2004-03-18, 6:30 pm |
| You should make the simples possible XML representation of your data
(the easy bit) then write an xslt stylesheet which transforms your xml
data into office XML (assuming you have word 2003, say).
You will need to refer to the office XML schemas to do this, but I've
done it with excel and its not too difficult once you get started -
expect to spend a couple of days the first time getting a stylesheet
together.
The schemas and docs are available for download here :
http://tinyurl.com/vgpy
Regards - Neil Smith
On Thu, 18 Mar 2004 13:48:19 -0800, "James Pannozzi"
<jpannozzi@csi.com> wrote:
>XML tyro seeking ideas.
>
>I am modernizing a legacy app written in C++
>which has about 25 different reports, many of which are very similar.
>
>The C++ app builds the reports a line at a time, each of which has a heading
>on each page followed by 3 or 4 columns of data of about 10-15 characters
>width each,
>using spaces to position the columns(an obvious bad idea but no right
>justify
>tabs were available for the early Rich Edit control that existed when this
>program was written)..
>
>The legacy app (C++, MFC) then was used to send the space formatted
>text to the RichEdit control when the user clicked on a button.
>
>I'd like to modernize this by dumping the Rich Edit
>and building a metadata description layout of the reports
>in XML, having the program send the data to the template
>and let XML/Word Doc functions build the report.
>Columns would be positioned by either tabs or column number
>and numbers under the columns would be right justifed using
>right justify tabs or, better yet, Word tables.
>
>Can one specify column locations in XML?
>
>Any suggestions or examples where I can find Word document descriptions
>in XML specifying layout, headers, column positioning etc.
>
>I guess the main working idea right now is that once I get
>an XML description of the reports, it should be easy to
>get them into a Word doc. (or should I be building the
>report layout in Word and get the XML from that??).
>
>
>Thanks for any guidelines, ideas, suggestions or caveats.
>
>
>
>Jim
>
>
>
>
========================================================
CaptionKit http://www.captionkit.com : Produce subtitled
internet media, transcripts and searchable video. Supports
Real Player, Quicktime and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.
| |
| James Pannozzi 2004-03-18, 7:30 pm |
| Thanks, I guess I was on the right track.
But, the computers supporting the target app are all using
Word 97 now.
I myself have Word 2000.
Are there conversion programs that would get me a Word97
doc from Office XML?
Thanks Again
Jim
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:405a22e6.16302712@news.blueyonder.co.uk...
> You should make the simples possible XML representation of your data
> (the easy bit) then write an xslt stylesheet which transforms your xml
> data into office XML (assuming you have word 2003, say).
>
> You will need to refer to the office XML schemas to do this, but I've
> done it with excel and its not too difficult once you get started -
> expect to spend a couple of days the first time getting a stylesheet
> together.
>
> The schemas and docs are available for download here :
> http://tinyurl.com/vgpy
>
> Regards - Neil Smith
>
> On Thu, 18 Mar 2004 13:48:19 -0800, "James Pannozzi"
> <jpannozzi@csi.com> wrote:
>
heading[color=darkred]
this[color=darkred]
>
> ========================================================
> CaptionKit http://www.captionkit.com : Produce subtitled
> internet media, transcripts and searchable video. Supports
> Real Player, Quicktime and Windows Media Player.
>
> VideoChat with friends online, get Freshly Toasted every
> day at http://www.fresh-toast.net : NetMeeting solutions
> for a connected world.
| |
| Neil Smith [MVP Digital Media] 2004-03-19, 3:31 pm |
| No. Office before 2000 doesn't support XML at all. Ever.
The best you can do afaik is to download to the client html formatted
text and cross your fingers. This kind-of-works with excel to get
*data* into the client (I think you have to send a header
vnd.microsoft.excel , you'll need to check on this). But there will be
no formatting, or formulas, or in the case of word probably anything.
Sorry - your customers will have to get software produced in this
millenium ;-)
Is there any reson why you can't use IE and something like a richedit
tool, and do all the content management on the web server ?
On Thu, 18 Mar 2004 15:06:37 -0800, "James Pannozzi"
<jpannozzi@csi.com> wrote:
>Thanks, I guess I was on the right track.
>
>But, the computers supporting the target app are all using
>Word 97 now.
>
>I myself have Word 2000.
>
>Are there conversion programs that would get me a Word97
>doc from Office XML?
>
>Thanks Again
>Jim
>
>"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
>news:405a22e6.16302712@news.blueyonder.co.uk...
>heading
>this
>
>
========================================================
CaptionKit http://www.captionkit.com : Produce subtitled
internet media, transcripts and searchable video. Supports
Real Player, Quicktime and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.
| |
| James Pannozzi 2004-03-19, 3:31 pm |
| I just got word that we are allowed
to Upgrade Everyone to Word 2000!
I will initially build the XML structured data and the XSL stylesheet
for the simplest of our reports
So, the question becomes is there a conversion program or a plug-in
that gets us a Word 2000 document or an Excel 2000 spreadsheet
from the XML/XSL that I manually build.
There must be, or perhaps some direct plug-ins, I will google.
Thanks again for the assistance and for any other advice.
Jim
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:405b46cc.1267622@news.blueyonder.co.uk...
> No. Office before 2000 doesn't support XML at all. Ever.
>
> The best you can do afaik is to download to the client html formatted
> text and cross your fingers. This kind-of-works with excel to get
> *data* into the client (I think you have to send a header
> vnd.microsoft.excel , you'll need to check on this). But there will be
> no formatting, or formulas, or in the case of word probably anything.
>
> Sorry - your customers will have to get software produced in this
> millenium ;-)
>
> Is there any reson why you can't use IE and something like a richedit
> tool, and do all the content management on the web server ?
>
> On Thu, 18 Mar 2004 15:06:37 -0800, "James Pannozzi"
> <jpannozzi@csi.com> wrote:
>
characters[color=darkred]
descriptions[color=darkred]
>
> ========================================================
> CaptionKit http://www.captionkit.com : Produce subtitled
> internet media, transcripts and searchable video. Supports
> Real Player, Quicktime and Windows Media Player.
>
> VideoChat with friends online, get Freshly Toasted every
> day at http://www.fresh-toast.net : NetMeeting solutions
> for a connected world.
| |
| Neil Smith [MVP Digital Media] 2004-03-20, 9:29 am |
| OK well thats a start, although that software is now @ 4 years old. It
still afaik doesn't have the 1/2 decent XML support of office 2003,
but its a start.
Try looking at some of the namespaces used for office 2003 in this
example document, you should be able to see how it all works :
http://udell.roninhouse.com/bytecols/2000-04-05.html
Then note the various problems introduced by word in exporting data as
xhtml style content - you are likely to hit the same problems with
document exchange between your app and the clients.
This article might also be a good read for lunchtime -
http://www.cmswatch.com/Features/To.../?feature_id=98
Cheers - Neil.
On Fri, 19 Mar 2004 11:25:27 -0800, "James Pannozzi"
<jpannozzi@csi.com> wrote:
> I just got word that we are allowed
>to Upgrade Everyone to Word 2000!
>
>I will initially build the XML structured data and the XSL stylesheet
>for the simplest of our reports
>
>So, the question becomes is there a conversion program or a plug-in
>that gets us a Word 2000 document or an Excel 2000 spreadsheet
>from the XML/XSL that I manually build.
>
>There must be, or perhaps some direct plug-ins, I will google.
>
>Thanks again for the assistance and for any other advice.
>
>Jim
>
>"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
>news:405b46cc.1267622@news.blueyonder.co.uk...
>characters
>descriptions
>
>
========================================================
CaptionKit http://www.captionkit.com : Produce subtitled
internet media, transcripts and searchable video. Supports
Real Player, Quicktime and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.
| |
| Neil Smith [MVP Digital Media] 2004-03-22, 4:31 pm |
| On Mon, 22 Mar 2004 09:24:01 -0800, "James Pannozzi"
<jpannozzi@csi.com> wrote:
>
>Next I would break out the positioining and style logic into a seperate
>module leaving just the line by line data building in the original module.
>(But then again, I would have to invent my own positioning and style
>descriptors and XML already has them).
I'm not aware of either XML or xslt having visual display properties -
although css does this job extremely well. Is that what you meant ?
| |
| James Pannozzi 2004-03-22, 6:32 pm |
| I meant "Put this column here and that one there and make the heading of the
first column and second column be in a bold font of a larger size than the
rest of the document.
I found a nice overview of building an Excel spreadsheet report in XML
in Volume3 No. 5 of XML Journal.
In their description, the XML document (raw data of the report)
and the XSL spreadsheet (layout inoformation using style tags)
after being built, must be combined into an MS Excel XML Spreadsheet format.
Alas this is for Office 2002 and it does not seem as though Office 2000
supports this
format.
But the general idea is clear enough.
I must search for some add-ons to Office 2000.
It really seems like XML is the way to go - there is much that it can do
and the abstractions into raw data, stylesheets and data querying make
sense.
And the whole blessed thing is in text, so you just find a programmer's
editor with some reasonable syntactical/semantical colorization, angle
bracket matching
and well formed XML validity checks and your ready
to go.
Thanks
Jim
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:405f41e2.3317530@news.blueyonder.co.uk...
> On Mon, 22 Mar 2004 09:24:01 -0800, "James Pannozzi"
> <jpannozzi@csi.com> wrote:
>
module.[color=darkred]
>
> I'm not aware of either XML or xslt having visual display properties -
> although css does this job extremely well. Is that what you meant ?
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|