الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

عرض أكثر من تقرير مع أدارة Report Viewer

بدأه azouzeg في 14 يونيو 2014 · 1 رد · 867 مشاهدة · في Microsoft Visual Basic.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

بسم الله الرحمن الرحيم

الأخوة الأفاضل

عندي أكثر من تقرير

Report1.rdlc

Report2.rdlc

Report3.rdlc

Report4.rdlc

 

وعندي أداة نموذج وعليه وأدة عرض التقرير reportviewer

 

كيف استخدم هذا النموذج للتبديل بين التقارير السابق ذكرها بدون أن أنشئ نموذج لكل تقرير منهم

 

ولكم الشكر وعظيم الامتنان

 

هذا الكود لم يعمل معي

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If myreport = 1 Then
            '  //Add this code to embed a report at runtime
            ReportViewer1.Reset()
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
            ReportViewer1.LocalReport.ReportEmbeddedResource = "WindowsApplication2.Report1.rdlc"
                        Me.ReportViewer1.RefreshReport()
            '    //reportViewer1--> A Report Viewer Control
            '//ReportViewer --> Name of the solution
            '//Report2.rdlc --> Name of the report
        Else
            '  //Add this code to embed a report at runtime
            ReportViewer1.Reset()
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
            ReportViewer1.LocalReport.ReportEmbeddedResource = "WindowsApplication2.Report2.rdlc"
            Me.ReportViewer1.RefreshReport()
            '    //reportViewer1--> A Report Viewer Control
            '//ReportViewer --> Name of the solution
            '//Report2.rdlc --> Name of the report
        End If

ظهرت هذه الرسالة مع استخدامه

A data source instance has not been supplied for the data source 'DataSet1'

 

 

هل هذه الطريقة تحتاج إلي تعديل أما أنها فكرتها خطأ بالأساس

تم تعديل هذه المشاركة بواسطة azouzeg في 14 يونيو 2014 في 12:51

عزوز عبداللاه
مدرب ومطور قواعد بيانات أكسس

الاهتمامات

VBA,VB.NET,ASP.NET,SQL SERVER, ORACLE

azouzeg@hotmail.com

01004147149

مواضيع مشابهة