473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to format xml/xls web report for specific paper size and orientation?"

When I export xml(and xls) from Access 2003 the result is a complete
report in a single page. I would like to get the entire report in a
single page (one trip to the server) for printing and
scrolling-preview, but with page breaks and page numbering appropriate
to the paper size.

I have a sense that this can be done in xsl, since xsl defines the
format for everything else in the report. My goal is to avoid the time
and expense of rebuilding these reports in VS or Crystal, or even using
a less expensive third-party product to generate, say, pdf's on the
fly. All I want is an asp or html document that's formatted for
printing like a normal printed report. Shouldn't Access and .NET be
enough? Why can't Access' ExportXML method handle this, or can it???

Any thoughts would be greatly appreciated.

Bob

Nov 13 '05 #1
5 4118
Hmm, interesting thread you've started. I work with classic Access and
classic Access objects as that's the common deliverable to my clients so
was interested in your original posting and this one.

I took Access 2003 -> xml for a drive just now and made some mental notes.

bc******@bmghomes.com wrote:
When I export xml(and xls) from Access 2003 the result is a complete
report in a single page. I would like to get the entire report in a
single page (one trip to the server) for printing and
scrolling-preview, but with page breaks and page numbering appropriate
to the paper size.
Several issues here. I just outputted Northwind's Invoice report to XML
and saw megabyte files - 2Mb of .xml etc.. being output. This looks like
the box and dice from the Invoice table.

1. This is a lot to send out in one chunk to a web browser. Any
professional service would have sent it out as several pages. If it has
to be that size, Acrobat format is generally understood and acceptable.
A single webpage isn't

2. Classic webpages just "don't" break naturally in paper page sizes.
This is not something a webpage understands. Even screenfuls are not
understood by webpage technology because one often can only assume that
the browser is currently 800x600 or 1024x768 pixels per screen.

CSS2 - http://www.w3schools.com/css/css_ref_print.asp
implements the paper page concept - but then you have to make sure that
the recipient's web browser implements CSS2.
printing like a normal printed report. Shouldn't Access and .NET be
enough? Why can't Access' ExportXML method handle this, or can it???


Access as a desktop database manager, could be extended simply by
providing a whole raft of pre-programmed XSL formats, server side
"templates" with server side processing which allow paging by the
screenful, CSS2 layouts etc...

From what I just tested of Access 2003, it's early days - supplying
less than a handful of files (or a default template via ExportXML) in

%program files%\Microsoft Office\OFFICE\AccessWeb\

is not really a teaser rather than anything serious.

I guess the Access team has to decide where Access ends and other
reporting products like SQL Server Report Builder:

http://www.developer.com/db/article.php/3520116

begin. Or whether the two teams are in competition. Or whether they can
borrow each other's tools.

..NET isn't in the picture - it isn't even a tool - it's a programming
framework - you build tools with it.

HTH
Nov 13 '05 #2
Thanks, Ananda!

