Không có phiên bản nào của hàm bị quá tải Microsoft::reporting::winforms::localreport::render

lập trình


Xin chào, tôi có ứng dụng nhỏ VS2015 Visual C++, WindowsForms. Và tôi cố gắng in báo cáo RDLC trực tiếp tới máy in. Vì vậy, khi tôi cố gắng, tôi đã bị đánh khi đang báo cáo.
Bất kỳ lời khuyên loại sẽ được phép để hoàn thành nhiệm vụ.
Cảm ơn

public: static System::Void Export(LocalReport^ report, bool print = true){
		PaperSize^ paperSize = m_pageSettings->PaperSize;
		Margins^ margins = m_pageSettings->Margins;

		String^ deviceInfo = String::Format(CultureInfo::InvariantCulture,
			"<DeviceInfo>" +
			"<OutputFormat>EMF</OutputFormat>" +
			"<PageWidth>{5}</PageWidth>" +
			"<PageHeight>{4}</PageHeight>" +
			"<MarginTop>{0}</MarginTop>" +
			"<MarginLeft>{1}</MarginLeft>" +
			"<MarginRight>{2}</MarginRight>" +
			"<MarginBottom>{3}</MarginBottom>" +
			"</DeviceInfo>",
			ToInches(margins->Top),
			ToInches(margins->Left),
			ToInches(margins->Right),
			ToInches(margins->Bottom),
			ToInches(paperSize->Height),
			ToInches(paperSize->Width));
		//Microsoft::Reporting::WinForms::Warning^ warnings;
		System::Collections::Generic::IList<Warning^>^ warnings;
		m_streams = gcnew List<Stream^>();

                //I get error messages at the below report->Render lines.

		report->Render("Image", deviceInfo, CreateStream, warnings);  ??????????????????????????????????



		for each(Stream^ stream in m_streams) {
			stream->Position = 0;
		}
		if (print==true){
			Print();
		}
	}

Thông báo lỗi :

No Instance of Overloaded function MIcrosoft::Reporting::Winforms::LocalReport::Render matches the arguement types are (const char[6], String^, Stream^(String^ name, String^ fileNameExtension, System::Text::Encoding^ encoding, String^ mimetype, bool willseek), System::Collections::Generic::IList<Microsoft::Reporting::WinForms::Warning^>^) object type is Microsoft::Reporting::WinForms::LocalReport^  

Cảm ơn lần nữa

Những gì tôi đã thử:

Tôi cố gắng in báo cáo RDLC trực tiếp tới máy in

Giải pháp 1

コメント

タイトルとURLをコピーしました