Aracılığıyla paylaş


IRenderingExtension arabirimini uygulayan

işleme uzantısı sonuçlar gerçek verileriyle birleştirilir ve hat bir biçimde elde edilen verileri işleyen bir rapor tanımı alır.Birleştirilmiş veri dönüştürme ve biçimlendirme yapılır uygulayan bir ortak dil çalışma zamanı (clr) sınıf kullanarak IRenderingExtension.Bu nesne modeli bir Görüntüleyici, yazıcı veya başka bir çıktı tarafından tüketilen bir çıktı biçimine dönüştüren hedef.

The IRenderingExtension has three methods that must be coded:

Aşağıdaki bölümlerde bu yöntemlerin daha ayrıntılı olarak ele almaktadır.

Yöntem render

The Render method contains arguments that represent the following objects:

  • The report that you want to render.Bu nesne, rapor özellikleri, veri ve düzen bilgilerini içerir.Rapor, rapor nesne model Ağacı'nın köküdür.

  • The ServerParameters that contain the string dictionary object, with the parameters for the report server, if any.

  • The deviceInfo parameter that contain the device settings.Daha fazla bilgi için bkz: Reporting Services Aygıt Bilgisi Ayarları.

  • The clientCapabilities parameter that contains a NameValueCollection dictionary object that has information about the client to which you are rendering.

  • The RenderProperties that contains information about the rendering result.

  • The createAndRegisterStream is a delegate function to be called to get a stream to render into.

deviceInfo parametresi

The deviceInfo parameter contains rendering parameters, not report parameters.Bu işleme parametrelerini işleme uzantısı iletilir.The deviceInfo values are converted into a NameValueCollection object by the report server.Öğelerinin deviceInfo parametre kabul edilir durum-duyarlı değerleri.Render isteği url sonucunda verilen erişim, url parametreleri formunda rc:key=value anahtar/değer çiftleri olarak dönüştürülür deviceInfo dictionary nesnesi.Tarayıcı algılama kodu aşağıdaki öğeleri de sağlar clientCapabilities Sözlük: EcmaScriptVersion, JavaScript, MajorVersion, MinorVersion, Win32, türü ve AcceptLanguage.Tüm ad/değer çifti, deviceInfo işleme uzantısı tarafından anlaşılmayan parametre yoksayılır.Aşağıdaki kod örneği, bir örnek gösterir GetRenderingResource simgeleri alır yöntem:

public void GetRenderingResource (CreateStream createStreamCallback, NameValueCollection deviceInfo)
{
    string[] iconTagValues = deviceInfo.GetValues("Icon");
    if ((iconTagValues != null) && (iconTagValues.Length > 0) )
    {
        // Create a stream to output to.
        Stream outputStream = createStreamCallback(m_iconResourceName, "gif", null, "image/gif", false);
        // Get the GIF image for one of the buttons on the toolbar
        Image requiredImage = (Image) m_resourcemanager.GetObject(m_iconResourceName
        // Write the image to the output stream
        requiredImage.Save(outputStream, requiredImage.RawFormat);
    }
    return;
}

RenderStream yöntemi

The RenderStream method renders a particular stream from the report.Tüm akışlar, başlangıç sırasında oluşturulan Render çağrısı, ancak akışları değil dönen için istemci başlangıçta.Bu yöntem kullanılan html işlenişi görüntüleri gibi ikincil akışlar veya ek sayfamulti-ssayfa resim/emf işleme uzantısı.

GetRenderingResource yöntemi

The GetRenderingResource method retrieves the information without executing an entire rendering of the report.Kez ne zaman rapor raporunu işlenecek gerektiren bilgi gerektirir vardır.Örneğin, işleme uzantısı ile ilişkili simgeyi gerekiyorsa kullanın deviceInfo parametresi içeren tek etiket <simgesi>.Bu gibi durumlarda kullanabileceğiniz GetRenderingResource yöntem.