The more I read the more I suspect that XSL-FO can specify paper-size
and put page breaks in a single web page built from xml and xslt. (The
trick is finding documentation on FO, but I'm working on that too.)
Yes, you get all the report's "pages" in a single asp or html page, but
the pages break and number correctly for printing. Our reports will
typically not be so large as to make the page excessively large or slow
to download. In fact, they would be no larger than pages containing
search results at Google, even with the additional tags used for
layout. We no longer run reams of report output, and if we ever had to
they would be run in the office where our web servers and db servers
live -- no bandwidth issues.

SQL Server Reporting Services is my favorite option IF I can't do it
more simply. My goal is to avoid rebuilding a large number of reports
from scratch, and I feel like I'm almost there.

CSS is certainly an option, but I prefer to stick with XSL until my
theory is proven wrong. CSS would, again, involve too much work to
format so many reports.

I never considered screen resolution as an issue. It would only bear
on previewing in the browser, not on printing.

..NET is definitely in the picture but, as you say, the Access and .NET
teams probably need to spend more time together. You may not be aware
that the .net report class does indeed support paper size, and
overrides the page class to do exactly what I'm after. But, it
astounds me that every example I've seen using the Access ExportXML
method uses vbscript, and the method itself can only generate an asp
(or html) page -- not an aspx! In fact, you can easily make the report
dynamic with a little bit of code, but even that has to be done with
vbscript! I thought that by the time Access 2003 appeared we'd be
standardizing on vb, or at least exporting Access objects to
..net-compatible objects for web use, leaving vba out of the process.

I frankly don't care where Microsoft draws the line between Access and
other reporting products, but if Access is capable of exporting a
report to asp+xml+xsl, then it should do the whole job and support the
paper size/orientation as well.

Thanks for your reply. I'm going to continue my quest.

Bob

Nov 13 '05 #3
bc******@bmghomes.com wrote:
Thanks, Ananda!
No probs.

The more I read the more I suspect that XSL-FO can specify paper-size
and put page breaks in a single web page built from xml and xslt. (The
trick is finding documentation on FO, but I'm working on that too.)
XML topics are very well documented (sometimes in very formal language)
- XML is a w3c initiative and non proprietary. Here's my jump off
webpage on XSLT and XSL-FO

http://accesscoach.wikispaces.org/XSLT+Topics

XSL-FO is an intermediate formatting vocabulary - it is not an end in
itself.

XML data -> XSLT transformation instructions -> text based output

output can be

XHTML final document
XSL-FO intermediate document
etc...

XSL-FO -> XSL-FO processor -> final output

final output can be

PDF
RTF
etc...
Yes, you get all the report's "pages" in a single asp or html page, but
the pages break and number correctly for printing. Our reports will
What kinda HTML source is it outputting? I am not aware of any HTML code
that says "page break here".

http://www.htmlhelp.com/reference/html40/
CSS is certainly an option, but I prefer to stick with XSL until my
theory is proven wrong. CSS would, again, involve too much work to
format so many reports.
CSS is not a thing you do. CSS can be an external stylesheet that is
referenced by each HTML document output and defines styles for
everything (like Word's Heading 1, 2, 3, Normal Style)

I never considered screen resolution as an issue. It would only bear
on previewing in the browser, not on printing.
Try making a plain HTML document with a lot of text with no spaces in a
long line and fixed width tables. Then view it in your browser - it will
not view without scrolling. Now try printing it. It will be cut off.

.NET is definitely in the picture but, as you say, the Access and .NET
teams probably need to spend more time together. You may not be aware
It makes things clearer if we use relevant terms. .NET is a programming
library. Visual Studio is a development tool that has lots of facilities
and features. You use Visual Studio to create a program which relies on
the .NET library. I assume you're talking about the Visual Studio team
or the SQL Server team.
that the .net report class does indeed support paper size, and
overrides the page class to do exactly what I'm after. But, it
I'm not familiar with that. Are you talking of the Visual Studio
facility which has a report designer? If you are, that's a VS thing, not
a .NET thing.
astounds me that every example I've seen using the Access ExportXML
method uses vbscript, and the method itself can only generate an asp
(or html) page -- not an aspx! In fact, you can easily make the report
dynamic with a little bit of code, but even that has to be done with
vbscript! I thought that by the time Access 2003 appeared we'd be
standardizing on vb, or at least exporting Access objects to
.net-compatible objects for web use, leaving vba out of the process.


Not a lot of Office 11/2003 is .NET aware. There are considerable moves
in Office 12 apparently to make a good show, but Office 11/2003 .NET
exposure was through products like Visual Studio Tools for Office, a few
token XML output formats.

HTH
Nov 13 '05 #4
Thanks again, Ananda!

By "page break" I'm refering to xsl's recognition of where the page
break would occur for a particular paper size, and then formatting the
resulting page with page-breaking <br>'s and report page footers
accordingly, including page numbers for printing.

I know this can be done in xsl; I'm just trying to get a handle on the
syntax that makes it work. VS is a powerful tool (I'm trained in it,
and I've used it) but, again, I'm hoping to avoid having to rebuild
reports that Access can export as xml. The xsl format oject can do the
job, I just need to figure out how.

CSS is wonderful (I use lots of it) but it is, again, something that
doesn't just happen. Styles have to be created. Since the
automatically generated xsl already contains the styles I need, I'd
prefer to avoid the work of replacing it.

I'm not refering to VS in suggesting that the two teams work this out,
but Access. Since Access creates a ReportML with page setup properties
in it when exporting a report to xml , I would expect that the xsl it
generates would (at least optionally) account for things like paper
size. But it doesn't, and I see no reason why that couldn't have been
addressed in Access' xsl generator.

I appreciate your time and thoughts very much. Thanks again.

Bob

Nov 13 '05 #5
bc******@bmghomes.com wrote:
Thanks again, Ananda!
Fascinating discussion Bob.

By "page break" I'm refering to xsl's recognition of where the page
break would occur for a particular paper size, and then formatting the
resulting page with page-breaking <br>'s and report page footers
accordingly, including page numbers for printing. but Access. Since Access creates a ReportML with page setup properties
in it when exporting a report to xml , I would expect that the xsl it
generates would (at least optionally) account for things like paper
size. But it doesn't, and I see no reason why that couldn't have been
addressed in Access' xsl generator.

So you're taking the approach of counting lines? Rather like we would do
in Quick Basic outputting to non graphic 66 line perforated paper on an
Epson FX-80 printer? How do you handle current generation proportional
fonts with different font heights, graphic logo inserts, the odd
horizontal line and automatic wrap around in <table> tags?

Are you sending everything out in Courier 10?

Or, on reflection (my own, not .NET's <grin>) you are hoping to go

Access Report -> XSL-FO document -> XSL-FO renderer + XHTML / CSS
formatting engine -> formatted XHTML for screen and print layouts.

<Jaw drops open in amazement>

I know this can be done in xsl; I'm just trying to get a handle on the
syntax that makes it work. VS is a powerful tool (I'm trained in it,
http://www.w3schools.com/xsl/default.asp

has lots of tutorials and syntax demoes in XSLT and XSL-FO.

also

<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k2/html/odc_acc2xslt.asp>

and I've used it) but, again, I'm hoping to avoid having to rebuild
reports that Access can export as xml. The xsl format oject can do the
job, I just need to figure out how.


I think that's the practical key point. Access 2003 generates ReportML
data, not xsl-fo formatting page markup.

Ananda
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: RussC | last post by:
(If this is not posted in the right place, please let me know what the right place is...) I understand that French Windows Explorer uses "Ko" as the file size units where English would use "KB". ...
0
by: Desmond | last post by:
hi, I am trying to print a report (custom paper size- 8.5inchx5.5inch) to a panasonic KX1121 dot matrix printer using crystal report that comes with vs.net 2003. The report print & preview ok...
5
by: Brian DSouza | last post by:
I got the following code from an earlier posting (much earlier, like 1999) in this ng. This is supposed to control the paper size selected to legal, even if the default printer changes. Question is...
5
by: Ira S | last post by:
I use a DYMO labelwriter with my Access 97 database. I just purchased a new computer and in the report section under page setup/paper size, the new computer keeps changing the size automatically. I...
0
by: Anniech | last post by:
I use VB.NET to integrate with crystal report 9.0 to print a report with custom paper size (using Dot Matrix printer). I have already added a custom paper size in the printer server and set the...
6
by: Brewtzaff | last post by:
Hello, I have a little problem to print my reports on custom sized paper. I got a db containing clubmembers, a query which selects only the needed infos to print out my membershipcards. My...
0
by: Patrick | last post by:
I am using Vb dot net 2003 with Crystal Report. I need to design a report to be printed on a pre-printed paper which size is 8.50" * 12". On the driver of the default printer, I created a new...
3
by: brianflannery | last post by:
Greetings all! My problem is this. I've installed a new printer on my computer. This is the "default printer" for access. Now, some of my reports, which were working fine with the old printer,...
2
by: Serenityquinn15 | last post by:
Hi! I just want to know how I can setup my data report into legal size format except in print setup.... Do I need to Create a code or what the best and easy way to make this? I use the code:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.