all groups > sql server reporting services > august 2005 >
You're in the

sql server reporting services

group:

How to MOD and TRUNCATE in vb .net


How to MOD and TRUNCATE in vb .net MJ Taft
8/31/2005 10:03:06 AM
sql server reporting services:
we have the following formula in a business objects report that we to convert
to use in reporting services - I have no clue how to perform the MOD or
TRUNCATE in vb .net

=If(<Agent_Calls>=0) Then "00:00:00" Else
FormatNumber(Truncate((<TOTALTALKTIME>/<Agent_Calls>/3600) ,0) ,"00") & ":" &
FormatNumber(Truncate(Mod(<TOTALTALKTIME>/<Agent_Calls> ,3600)/60 ,0) ,"00")
& ":" & FormatNumber(Mod(Truncate(Mod(<TOTALTALKTIME>/<Agent_Calls> ,3600)
,0) ,60) ,"00")
RE: How to MOD and TRUNCATE in vb .net MJ Taft
8/31/2005 11:08:02 AM
I think I have a start anyway ... this is what I have come up with so far ...
its ugly!
=IIF(fields!agent_calls.value = 0, 0,
(Format(CInt(Fix(Fields!TotalTalkTime.value/Fields!AgentCalls.value/3600)),"00") & ":" &
Format(CInt(Fix(Mod(Fields!TotalTalkTime.value/Fields!AgentCalls,3600)/60),
"00") & ":" &
Format(Mod(CInt(Fix(Mod(Fields!TotalTalkTime.value/Fields!AgentCalls,3600),60), "00") )

[quoted text, click to view]
AddThis Social Bookmark Button