This is a migrated thread and some comments may be shown as answers.

print report html script also

1 Answer 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pramod
Top achievements
Rank 1
pramod asked on 30 Mar 2009, 09:49 AM
hi  i am pramod
i using telerik reporting very heavily i have one issue regarding text formating
i embedded html table in one string and and take on textbox on report and give string value to textbox
my string TodisplayList

            ToDisplayList = @"<table cellpadding='0' cellspacing='0' border='1' width='570'>";
            ToDisplayList += @"<tr  bgColor='#cbccd1'><td align='center'> <b>" + "Services" + "</b></td align='center'>" + "<td><b>" +                 "Duration" + "</b></td> " + "<td><b>" + "Appointments" + "</b></td>" + "<td><b>" + "Average" + "</b></td></tr>";
            while (_enumerator1.MoveNext() && _enumerator2.MoveNext())
            {
                if (Convert.ToInt32(_enumerator1.Value) > 0 && Convert.ToInt32(_enumerator2.Value) > 0)
                {
                    ToDisplayList += @"<tr><td>" + _enumerator1.Key + ":</td>" + "<td align='center'>" + _enumerator1.Value + " </td>" +                     "<td align='center'>" + _enumerator2.Value + " </td>" + "<td align='center'>" + float.Parse(_enumerator1.Value.ToString()) /                 float.Parse(_enumerator2.Value.ToString()) + " </td> </tr> ";
                }
                else
                {
                    ToDisplayList += @"<tr><td>" + _enumerator1.Key + ":</td>" + "<td align='center'>" + _enumerator1.Value + " </td>" + "<td align='center'>" + _enumerator2.Value + " </td>" + "<td align='center'>" + (Convert.ToInt32(_enumerator1.Value) / Convert.ToInt32(_enumerator2.Value)) + " </td> </tr> ";
                }

                ServiceCount++;
                DurationCount += Convert.ToInt32(_enumerator1.Value);
            }
            ToDisplayList += @"<tr height='10'><td colspan='4'></td></tr> ";
            ToDisplayList += @"</table>";


--------------------------------------
now i bind that string to
this.textBox12.Value = ToDisplayList;

its display fine but when i taken print it also print the embeded html script 
please give me any solution on this..?




1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 01 Apr 2009, 02:40 PM
Hi pramod,

In the current Q1 2009 version of the product we have introduced an item called HtmlTextBox which can interpret and render a subset of the HTML elements and CSS styles. Full list of the supported nodes and additional information on the item you may find in the HtmlTextBox help article. Table-related HTML elements are not supported, at least for now. When we find a feasible way to do this, we would definitely share this with the community either in blog post or in our RoadMap.

Currently Telerik Reporting would properly handle all html element when the report is rendered in HTML, because the browser that usually displays the report, handles the HTML itself. That is the reason for the proper display in the web report viewer and for the raw html when exporting to other fornats.

Sorry for the inconvenience and thank you for the understanding.

Kind regards,
Steve
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
pramod
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or