نمایش نتایج 1 تا 9 از 9

نام تاپیک: خطای Load report failed در کریستال ریپورت سی شارپ

  1. #1
    کاربر دائمی آواتار Kurdia
    تاریخ عضویت
    مرداد 1389
    محل زندگی
    تهران
    سن
    36
    پست
    136

    خطای Load report failed در کریستال ریپورت سی شارپ

    با سلام
    می خوا م مقادیری رو به کریستال ریپورد انتقال بدم و گزارشگیری کنم
    اما مشکل ایجاد شده Load report failed
    اطلاعات از فرم یک به فرم دو می رن

    در فرم دو درون متغرهایی قرار می گیرند(تا اینجای کار همه چیز خوب پیش می ره)


    idstring = strid;
    tblheader = "{" + header + ".ID}= ";
    tbldetail = "{" + detail + ".IDHeader}= ";
    strpath = "//Report/ReportFrmb1.rpt";

    اما با اجرای کدهای کریستالریپورت که Crystalreportviewer با نام crrpt قرار داده شده خطای Load report failed رو می ده!



    public void reporting(string mypath,string h,string d, string idstr)
    {
    ReportDocument rpt = new ReportDocument();
    string filePath = Application.StartupPath + mypath;
    rpt.Load(filePath);
    crrpt.SelectionFormula = h + idstr + " AND " + d + idstr;
    crrpt.ReportSource = rpt;
    crrpt.Refresh();


    }

    مشکل کجاست؟؟
    اطلاعات هم دی دیتابیس دو جدول قرار دارند
    جدول اول tblheader که مثلا مشخصات فرد در اون ذکر شده
    جدول دوم tbldetail که اطلاعاتی مانند لیست خرید مربوط به اون شخص درش قرار داده شده
    درون فایل همه چی مرتبه
    اما برای گزارشگیری با C#‎‎.Net مشکل دارم
    متن خطا
    CrystalDecisions.Shared.CrystalReportsException was unhandled
    Message="Load report failed."
    Source="CrystalDecisions.CrystalReports.Engine"
    StackTrace:
    at CrystalDecisions.ReportAppServer.ReportClientDocum entWrapper.EnsureDocumentIsOpened()
    at CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
    at CrystalDecisions.CrystalReports.Engine.ReportDocum ent.Load(String filename)
    at Bazargani.Reports.reporting(String mypath, String h, String d, String idstr) in H:\Projects\Bazargani Project\Bazargani\Bazargani\Reports.cs:line 50
    at Bazargani.Reports.Reports_Load(Object sender, EventArgs e) in H:\Projects\Bazargani Project\Bazargani\Bazargani\Reports.cs:line 36
    at System.Windows.Forms.Form.OnLoad(EventArgs e)
    at System.Windows.Forms.Form.OnCreateControl()
    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    at System.Windows.Forms.Control.CreateControl()
    at System.Windows.Forms.Control.WmShowWindow(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
    at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
    at System.Windows.Forms.Form.WmShowWindow(Message& m)
    at System.Windows.Forms.Form.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.SendMessa ge(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam)
    at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
    at System.Windows.Forms.Control.set_Visible(Boolean value)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.RunDialog(Form form)
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at System.Windows.Forms.Form.ShowDialog()
    at Bazargani.FRMB1.BTNPrintH_Click(Object sender, EventArgs e) in H:\Projects\Bazargani Project\Bazargani\Bazargani\FRMB1.cs:line 228
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs 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.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.RunDialog(Form form)
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at System.Windows.Forms.Form.ShowDialog()
    at Bazargani.FrmMain.فرمارزیابیودرجهب ندیپیمانکارToolStripMenuItem_Click(Obje ct sender, EventArgs e) in H:\Projects\Bazargani Project\Bazargani\Bazargani\FrmMain.cs:line 59
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Obje ct key, EventArgs e)
    at System.Windows.Forms.ToolStripMenuItem.OnClick(Eve ntArgs e)
    at System.Windows.Forms.ToolStripItem.HandleClick(Eve ntArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(M ouseEventArgs e)
    at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEven tArgs mea)
    at System.Windows.Forms.ToolStripDropDown.OnMouseUp(M ouseEventArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.ToolStripDropDown.WndProc(Mes sage& m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at Bazargani.Program.Main() in H:\Projects\Bazargani Project\Bazargani\Bazargani\Program.cs:line 18
    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException: System.Runtime.InteropServices.COMException
    Message="The system cannot find the path specified.\r"
    Source="Analysis Server"
    ErrorCode=-2147467259
    StackTrace:
    at CrystalDecisions.ReportAppServer.ClientDoc.ReportC lientDocumentClass.Open(Object& DocumentPath, Int32 Options)
    at CrystalDecisions.ReportAppServer.ReportClientDocum entWrapper.Open(Object& DocumentPath, Int32 Options)
    at CrystalDecisions.ReportAppServer.ReportClientDocum entWrapper.EnsureDocumentIsOpened()
    InnerException:

  2. #2

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    با سلام

    برای ارسال مقدار به یک گزارش بهتره از پارامترها استفاده بکنید

    اگر خواستی استفاده بکنی بگو تا نمونه برات بذارم.

    کسی که به خود اطمینان دارد به تعریف دیگران احتیاج ندارد. «گوستاو لوبون»


  3. #3
    کاربر دائمی آواتار Kurdia
    تاریخ عضویت
    مرداد 1389
    محل زندگی
    تهران
    سن
    36
    پست
    136

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    نقل قول نوشته شده توسط mmd2009 مشاهده تاپیک
    با سلام

    برای ارسال مقدار به یک گزارش بهتره از پارامترها استفاده بکنید

    اگر خواستی استفاده بکنی بگو تا نمونه برات بذارم.
    بله
    ممنون می شم

  4. #4

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    با سلام

    به این لینک برید

    توجه کن برای انتقال به فرم دیگه هم زیاد سخت نیست کافیه با پاپریتی یا یک تابع مقدار رو براش بفرستی

    کسی که به خود اطمینان دارد به تعریف دیگران احتیاج ندارد. «گوستاو لوبون»


  5. #5
    کاربر دائمی آواتار Kurdia
    تاریخ عضویت
    مرداد 1389
    محل زندگی
    تهران
    سن
    36
    پست
    136

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    انتقال با موفقیت انجام می شه
    و نمی خوام دستکاریش کنم
    اطلاعات هم از بانک خوانده می شن
    ممنون
    الان چک می کنم و ملزومات رو اعمال می کنم

  6. #6
    کاربر دائمی آواتار Kurdia
    تاریخ عضویت
    مرداد 1389
    محل زندگی
    تهران
    سن
    36
    پست
    136

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    نشد
    باز هم خطا می ده
    من دارم اطلاعات رو از بانک می گیرم اما فایل کمکی شما همچین نمی کنه !
    F1 Please

  7. #7

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    خب اطلاعات رو از بانک میگیرید بلاخره که میره یه جایی قرار میگیره مثلا تو یک ارایه. خب اون ارایه رو ببرید به فرم نمایش گزارشتون و بعنوان پارامتر اونو ارسال بکنید.

    کسی که به خود اطمینان دارد به تعریف دیگران احتیاج ندارد. «گوستاو لوبون»


  8. #8
    کاربر دائمی آواتار Kurdia
    تاریخ عضویت
    مرداد 1389
    محل زندگی
    تهران
    سن
    36
    پست
    136

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    نقل قول نوشته شده توسط mmd2009 مشاهده تاپیک
    خب اطلاعات رو از بانک میگیرید بلاخره که میره یه جایی قرار میگیره مثلا تو یک ارایه. خب اون ارایه رو ببرید به فرم نمایش گزارشتون و بعنوان پارامتر اونو ارسال بکنید.
    چجوری؟؟
    وقتی که اطلاعات مثلا به این شکله ؟؟

    ممطالب درج شده در tblheader
    id
    نام
    نام خانوادگی

    مطالب درج شده در tbldetail
    id
    idheader مقدار id که از tblheader ارسال می شود در آن قرار می گیرد
    درس1
    درس2
    درس3

    -----------------------
    جایی که id = 1 اطلاعات tblheader رو نشون می ده و اطلاعاتی که در tbldetail هستند و فیلد tbldetail.idheader = tblheader.id نشون می ده

    23 فایل باید ویرایش بشه !


  9. #9
    کاربر دائمی آواتار Kurdia
    تاریخ عضویت
    مرداد 1389
    محل زندگی
    تهران
    سن
    36
    پست
    136

    نقل قول: خطای Load report failed در کریستال ریپورت سی شارپ

    مشکل حل شد
    نمی دونم چرا با اینکه به ذهنم رسید انجام ندادم
    پوشه ای که فایل های کریستال ریپورت توش بود رو در محل اجرای نرم افزار کپی نکردم

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •