Click here to monitor SSC
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
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 930
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-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45066 Visits: 39904
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
brickpack
brickpack
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 930
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-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45066 Visits: 39904
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

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