Showing posts with label render. Show all posts
Showing posts with label render. Show all posts

Wednesday, March 21, 2012

how to get text (html) from "Render" method

currently i'm getting a stream back and am using [see code at end] to convert
it
what i get back on the screen is a bunch of crap like this
MIME-Version: 1.0 Content-Type: multipart/related;
boundary="--=_NextPart_01C35DB7.4B204430" X-MSSQLRS-ProducerVersion:
V8.00.878.00 This is a multi-part message in MIME format.
--=_NextPart_01C35DB7.4B204430 Content-ID: Content-Disposition: inline;
filename="DASH0014" Content-Type: text/html; name="DASH0014"; charset="utf-8"
Content-Transfer-Encoding: base64
PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiI+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPg0KREFTSDAwMTQNCjwvdGl0bGU........................etc
instead of what i was expecting - a nicely formed html doc
is it because i am converting the stream?
is there a better way of handling the stream?
am i using the wrong encoding?
thanks
a.
--CODE START
Dim result As Byte() = Nothing
...
result = rs.Render(Report, Format, HistoryID, DeviceInfo,
Parameters, Credentials, _
ShowHideToggle, Encoding, MIMEType, ParametersUsed, Warnings,
StreamIDs)
Dim star As String
Dim ec As System.Text.Encoding = System.Text.Encoding.UTF8
star = ec.GetString(result)
Message.InnerHtml = star
--CODE ENDok so i set this and it works
Dim Format As String = "HTML4.0"
(it was "MHTML")
but now i have a new problem
"adolf garlic" wrote:
> currently i'm getting a stream back and am using [see code at end] to convert
> it
> what i get back on the screen is a bunch of crap like this
> MIME-Version: 1.0 Content-Type: multipart/related;
> boundary="--=_NextPart_01C35DB7.4B204430" X-MSSQLRS-ProducerVersion:
> V8.00.878.00 This is a multi-part message in MIME format.
> --=_NextPart_01C35DB7.4B204430 Content-ID: Content-Disposition: inline;
> filename="DASH0014" Content-Type: text/html; name="DASH0014"; charset="utf-8"
> Content-Transfer-Encoding: base64
> PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
> Ly9FTiI+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPg0KREFTSDAwMTQNCjwvdGl0bGU........................etc
> instead of what i was expecting - a nicely formed html doc
> is it because i am converting the stream?
> is there a better way of handling the stream?
> am i using the wrong encoding?
> thanks
> a.
>
> --CODE START
> Dim result As Byte() = Nothing
> ...
> result = rs.Render(Report, Format, HistoryID, DeviceInfo,
> Parameters, Credentials, _
> ShowHideToggle, Encoding, MIMEType, ParametersUsed, Warnings,
> StreamIDs)
> Dim star As String
> Dim ec As System.Text.Encoding = System.Text.Encoding.UTF8
> star = ec.GetString(result)
> Message.InnerHtml = star
> --CODE END
>sql

Monday, March 12, 2012

How to get Reporting Services faster...

Ok,
I have written our invoice printing software using the rs.render on
Bryan Keller' blog (of Microsoft) to directly send the Invoice with RS
straight to the printer as an EMF. It is painfully slow, but I found
that the speed almost tripples using my development computer which uses
dual Xeon Intel processing. Unfortunately, I don't want to give up my
development machine for the shipping department.
I guess, when rendering graphics (which in this mannor is an Image
file), there is no workaround without the proper hardware. You will
need faster Image rendering processor.
The company isn't using my application yet because they may want me to
re-write it without Reporting Services because of this problem. So,
they continue to use the old asp app someone wrote a couple of years
ago which sends to dot-matrix printers (instead of my fancy, but slow
way to the NICE laser jets).
If anyone knows something I don't, after unbelieveable research and
problems with this, PLEASE let me in on your secret.
Thanks,
TrintThe difference in speed might be RAM, not processor. Is there a big
difference in RAM between the two machines? If so, upgrading RAM is a lot
cheaper than creating a new solution (or buying a new machine).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"trint" <trinity.smith@.gmail.com> wrote in message
news:1123497399.592828.55160@.o13g2000cwo.googlegroups.com...
> Ok,
> I have written our invoice printing software using the rs.render on
> Bryan Keller' blog (of Microsoft) to directly send the Invoice with RS
> straight to the printer as an EMF. It is painfully slow, but I found
> that the speed almost tripples using my development computer which uses
> dual Xeon Intel processing. Unfortunately, I don't want to give up my
> development machine for the shipping department.
> I guess, when rendering graphics (which in this mannor is an Image
> file), there is no workaround without the proper hardware. You will
> need faster Image rendering processor.
> The company isn't using my application yet because they may want me to
> re-write it without Reporting Services because of this problem. So,
> they continue to use the old asp app someone wrote a couple of years
> ago which sends to dot-matrix printers (instead of my fancy, but slow
> way to the NICE laser jets).
> If anyone knows something I don't, after unbelieveable research and
> problems with this, PLEASE let me in on your secret.
> Thanks,
> Trint
>