tailieunhanh - Crystal Reports For Visual Studio 2005 phần 5
Để thiết lập một dự án mới cho ExportToStream () Phương pháp 1. Hoàn thành các hướng dẫn trong Thêm các điều khiển Web hoặc Windows Form. 2. Tạo ExportSetup () phương pháp và ExportSelection () Tạo Ba phương pháp Thực hiện xuất khẩu. 3. Trong thời hạn "Select Case" [Visual Basic] hoặc "chuyển đổi" [C #] tuyên bố của ExportSelection (), | Walkthroughs To set up a new project for the ExportToStream Method 1. Complete the instructions in Adding Controls to the Web or Windows Form. 2. Create the ExportSetup method and the ExportSelection method in Creating Three Methods That Perform the Export. 3. Within the Select Case Visual Basic or switch C statement of the Exportseiection method add a case statement for the ExcelRecord and the Text formats. Visual Basic Case Case end C case break case break lend 4. Create a conditional block to test the Boolean variable selectedNoFormat. Visual Basic If selectedNoFormat Then Else End If end C if selectedNoFormat else Lend. 5. Within the If block set the Text property of the message Label control to the FORMAT_NOT_SUpPORTED constant of the MessageConstants class. Note You have created the MessageConstants class for this tutorial in Additional Setup Requirements of Appendix Project Setup. Visual Basic Copyright 2004 Business Objects Page 237 Walkthroughs end C end 6. Within the Else block set the Text property of the message Label control to the SUCCESS constant of the Messageconstants class. Visual Basic end C end 7. Create a try catch block with the Exception class that is referenced as a variable named ex. The try block encloses the Select Case Visual Basic or switch C statement and the conditional block. Visual Basic Try Catch ex As Exception End Try end C try catch Exception ex end 8. Within the catch block set the Text property of the message Label control to the FAILURE constant of the MessagesConstants class and then append to it the Message property of the Exception parameter. Visual Basic end C .
đang nạp các trang xem trước