Accuracy and CSS

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hhcmxlc0E=?=, Jan 16, 2006.

  1. 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
    =?Utf-8?B?Q2hhcmxlc0E=?=, Jan 16, 2006
    #1
    1. Advertising

  2. 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>
    Flinky Wisty Pomm, Jan 16, 2006
    #2
    1. Advertising

  3. Flinky Wisty Pomm
    thanks at least for answering!

    Cheers
    CharlesA
    =?Utf-8?B?Q2hhcmxlc0E=?=, Jan 16, 2006
    #3
  4. =?Utf-8?B?Q2hhcmxlc0E=?=

    Daniel Guest

    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

    "CharlesA" <> wrote in message
    news:...
    > 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
    >
    Daniel, Jan 16, 2006
    #4
  5. 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
    =?Utf-8?B?Q2hhcmxlc0E=?=, Jan 17, 2006
    #5
  6. =?Utf-8?B?Q2hhcmxlc0E=?=

    Dan Guest

    the css is:

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

    Hope that helps (it solves so many problems)

    --
    Dan
    "CharlesA" <> wrote in message
    news:...
    > 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
    >
    Dan, Jan 17, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PercyP
    Replies:
    5
    Views:
    545
    PercyP
    Oct 20, 2004
  2. Replies:
    15
    Views:
    620
    David Harmon
    May 5, 2005
  3. aurora
    Replies:
    3
    Views:
    385
    aurora
    Feb 2, 2005
  4. Mr Fish
    Replies:
    5
    Views:
    565
    Karl Heinz Buchegger
    Oct 21, 2005
  5. coop
    Replies:
    1
    Views:
    110
    Dr John Stockton
    Jun 20, 2006
Loading...

Share This Page