dip s

dip s

  • 1.4k
  • 256
  • 76.3k

How to print RichText Box data in crystal report

Mar 23 2020 1:03 AM
Hello,
I want print rictext data (bold, italic and underline format) in asp.net mvc and angular 6.
But italic and underline is not gettting printed. It prints normal text not underline ot italic.
like my rtf input is , this is an application. I want to print this. But its not printting italic and underline.
 
My MVC code is 
 
In datatable object dt, RTF format data is there. 
 
  1. da.Fill(dt);  
  2. ReportDocument cryRpt = new ReportDocument();  
  3. cryRpt.Load("C:/Report/somefile.rpt");  
  4. cryRpt.SetDataSource(dt);  
  5. cryRpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "C:/Report/somefile.pdf");  
  6. var bytes = File.ReadAllBytes("C:/Report/somefile.pdf");  
  7. result1 = Convert.ToBase64String(bytes);  
  8.    
I am returning this result1 to my front end angular 6 code which is
  1. const win = window.open('''_blank');  
  2.      let html = '';  
  3.      html += '<html>';  
  4.      html += '<body style="margin:0!important">';  
  5.      html += '<embed width="100%" height="100%" src="data:application/pdf;base64,' + result1 + '" type="application/pdf" />';  
  6.      html += '</body>';  
  7.      html += '</html>';  
  8.      win.document.write(html);  
 my expected output is  this is an application
 
please help. Thank you in advance. 

Answers (4)