2
Answers

PLEASE HELP!!! CRYSTAL REPORTS TOTAL DURATIONS

Erhan Suvari

Erhan Suvari

19y
1.8k
1
I'm using VB.NET in Microsoft Visual Studio.NET 2003.

I have an application which is linked to a database. The Database is very simple, only 3 fields, which are Date, Task, duration.

I am using Crystal Reports to create summary reports of the data.

The report looks something like below (Example):

Date                                                     Task                                          Duration

18/03/06                                     Meeting                              01:00:59

19/03/06                                     Lecture                               01:01:56

19/03/06                                     Lab                                     02:02:01

 

At the bottom of the report, under the Duration field I want to have the Total Duration. I can't seem to do this. Can anybody help please?

Thanks

Answers (2)
0
Laxmidhar Sahoo
NA 2.3k 1.4k 7y
<b> Report Date:&nbsp;&nbsp; 2016-11-21 &nbsp;&nbsp;Optometrist: &nbsp;&nbsp;start &nbsp;&nbsp;Time:&nbsp;&nbsp; Consultant: &nbsp;&nbsp;Dr.suresh</b>
0
Midhun T P
NA 19.7k 281.2k 7y
Hi,
 
Please try below query - 
  1. DECLARE @x XML = '<table WIDTH="100%" CELLPADDING="1" CELLSPACING="1">  
  2.    
  3. <tr style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt;BACKGROUND-COLOR: #f2f2f2;">  
  4.    <td><b>Report Date : </b>2016-11-21 </td>  
  5.   <td><b>Optometrist : </b> </td>  
  6.   <td><b>Start Time : </b> </td>  
  7. </tr>  
  8.    
  9. <tr style="COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 10pt;BACKGROUND-COLOR: #f2f2f2;">  
  10.         <td><b>Consultant : </b>Dr.Suresh </td>  
  11. </tr>  
  12.    
  13. </table>'  
  14.   
  15. SELECT t.c.value('.''NVARCHAR(MAX)')  
  16. FROM @x.nodes('*') t(c)  
 
Reference :
https://stackoverflow.com/questions/38868364/sql-remove-all-html-tags-in-a-string