SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Limiting the amount of code in an HTML rendered report


Limiting the amount of code in an HTML rendered report

Author
Message
brickpack
brickpack
Old Hand
Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)

Group: General Forum Members
Points: 382 Visits: 944
Hello...

I've once again run into issues using SSRS 2008 R2 to render reports for viewing in gmail webmail. Does anyone know of a way to limit the amount of styling code that SSRS adds to an HTML 4.0 rendered file?

Here's the issue...

I need to be able to display a formatted report in the body of an email that will be viewed using gmail webmail. In the past I've been able to get this to work using a combination of SSRS and C#... but now I've run into a new problem with a size restriction on how large the viewable email body code can be. My report is ~300k and the restriction is 101k.

Looking at the html...it's bloated with a ridiculous amount of styling code. Has anyone run into an issue with this? Have you figured out a way to limit the amount of code in these files?

Thanks
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)

Group: General Forum Members
Points: 204014 Visits: 41949
Yes. That's why I don't use SSRS for most things. The HTML bloat is ridiculous.

If you're not including any graphs in the email, lookup sp_senddbmail in Books Online and have a look at the last example where they convert a table output to HTML using a trick with FOR XML PATH. I use that method for all of my morning reports and several other things.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
brickpack
brickpack
Old Hand
Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)Old Hand (382 reputation)

Group: General Forum Members
Points: 382 Visits: 944
Thanks Jeff... I also use FOR XML PATH for some of my smaller reports. :-) I was was hoping there was some way to turn the HTML bloat off and control what gets rendered...oh well. Why can't MS just make SSRS a top of the line product. In it's current state...It really is garbage...
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)SSC Guru (204K reputation)

Group: General Forum Members
Points: 204014 Visits: 41949
brickpack (10/29/2013)
Thanks Jeff... I also use FOR XML PATH for some of my smaller reports. :-) I was was hoping there was some way to turn the HTML bloat off and control what gets rendered...oh well. Why can't MS just make SSRS a top of the line product. In it's current state...It really is garbage...


BWAAA-HAAA!!!! If you think SSRS makes for bloated HTML, you should work with Teleric controls sometime. ;-) I'm not a font-end programmer but the guys I work with say they produce insanely bloated pages.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search