मैंने कस्टम नियंत्रण (एक रिपोर्ट व्यूअर वाला एक विंडोज फॉर्म) बनाया है।स्थानीय रिपोर्ट के लिए डेटास्रोत सेट करना - .NET और रिपोर्ट व्यूअर
CustomReportViewer कक्षा में शामिल होते हैं
//Load local report
this.reportViewer1.ProcessingMode = ProcessingMode.Local;
//enable loading of external images
this.reportViewer1.LocalReport.EnableExternalImages = true;
//pass the report to the viewer
using (FileStream stream = new FileStream(filename, FileMode.Open))
{
this.reportViewer1.LocalReport.LoadReportDefinition(stream);
}
मैं इस का उपयोग कर फोन:
CustomReportViewer reportViewer = new CustomReportViewer();
यह ठीक काम करता है और एक खिड़कियों प्रपत्र युक्त प्रतीत होता है कि मैं एक स्थानीय रिपोर्ट लोड करने के लिए निम्न कोड है रिपोर्ट दर्शक नियंत्रण लेकिन मुझे निम्न संदेश मिलता है:
A data source instance has not been supplied for the data source "ReportData"
मुझे पूरी तरह से यकीन नहीं है कि डेटा स्रोत कैसे सेट अप करें? मुझे आवश्यक डेटा दूरस्थ डेटाबेस में संग्रहीत किया गया है ... मुझे इस कनेक्शन को सेट करने के लिए क्या करना है?
यह भी ध्यान दें कि आपके संसाधन फ़ोल्डर में हैं, तो फ़ोल्डर का नाम पूरी तरह से योग्य नाम में भी मिलता है। – StuartLC