How to set report font to Verdana by default
I have developed report having couple of text boxes, and applied Verdana font style on all the text box, but the problem is when there is no data coming and if am exporting the report in word and if i type something in the text box place holder it takes Times New Roman font, it should take Verdana-10 which i set on the text box. I found one solution, if no data coming then i will render a blank space so it picks up Verdana 10 font, but this solution is not working for the the text box where i am rendering rich text (HTML). Any body any idea, please help me how do i set report default font to Verdana 10Everything about SQL Server | Experience inside SQL Server -Mohammad Nizamuddin
January 16th, 2011 2:19am

Hi Mohammad, When you display rich text (HTML), the font is picked based on the font setting in the HTML no matter what font you have set in report design. I would suggest find a mechanism to alter the html and embed the html font tag to verdana (the one you want). For instance, if your html tag is arriving as <html>My Remarks</html>, you can get it altered as <html><font face="verdana">My Remarks</font></html> There might be other approaches as well but I guess with a bit of string manipulation, above-shown method would yield the result. Hope this helps.Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
Free Windows Admin Tool Kit Click here and download it now
January 16th, 2011 11:43pm

Hi Mohammad, As you tried we can use an addition blank space if no data coming. Since you are using HTML, we need add the blank space in another placeholder before the existing one of date field. For detailed steps, please refer to the similar thread: http://social.technet.microsoft.com/Forums/en/sqlreportingservices/thread/13c2707c-2617-42ae-9be8-3d6e29d1900d Thanks, Tony ChainTony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
January 23rd, 2011 5:20am

Hi Mohammad, As you tried we can use an addition blank space if no data coming. Since you are using HTML, we need add the blank space in another placeholder before the existing one of date field. For detailed steps, please refer to the similar thread: http://social.technet.microsoft.com/Forums/en/sqlreportingservices/thread/13c2707c-2617-42ae-9be8-3d6e29d1900d Thanks, Tony ChainTony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
January 23rd, 2011 5:20am

Hi Tony, I tried adding a placeholder before the html contents in the cell. Yet while rendering it is the fonts in the html that is rendered with. I guess Nizamuddin's concern is to have the html portion rendered in the preferred font (verdana) and I am not sure if adding the placeholder resolves this issue. Please correct me if I am wrong. Thanks and regards Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
January 24th, 2011 5:09am

I tried this solution provide by Tony on this link http://social.technet.microsoft.com/Forums/en/sqlreportingservices/thread/13c2707c-2617-42ae-9be8-3d6e29d1900d it works fine but only the problem is even if the data is coming it reserves one space. Is there any alternate way? Hi Bilala: basically i have a text box in my report, and in my applicaiton on the front end i have rich text boxes, rich text box is by default set to font Verdana-10, so when data is saved it is saved as html syntaxes with the data in my table, now on the report i am rendering this data in the text box that is enabled to render HTML. I have set verdana-10 font on the tex box in the rdl. The problem is when there is no data coming from the table then in the report when i export it to word and type something in the text box it takes Time New Roman instead it should take Verdana-10. Everything about SQL Server | Experience inside SQL Server -Mohammad Nizamuddin
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 7:08am

Hi Nizamuddin, What if you changed the placeholder expression to check if the field you get is blank or not. =iif((Fields!MyHtmlField.Value is nothing) or (Fields!MyHtmlField.Value="")," ","") This would work when the entire value of the field is blank. But if the field contains html tags and the text to display is blank, in that case you may have to write a custom function to trim off all the tags and validate if the text is blank or not. These validations can be done using RegularExpressions namespace in .net. Based on the value returned by this function, add the space in the placeholder. Please refer http://msdn.microsoft.com/en-us/library/ms155798.aspx for details on using custom code references in expression Please feel free to discuss any further on this issue. Regards Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. BH
January 26th, 2011 11:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics