9 Haziran 2011 Perşembe

BI Report Server Oran Hesaplama

Public Function OranHesapla(ByVal currentValue As Double, ByVal totalValue As Double) As Double
    If totalValue =0 Then
        Return 0
    Else
        Return (currentValue -totalValue ) / totalValue
    End If
End Function

Public Function OranYuzde(ByVal currentValue As Double, ByVal totalValue As Double) As Double
    If currentValue =0 Then
        Return 0
    Else
        Return (totalValue  / currentValue)*100
    End If
End Function

rdl Code örneği

=Code.OranYuzde(SUM(Fields!GYT_SATIS.Value),SUM(Fields!BK_SATIS.Value))

8 Haziran 2011 Çarşamba

Visual Studio Output Panel mesaj yazma

System.Diagnostics.Trace.WriteLine("Second's destructor is called.");

 

using System.Diagnostics;

 

System.Diagnostics.Trace.WriteLine("Second's destructor is called.");

 

TraceSource ts = new TraceSource("HelloWorld", SourceLevels.All);

 

ts.TraceInformation("# of records processed: {0}", n);

ts.TraceEvent(TraceEventType.Information, 10, "# of records processed: {0}", n);

ts = new TraceSource("HelloWorld", SourceLevels.Critical | SourceLevels.ActivityTracing);

 

<system.diagnostics>

  <sources>

    <source name="HelloWorld">

      <listeners>

        <remove name="Default"/>

 

        <add name="consoleListener"

            type="System.Diagnostics.ConsoleTraceListener"/>

 

        <add name="eventlogListener"

            type="System.Diagnostics.EventLogTraceListener"

            initializeData="Application"/>

 

        <add name="textfileListener"

            type="System.Diagnostics.TextWriterTraceListener"

            initializeData="helloworld.log" />

 

        <add name="xmlfileListener"

            type="System.Diagnostics.XmlWriterTraceListener"

            initializeData="helloworld.xml" />

 

        <add name="defaultListener"

            type="System.Diagnostics.DefaultTraceListener"/>

      </listeners>

    </source>

  </sources>

</system.diagnostics>

 

<system.diagnostics>

    <sharedListeners>

        <add name="myListener"

             type="MyTestTraceListener, MyAssembly">

            <filter type="System.Diagnostics.EventTypeFilter"

                    initializeData="Information"/>

        </add>

    </sharedListeners>

    <sources>

        <source name="mySource" switchValue="All">

            <listeners>

                <add name="myListener" />

            </listeners>

        </source>

    </sources>

</system.diagnostics>

 

log.Info( m=>m("some logger info {0}", (object)myObj) )

log.Info( ()=>String.Format("some logger info {0}", (object)myObj) )

 

image

    Critical Error Warning Information Verbose Start Stop Suspend Resume Transfer