Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Thursday, March 29, 2012

Embedding literals in RDL that will come through in HTML

I am trying to create some reports that when rendered in HTML are supposed to have some interactivity built into them. I understand that there aren't any facilities in RDL itself that would help facilitate this process for me, but is there any way to embed some literal strings that will come through in the HTML?

The items I'm trying to finesse through are <script> blocks, checkboxes, and <object> tags. When I use the designer to put these items into textboxes, they get encoded with the HTML values (&gt; instead of >, etc...) so that the code is displayed instead of interpreted.

I thought maybe there would be a VB function that I can wrap around the HTML to prevent it from being encoded so that when the report is displayed on the screen that the interactive elements are there.

Any ideas?

I think this relates to formatting text within a cell, which does not appear to be possible. Perhaps some sort of javascript which will change the innerHTML of the report document?|||

Thanks for the response.

I think that I have solved the problem for my situation. Here's what I've discovered so far:

If you use a textbox control, you can set the value of it to an HTML snippet (I'm using an object tag with some param tags as well as checkbox controls). When the report is rendered to HTML, the HTML that was embedded into the report shows as source on the page. I've taken that HTML, saved it off to a file and modified it using some .NET classes. Specifically the HTTPUtility.HtmlDecode function. That function will take the HTML file and undo all of the encoding that Reporting Services has done to your HTML. I also did a small test where I inserted a "&lt;" character somewhere else in the HTML document to simulate something that may actually occur. When I decoded the file that time, all of the encoded HTML snippets were properly decoded, and the less than sign was left alone.

If someone were rendering using the Web Service APIs for Reporting Services, this would work because you are given the stream back. In the case of using a WebForms ReportViewer though, it might be more difficult.

I hope this helps anyone who has a similar problem.

|||Sounds interesting, can you post the code or a snippet of it?
This may help MS to build as a feature in the next SP as this seems like a pretty common thing (how do I embed html/change style within a text box)|||

Hi Ken,

i'm new with sql reporting service, may i know anyway to make my report export with html format and allow me to send to customer using the ms outlook?

my report contain chart and also table, and image.

i did trying to export using mhtml, but after i send it using the email. at my desktop i able to see it. but my manager not able to read all the image and chart.

thanks for your help.

|||

Hello,

Can you please share the code or detail the approach you have taken?

Thanks

Embedding literals in RDL that will come through in HTML

I am trying to create some reports that when rendered in HTML are supposed to have some interactivity built into them. I understand that there aren't any facilities in RDL itself that would help facilitate this process for me, but is there any way to embed some literal strings that will come through in the HTML?

The items I'm trying to finesse through are <script> blocks, checkboxes, and <object> tags. When I use the designer to put these items into textboxes, they get encoded with the HTML values (&gt; instead of >, etc...) so that the code is displayed instead of interpreted.

I thought maybe there would be a VB function that I can wrap around the HTML to prevent it from being encoded so that when the report is displayed on the screen that the interactive elements are there.

Any ideas?

I think this relates to formatting text within a cell, which does not appear to be possible. Perhaps some sort of javascript which will change the innerHTML of the report document?|||

Thanks for the response.

I think that I have solved the problem for my situation. Here's what I've discovered so far:

If you use a textbox control, you can set the value of it to an HTML snippet (I'm using an object tag with some param tags as well as checkbox controls). When the report is rendered to HTML, the HTML that was embedded into the report shows as source on the page. I've taken that HTML, saved it off to a file and modified it using some .NET classes. Specifically the HTTPUtility.HtmlDecode function. That function will take the HTML file and undo all of the encoding that Reporting Services has done to your HTML. I also did a small test where I inserted a "&lt;" character somewhere else in the HTML document to simulate something that may actually occur. When I decoded the file that time, all of the encoded HTML snippets were properly decoded, and the less than sign was left alone.

If someone were rendering using the Web Service APIs for Reporting Services, this would work because you are given the stream back. In the case of using a WebForms ReportViewer though, it might be more difficult.

I hope this helps anyone who has a similar problem.

|||Sounds interesting, can you post the code or a snippet of it?
This may help MS to build as a feature in the next SP as this seems like a pretty common thing (how do I embed html/change style within a text box)|||

Hi Ken,

i'm new with sql reporting service, may i know anyway to make my report export with html format and allow me to send to customer using the ms outlook?

my report contain chart and also table, and image.

i did trying to export using mhtml, but after i send it using the email. at my desktop i able to see it. but my manager not able to read all the image and chart.

thanks for your help.

|||

Hello,

Can you please share the code or detail the approach you have taken?

Thanks

sql

Embedding literals in RDL that will come through in HTML

I am trying to create some reports that when rendered in HTML are supposed to have some interactivity built into them. I understand that there aren't any facilities in RDL itself that would help facilitate this process for me, but is there any way to embed some literal strings that will come through in the HTML?

The items I'm trying to finesse through are <script> blocks, checkboxes, and <object> tags. When I use the designer to put these items into textboxes, they get encoded with the HTML values (&gt; instead of >, etc...) so that the code is displayed instead of interpreted.

I thought maybe there would be a VB function that I can wrap around the HTML to prevent it from being encoded so that when the report is displayed on the screen that the interactive elements are there.

Any ideas?

I think this relates to formatting text within a cell, which does not appear to be possible. Perhaps some sort of javascript which will change the innerHTML of the report document?|||

Thanks for the response.

I think that I have solved the problem for my situation. Here's what I've discovered so far:

If you use a textbox control, you can set the value of it to an HTML snippet (I'm using an object tag with some param tags as well as checkbox controls). When the report is rendered to HTML, the HTML that was embedded into the report shows as source on the page. I've taken that HTML, saved it off to a file and modified it using some .NET classes. Specifically the HTTPUtility.HtmlDecode function. That function will take the HTML file and undo all of the encoding that Reporting Services has done to your HTML. I also did a small test where I inserted a "&lt;" character somewhere else in the HTML document to simulate something that may actually occur. When I decoded the file that time, all of the encoded HTML snippets were properly decoded, and the less than sign was left alone.

If someone were rendering using the Web Service APIs for Reporting Services, this would work because you are given the stream back. In the case of using a WebForms ReportViewer though, it might be more difficult.

I hope this helps anyone who has a similar problem.

|||Sounds interesting, can you post the code or a snippet of it?
This may help MS to build as a feature in the next SP as this seems like a pretty common thing (how do I embed html/change style within a text box)|||

Hi Ken,

i'm new with sql reporting service, may i know anyway to make my report export with html format and allow me to send to customer using the ms outlook?

my report contain chart and also table, and image.

i did trying to export using mhtml, but after i send it using the email. at my desktop i able to see it. but my manager not able to read all the image and chart.

thanks for your help.

|||

Hello,

Can you please share the code or detail the approach you have taken?

Thanks

Embedding HTML in a Report

Does anyone know of a time frame on when SQL 2005 Reporting Services
will be able to handle the embedding of HTML into a report? I saw on
an old post that it is was supposed to be released in a follow on SP.
Does anyone have suggestions in displaying HTML into a field in a
report beyond converting it to an image first?On Apr 18, 4:17 pm, cara...@.gmail.com wrote:
> Does anyone know of a time frame on when SQL 2005 Reporting Services
> will be able to handle the embedding of HTML into a report? I saw on
> an old post that it is was supposed to be released in a follow on SP.
> Does anyone have suggestions in displaying HTML into a field in a
> report beyond converting it to an image first?
In terms of the time frame, I'm not sure; however, you could try a
workaround of using the Jump to URL property of a report control.
Sorry I could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Apr 19, 6:50 am, EMartinez <emartinez...@.gmail.com> wrote:
> On Apr 18, 4:17 pm, cara...@.gmail.com wrote:
> > Does anyone know of a time frame on whenSQL2005 Reporting Services
> > will be able to handle theembeddingofHTMLinto areport? I saw on
> > an old post that it is was supposed to be released in a follow on SP.
> > Does anyone have suggestions in displayingHTMLinto a field in a
> >reportbeyond converting it to an image first?
> In terms of the time frame, I'm not sure; however, you could try a
> workaround of using the Jump to URL property of areportcontrol.
> Sorry I could not be of greater assistance.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
Where can I find how to do that "Jump to URL" work around?|||On Apr 19, 8:01 am, Mike512 <mmahon...@.gmail.com> wrote:
> On Apr 19, 6:50 am, EMartinez <emartinez...@.gmail.com> wrote:
>
> > On Apr 18, 4:17 pm, cara...@.gmail.com wrote:
> > > Does anyone know of a time frame on whenSQL2005 Reporting Services
> > > will be able to handle theembeddingofHTMLinto areport? I saw on
> > > an old post that it is was supposed to be released in a follow on SP.
> > > Does anyone have suggestions in displayingHTMLinto a field in a
> > >reportbeyond converting it to an image first?
> > In terms of the time frame, I'm not sure; however, you could try a
> > workaround of using the Jump to URL property of areportcontrol.
> > Sorry I could not be of greater assistance.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
> Where can I find how to do that "Jump to URL" work around?
First you will want to deploy the HTML file to the webserver/IIS so
that a hyperlink can access it.
Then, depending on how you want to do it, add a report control (table/
image/textbox) to the report in Layout view, select the Properties
(via right-click), select the Navigation tab, and below 'Hyperlink
action:' select Jump to URL and enter in the URL of the newly deployed
HTML file (i.e., http://localhost/SomeVirtualDirectoryName/HTMLFileName.html).
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||One other option is to have dotnet code (behind report or an assembly) that
strips the html control characters from the text.
I haven't done this but I know that people have done this.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mike512" <mmahon512@.gmail.com> wrote in message
news:1176987680.073062.65410@.d57g2000hsg.googlegroups.com...
> On Apr 19, 6:50 am, EMartinez <emartinez...@.gmail.com> wrote:
>> On Apr 18, 4:17 pm, cara...@.gmail.com wrote:
>> > Does anyone know of a time frame on whenSQL2005 Reporting Services
>> > will be able to handle theembeddingofHTMLinto areport? I saw on
>> > an old post that it is was supposed to be released in a follow on SP.
>> > Does anyone have suggestions in displayingHTMLinto a field in a
>> >reportbeyond converting it to an image first?
>> In terms of the time frame, I'm not sure; however, you could try a
>> workaround of using the Jump to URL property of areportcontrol.
>> Sorry I could not be of greater assistance.
>> Regards,
>> Enrique Martinez
>> Sr. Software Consultant
> Where can I find how to do that "Jump to URL" work around?
>|||Thanks for the reply. At first I was trying to retain the HTML in the report
then I just decided to scrap it. So I did that by adding this function:
This was taken from this guy and convert to VB:
http://weblogs.asp.net/rosherove/archive/2003/05/13/6963.aspx
To call the function in the Expression Editor of the textbox just use:
=Code.StripHTML(Fields!<whateverfieldyouwanttostriphtmlfrom>.Value)
I hope this helps someone just trying to strip the HTML out since MS hasn't
hacked out a friggin control to render it.
Cheers,
Mike
"EMartinez" wrote:
> On Apr 19, 8:01 am, Mike512 <mmahon...@.gmail.com> wrote:
> > On Apr 19, 6:50 am, EMartinez <emartinez...@.gmail.com> wrote:
> >
> >
> >
> > > On Apr 18, 4:17 pm, cara...@.gmail.com wrote:
> >
> > > > Does anyone know of a time frame on whenSQL2005 Reporting Services
> > > > will be able to handle theembeddingofHTMLinto areport? I saw on
> > > > an old post that it is was supposed to be released in a follow on SP.
> > > > Does anyone have suggestions in displayingHTMLinto a field in a
> > > >reportbeyond converting it to an image first?
> >
> > > In terms of the time frame, I'm not sure; however, you could try a
> > > workaround of using the Jump to URL property of areportcontrol.
> > > Sorry I could not be of greater assistance.
> >
> > > Regards,
> >
> > > Enrique Martinez
> > > Sr. Software Consultant
> >
> > Where can I find how to do that "Jump to URL" work around?
> First you will want to deploy the HTML file to the webserver/IIS so
> that a hyperlink can access it.
> Then, depending on how you want to do it, add a report control (table/
> image/textbox) to the report in Layout view, select the Properties
> (via right-click), select the Navigation tab, and below 'Hyperlink
> action:' select Jump to URL and enter in the URL of the newly deployed
> HTML file (i.e., http://localhost/SomeVirtualDirectoryName/HTMLFileName.html).
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||> Does anyone have suggestions in displaying HTML into a field in a
> report beyond converting it to an image first?
Yes, I do. But I'm going to start sounding like a broken record <g>.
You can do this by taking the XML output and applying an XSLT to it! It's
really up to you to decide how the HTML output looks, not what they decided
to provide as an HTML presentation.
The catch here would be how you wanted to display that report in other
formats, such as PDF. You can write XSLT to go to (say) rich text or post
script or use XSL:FO.
But you're still going to have to manage the impedance mismatch between the
HTML formatting you're trying to reproduce and these other formats. That's
why "converting to an image" makes sense to a lot of people -- it's not the
HTML display that's the problem, it's the multiple output targets that have
to render that HTML field.
HTML, almost by definition, mixes formatting and content. That's why it's a
PITA for any reporting engine with multiple output targets. You have to
separate the two and then translate the formatting so you can apply it to
the content as appropriate to the current target.
>L<
<caragav@.gmail.com> wrote in message
news:1176931060.300151.199480@.y5g2000hsa.googlegroups.com...
> Does anyone know of a time frame on when SQL 2005 Reporting Services
> will be able to handle the embedding of HTML into a report? I saw on
> an old post that it is was supposed to be released in a follow on SP.
> Does anyone have suggestions in displaying HTML into a field in a
> report beyond converting it to an image first?
>

embedding html

Just curious if anyone has any hints to embed HTML directly into a report. I
am doing reports that will be exported to excel when run as a subscription
and using an index (which jump to bookmarks) and page breaks to get each
report onto new tabs.
My current report, done with a different tool, has 2 "Help" tabs that are
formatted text that describe how to interpret the report. I need to
replicate this in reporting services. One problem is that textbox in RS is
way too limited in its functionality.
I could probably link out to an HTML page, but I want the new help tabs to
export to excel along with the report.
Any ideas?I can't think of a way until HTML is supported in text boxes.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"asnewbie+rs=argh" <asnewbiersargh@.discussions.microsoft.com> wrote in
message news:DDC6A10A-32BE-43BE-9296-F2B64769DEAA@.microsoft.com...
> Just curious if anyone has any hints to embed HTML directly into a report.
> I
> am doing reports that will be exported to excel when run as a subscription
> and using an index (which jump to bookmarks) and page breaks to get each
> report onto new tabs.
> My current report, done with a different tool, has 2 "Help" tabs that are
> formatted text that describe how to interpret the report. I need to
> replicate this in reporting services. One problem is that textbox in RS
> is
> way too limited in its functionality.
> I could probably link out to an HTML page, but I want the new help tabs to
> export to excel along with the report.
> Any ideas?

Tuesday, March 27, 2012

Embedded Images

Is there any way to embed images when you want to view a report in HTML?
From what I can tell... RS makes a copy of the embedded image... and then
references this copy (hosted on the report server) in the HTML... however,
the application I use to generate the report doesn't allow direct access to
the reporting server... which complicates things a bit... has anyone else
dealt with this issue?Render report as MHTML
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"MER78" <MER78@.discussions.microsoft.com> wrote in message
news:F2682F11-DDDF-45E3-A81F-1A1193B1B3B7@.microsoft.com...
> Is there any way to embed images when you want to view a report in HTML?
> From what I can tell... RS makes a copy of the embedded image... and then
> references this copy (hosted on the report server) in the HTML... however,
> the application I use to generate the report doesn't allow direct access
> to
> the reporting server... which complicates things a bit... has anyone else
> dealt with this issue?sql

Embedded HTML in RS 2005?

Reporting Services is a great product, especially considering that is a 1.x
release. Unfortunately, not being able to render embedded HTML (in report
data) is a serious limitation. This is a critical need for our business.
I would like to know from a MSFT source if this will be supported in SQL
Server 2005? What is the timeframe for this?
Thanks,
Jeremy Carter
ING Investment ManagementWe are aware that embedded rich text is very important for many of our
customers. However we didn't have time to add this in SQL Server 2005
Reporting Services. This will be added in a future version.
--
Rajeev Karunakaran [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JerC" <JerC@.discussions.microsoft.com> wrote in message
news:1E2BB6D8-2A77-4616-A578-879C33F2DABA@.microsoft.com...
> Reporting Services is a great product, especially considering that is a
> 1.x
> release. Unfortunately, not being able to render embedded HTML (in report
> data) is a serious limitation. This is a critical need for our business.
> I would like to know from a MSFT source if this will be supported in SQL
> Server 2005? What is the timeframe for this?
> Thanks,
> Jeremy Carter
> ING Investment Management
>

Embed HTML tags into report fields

I have a need to render data returned from a relational DB with spacing intact. The application is a viewer for input data so the end user can determine if the input data is different than the file layout specified so the data will be parsed correctly, so spacing is critical.

I changed to a fixed-pitch font to ensure that the text records align properly in VS (which they do), but when I render to HTML, the spaces collapse (of course). PDFs render correctly, but we were trying for HTML output.

Is there any way to replace the native spaces with &nbsp; so it will render correctly in HTML? From the other posts, it seems not, but I want to double check.

If anyone knows of a way to do this, I would appreciate any insight.

Thx.See http://blogs.msdn.com/bimusings/archive/2005/12/14/503648.aspx.sql

Embed HTML tags into report fields

I have a need to render data returned from a relational DB with spacing intact. The application is a viewer for input data so the end user can determine if the input data is different than the file layout specified so the data will be parsed correctly, so spacing is critical.

I changed to a fixed-pitch font to ensure that the text records align properly in VS (which they do), but when I render to HTML, the spaces collapse (of course). PDFs render correctly, but we were trying for HTML output.

Is there any way to replace the native spaces with &nbsp; so it will render correctly in HTML? From the other posts, it seems not, but I want to double check.

If anyone knows of a way to do this, I would appreciate any insight.

Thx.See http://blogs.msdn.com/bimusings/archive/2005/12/14/503648.aspx.

Thursday, March 22, 2012

Email the results of the query

Hello,

I want to email the results of the query. The query output can be email either as the HTML body of the email to be sent or as a excel attachement.

I am wondering as to what would be the best way to achive this.

a) I could have a email client module in C# or VB.NET 2.0, which would fetch the query resultset and store it in a dataset. I format it as HTML body and send the email using System.NET. For excel, can use XSLT

Please suggest if there is any other approach that would be more suitable.

Thanks.

Check here to view a similar posting from earlier today.|||

Found what I was looking for. So here goes

Solution was Configure Database Mail and then use the msdb.dbo.sp_send_dbmail stored procedure. For your reference http://builder.com.com/5100-6388-6164310.html