Accuracy and CSS

G

Guest

Hi folks,

I'm posting from the UK and here we use A4 sized paper which is 210mm x 297mm

I'm using IE 6 for a corporate intranet. I was maintaining an application in
MS Access 2002 that had several well formatted printable reports, and now I'm
porting the whole app to SQL server and ASP.net 1.1



here's my question:
Is it possible to create a browser-based page that uses CSS absolute width
and positioning to create a portrait (or landscape) screen-based page of just
the right dimensions so that the report prints as an access report prints ,
i.e completely predictably

I'm not asking for the CSS markup itself, just, is CSS sophisticated enough
to help me make my reports perfect, as you can imagine with corporate
reporting standards and dense amounts of data and controls I can't afford to
have anything resizing just because the browser is resized or any data being
missed off the real paper page as the reports are archived and can be used in
legal disputes.


Thanks in advance and Regards
CharlesA
 
F

Flinky Wisty Pomm

Yes, no, maybe.

CSS isn't really intended for pixel-perfect layouts, although you can
precisely control things if you really want to and you have the time
and patience.

CSS is definitely sophisticated enough for most things, but browser
implementations vary massively, and the code can be monstrous for
things which should be really simple. If you need to know that your
reports are going to look the same no matter what, have you considered
PDF?

It's probably possible, but it's the sort of suggestion that earns my
boss funny looks.

If you do pull it off, I'd love to hear from you though. </pessimism>
 
D

Daniel

Since your using an Intrnaet you know your users all have IE 6 so you wont
ned to worry about cross borwser issues, just make it work on IE6.

Off the top of my head the best method is to make a panel that through some
adjusting fits perfectly to an A4 sheet.

Once you have done that so you have an aspx page with just a panel and
nothing else i would add items to that panel to make my reports, you know it
will fit a4 because you made sure of it, everything will go in the panel and
voila.

Something i did however when i needed an output for an invoice to fit an A4
sheet and line up with a sticker ont hat sheet for labels. I made a repeater
and had the template of that repeater create a table where the table widths
would match an A4 sheet. Knowing the precise height of a table that will fit
a A4 sheet you can tell it where to put in a css break page for new pages.
That way you can make a report that can go over multiple pages neatly.

If all your reports are similar you could use that method, worked well for
me but i only needed one type of report which was the invoices. With some
adaptation i would have thought you could make it in a way that would be
generic? Hope that helps somewhat, difficult without knowing the layour or
diversity of thereports you intend to make.

there is ofcourse also SqlServers reporting ability? Might be worth looking
up
 
G

Guest

Thanks for your fullsome answer Daniel, I'll try the panel route...as SQL
server reporting is not an option in this scenario...

however just out of interest, what is a CSS break page (or page break) ,
what command is that? or do you just mean, some kind of <HR> that neatly
lines up with where a page ends and another starts?



Cheers
CharlesA
 
D

Dan

the css is:

<STYLE type="text/css">P.breakhere { PAGE-BREAK-BEFORE: always } </STYLE>

Hope that helps (it solves so many problems)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top