Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > ทำโปรเจคเป็นตัว setup แล้วลองติดตั้ง พอสั่งพิมพ์รายงาน ใช้ crystal report เออเรอว่า load report fail



 

ทำโปรเจคเป็นตัว setup แล้วลองติดตั้ง พอสั่งพิมพ์รายงาน ใช้ crystal report เออเรอว่า load report fail

 



Topic : 079212



โพสกระทู้ ( 315 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Facebook



ทำโปรเจคเป็นตัว setup แล้วลองติดตั้ง การบันทึกข้อมูลของโปรแกรมทำได้ปกติ
แต่ พอสั่งพิมพ์รายงาน ใช้ crystal report เออเรอว่า load report fail แต่ในตัวโปรเจคที่ไม่ใช่ตัวติดตั้งพริ้นได้ปกตินะครับ
ตอนทำตัวติดตั้งมันต้องเพิ่มอะไรหรือเปล่าครับ คือผมเลือกค่า defalt ทั้งหมดเลยตอนทำตัว setup

รายละเอียดเออเรอครับ

Code
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the file specified.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
at student.PrintForm.btnPrint_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
student
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/Setupbnn/student.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
MySql.Data
Assembly Version: 1.0.10.1
Win32 Version: 1.0.10.1
CodeBase: file:///C:/Program%20Files/Default%20Company%20Name/Setupbnn/MySql.Data.DLL
----------------------------------------
CrystalDecisions.CrystalReports.Engine
Assembly Version: 12.0.2000.0
Win32 Version: 12.0.2000.683
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/12.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
----------------------------------------
CrystalDecisions.Shared
Assembly Version: 12.0.2000.0
Win32 Version: 12.0.2000.683
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.Shared/12.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll
----------------------------------------
CrystalDecisions.ReportAppServer.CommLayer
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.1100.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.ReportAppServer.CommLayer/12.0.1100.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll
----------------------------------------
CrystalDecisions.ReportAppServer.ClientDoc
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.1100.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.ReportAppServer.ClientDoc/12.0.1100.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll
----------------------------------------
CrystalDecisions.ReportAppServer.DataSetConversion
Assembly Version: 12.0.2000.0
Win32 Version: 12.0.2000.683
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/12.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll
----------------------------------------
CrystalDecisions.ReportAppServer.DataDefModel
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.1100.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.ReportAppServer.DataDefModel/12.0.1100.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll
----------------------------------------
CrystalDecisions.ReportAppServer.Controllers
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.1100.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.ReportAppServer.Controllers/12.0.1100.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll
----------------------------------------
CrystalDecisions.ReportAppServer.CubeDefModel
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.1100.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.ReportAppServer.CubeDefModel/12.0.1100.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll
----------------------------------------
CrystalDecisions.ReportAppServer.ReportDefModel
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.1100.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/CrystalDecisions.ReportAppServer.ReportDefModel/12.0.1100.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll
----------------------------------------
BusinessObjects.Licensing.KeycodeDecoder
Assembly Version: 12.0.1100.0
Win32 Version: 12.0.0.683
CodeBase: file:///C:/WINDOWS/assembly/GAC/BusinessObjects.Licensing.KeycodeDecoder/12.0.1100.0__692fbea5521e1304/BusinessObjects.Licensing.KeycodeDecoder.dll
----------------------------------------
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




Tag : .NET, MySQL, Crystal Report, Win (Windows App), C#, VS 2008 (.NET 3.x)









ประวัติการแก้ไข
2012-05-31 17:13:38
2012-05-31 19:02:36
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-05-31 17:12:47 By : narubet View : 1995 Reply : 4
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

น่าจะต้อง Copy พวก dll ที่เป็น runtime ไปด้วยน่ะครับ ไม่แน่ใจเหมือนกันว่าตัวไหน ลองค้นหาดูในกระทู้เก่า ๆ ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-06-01 06:41:42 By : mr.win
 


 

No. 2



โพสกระทู้ ( 424 )
บทความ ( 0 )



สถานะออฟไลน์


พาธรายงานถูกเปล่าครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-06-01 16:06:12 By : Agility
 

 

No. 3



โพสกระทู้ ( 315 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Facebook

ตอบความคิดเห็นที่ : 2 เขียนโดย : Agility เมื่อวันที่ 2012-06-01 16:06:12
รายละเอียดของการตอบ ::
ผมอ้างแบบนี้ครับ
string directory = AppDomain.CurrentDomain.BaseDirectory;
rpt.Load(directory +"..\\..\\UserCrystalReport.rpt");
ตอนที่รัน visual ทำงานได้ปกติครับ แต่ทำ setup กลับเปิดไม่ได้ ผมไม่รู้ว่าต้องเลือกอะไรบ้างตอนทำตัว setup


Code (C#)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using MySql.Data.MySqlClient;
using System.Diagnostics;
using CrystalDecisions.CrystalReports.Engine;
using Microsoft.VisualBasic;

namespace student
{
    public partial class UserReport : Form
    {
        ClassConnectDB Connect = new ClassConnectDB();
        public UserReport()
        {
            InitializeComponent();
        }

        private void btnReport_Click(object sender, EventArgs e)
        {
            Connect.ConnectDB();//ติดต่ฐานข้อมูล
            String strSQL;
            DataTable dt = null;
            strSQL = "SELECT user_id,user_name,user_address,user_province";
            strSQL += ",user_zipcode,user_mail,user_phone FROM user  where user_id like '%" + txtId.Text + "%' ";
            MySqlDataAdapter adapter;
            MySqlCommand objCmd;
            objCmd = new MySqlCommand(strSQL, Connect.objConn);//ประมวลผล
            adapter = new MySqlDataAdapter(objCmd);//เก็บข้อมูลไว้ที่ data adapter
            DataSet data = new DataSet();//สร้าง data set
            adapter.Fill(data, "user");//เก็บข้อมูลไว้ใน data set
            dt = data.Tables[0];
            adapter = null;
           

            Connect.DisConnectDB();//ปิดฐานข้อมูล
            Connect.objConn = null;//กำหนดค่าว่างให้ตัวแปร objConn

            ReportDocument rpt = new ReportDocument();

           string directory = AppDomain.CurrentDomain.BaseDirectory;
            rpt.Load(directory +"..\\..\\UserCrystalReport.rpt");
            rpt.SetDataSource(dt);
            this.crystalReportViewer1.ReportSource = rpt;
            this.crystalReportViewer1.Refresh();
            
        }
    }
}






ประวัติการแก้ไข
2012-06-02 15:59:22
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-06-02 15:56:24 By : narubet
 


 

No. 4



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Quote:
CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the file specified.


จาก Error น่าจะเป็นที่ Runtime ครับ น่าจะต้องเอา dll บางตัวไปด้วยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-06-02 16:26:05 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ทำโปรเจคเป็นตัว setup แล้วลองติดตั้ง พอสั่งพิมพ์รายงาน ใช้ crystal report เออเรอว่า load report fail
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่