locked
html Full Design in Crystal report RRS feed

  • Question

  • User-458501205 posted

    Hi,

    I am having one proble here in crystal report that i am not getting html full designed table in my crystal report. i am only getting the content of that table. i have applied some CSS class in table row and cells. Is there any solution to this or not? i am using using VS 2010 and .net framework 4 with Crystal report 2010.

    please help me out of this.

    Regards.

    Tuesday, December 27, 2011 6:13 AM

Answers

  • User-1456250069 posted

    Crystal report supports only the following HTML tags.

    html
    body
    div (causes a paragraph break)
    tr (causes only a paragraph break; does not preserve column structure of a table)
    span
    font
    p (causes a paragraph break)
    br (causes a paragraph break)
    h1 (causes a paragraph break, makes the font bold & twice default size)
    h2 (causes a paragraph break, makes the font bold & 1.5 times default size)
    h3 (causes a paragraph break, makes the font bold & 9/8 default size)
    h4 (causes a paragraph break, makes the font bold)
    h5 (causes a paragraph break, makes the font bold & 5/6 default size)
    h6 (causes a paragraph break, makes the font bold & 5/8 default size)
    center
    big (increases font size by 2 points)
    small (decreases font size by 2 points if it's 8 points or larger)
    b
    i
    s
    strike
    u
    The supported attributes are:

    align
    face
    size
    color
    style
    font-family
    font-size
    font-style
    font-weight

    First try with a simple table. If it works then appply the css.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 27, 2011 7:42 AM

All replies

  • User-1456250069 posted

    Did you set the CssFileName property of the report viewer? 

    Hope the following links will help you

    http://msdn.microsoft.com/en-us/library/ms225493%28VS.80%29.aspx

    http://vbcity.com/forums/t/104797.aspx

    Tuesday, December 27, 2011 6:24 AM
  • User-458501205 posted

    Yes, i tried that also. But for convinience am showing you the html code which i want in crystal report.

    <html>
    <head>
    <style type="text/css">
    .box {
    	float:left;
    	width: 694px;
    	padding-top:25px;
    	padding:25px 22px 0 22px;
    }
    .pricetitle {
    	background-color:#efefef;
    	border-top:3px solid #e4e4e4;
    	padding:0 0 0 35px;
    }
    .pricetitle td {
    	background-color:#efefef;
    	border-top:3px solid #e4e4e4;
    	border-bottom:1px solid #e4e4e4;
    	padding:0 0 0 15px;
    	height:33px;
    	font-weight:bold;
    }
    .pricetext td {
    	border-bottom:1px solid #ebebeb;
    	background-color:#F7F7F7;
    	padding:0 0 0 15px;
    	height:33px;
    }
    .tourprices {
    	background-color:#eaf5ff;
    	padding:9px 0 9px 15px;
    	border-bottom:1px solid #FFFFFF;
    	border-top:3px solid #cbe2f7;
    }
    .tourprices h3 {
    	font-size:14px;
    	text-transform:uppercase;
    	font-weight:bold;
    	padding:0px;
    	margin:0px;
    }
    </style>
    </head>
    <body>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td class="tourprices"><h3>Tailor Made:</h3>
          VALID FROM 01 Nov 2011 to 30 Nov 2011 </td>
      </tr>
      <tr>
        <td><table width="100%" align="center" cellpadding="4" cellspacing="0" bgcolor="#575757">
            <tr class="pricetitle" align="left" style="color: Black; font-weight: bold;">
              <td align="left" style="color: Black;"> Standard Category </td>
              <td width="200" align="left" style="color: Black;">&nbsp;</td>
            </tr>
            <tr class="pricetext">
              <td align="left"> Minimum of 02 Paying Pax on Twin Sharing Basis </td>
              <td align="left">&nbsp;$ 777.00&nbsp;Per Person </td>
            </tr>
            <tr class="pricetitle" align="left" style="color: Black; font-weight: bold;">
              <td align="left" style="color: Black;"> Superior Category </td>
              <td width="200" align="left" style="color: Black;">&nbsp;</td>
            </tr>
            <tr class="pricetext">
              <td align="left"> Minimum of 02 Paying Pax on Twin Sharing Basis </td>
              <td align="left">&nbsp;$ 1299.00&nbsp;Per Person </td>
            </tr>
            <tr class="pricetitle" align="left" style="color: Black; font-weight: bold;">
              <td align="left" style="color: Black;"> Deluxe Category </td>
              <td width="200" align="left" style="color: Black;">&nbsp;</td>
            </tr>
            <tr class="pricetext">
              <td align="left"> Minimum of 02 Paying Pax on Twin Sharing Basis </td>
              <td align="left">&nbsp;$ 999.00&nbsp;Per Person </td>
            </tr>
            <tr class="pricetitle" align="left" style="color: Black; font-weight: bold;">
              <td align="left" style="color: Black;"> Luxury Category </td>
              <td width="200" align="left" style="color: Black;">&nbsp;</td>
            </tr>
            <tr class="pricetext">
              <td align="left"> Minimum of 02 Paying Pax on Twin Sharing Basis </td>
              <td align="left">&nbsp;$ 1599.00&nbsp;Per Person </td>
            </tr>
          </table></td>
      </tr>
    </table>
    </body>
    </html>
    
    
    
    this html content is cooming from Ms Sql Database.
    here table content is shown but not with CSS classes. Please help me out of this. am pissed of now. :/
    Tuesday, December 27, 2011 6:36 AM
  • User-1456250069 posted

    Crystal report supports only the following HTML tags.

    html
    body
    div (causes a paragraph break)
    tr (causes only a paragraph break; does not preserve column structure of a table)
    span
    font
    p (causes a paragraph break)
    br (causes a paragraph break)
    h1 (causes a paragraph break, makes the font bold & twice default size)
    h2 (causes a paragraph break, makes the font bold & 1.5 times default size)
    h3 (causes a paragraph break, makes the font bold & 9/8 default size)
    h4 (causes a paragraph break, makes the font bold)
    h5 (causes a paragraph break, makes the font bold & 5/6 default size)
    h6 (causes a paragraph break, makes the font bold & 5/8 default size)
    center
    big (increases font size by 2 points)
    small (decreases font size by 2 points if it's 8 points or larger)
    b
    i
    s
    strike
    u
    The supported attributes are:

    align
    face
    size
    color
    style
    font-family
    font-size
    font-style
    font-weight

    First try with a simple table. If it works then appply the css.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 27, 2011 7:42 AM
  • User-458501205 posted

    Hmmm, So i must apply format with this tags only then and then i can get my result. Thanks for your time. :)

    Thursday, December 29, 2011 5:02 AM
  • User1696119076 posted

    Have you confirmed that this approach works in VS2010?  We are developing reports and it seems that our style is being ignored.  We've confirmed that the style sheet containing our class is in the HTML document.  I can see that the report is being rendered via java script (bobj.crv.writeWidget) and I can see that our class is being used in this output.  However, the style is being ignored.  Do you have any advice?

    Thanks

    Friday, January 27, 2012 11:37 AM
  • User-458501205 posted

    See kamanashish Comment. he has explained the tags which are supported by Crystal report with VS2010. I have ignored some css  and designed my report to personalize view.

    Friday, March 9, 2012 8:22 AM