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 > สอบถามการส่ง parameter 2ค่าไปยัง crystal report ยังไงครับ



 

สอบถามการส่ง parameter 2ค่าไปยัง crystal report ยังไงครับ

 



Topic : 119842



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



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



คือผมต้องการรับค่าวันที่เริ่ม กับวันที่สุดท้าย ให้ส่งค่า parameter 2 ค่าไปยัง crystal report แต่ผลที่ออกมาคือ หน้า report ว่างเปล่าครับ
ช่วยแนะนำหน่อยครับ

1

2

3

4

Code (C#)
protected void cmdPrint_Click(object sender, EventArgs e)
        {
            CrystalDecisions.CrystalReports.Engine.ReportDocument rptReport
                = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            rptReport.Load(Server.MapPath("report4.rpt"));

            rptReport.SetParameterValue("startdate", dtpDate1.Text);
            rptReport.SetParameterValue("enddate", dtpDate2.Text);

            rptReport.SetDatabaseLogon("sa", "pa2ssword");
            CrystalReportViewer1.ReportSource = rptReport;
            Session["ReportSource1"] = rptReport;
        }




Tag : .NET, Ms SQL Server 2008, Crystal Report, Reporting Service, Web (ASP.NET), C#







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2015-11-10 23:44:33 By : toey1 View : 1627 Reply : 6
 

 

No. 1



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



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

ลองย้ายตำแหน่งดูครับ

Code (C#)
protected void cmdPrint_Click(object sender, EventArgs e)
        {
            CrystalDecisions.CrystalReports.Engine.ReportDocument rptReport
                = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            rptReport.Load(Server.MapPath("report4.rpt"));

            rptReport.SetDatabaseLogon("sa", "pa2ssword");
            CrystalReportViewer1.ReportSource = rptReport;

            rptReport.SetParameterValue("startdate", dtpDate1.Text);
            rptReport.SetParameterValue("enddate", dtpDate2.Text);

            Session["ReportSource1"] = rptReport;
        }







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-11 08:14:19 By : mee079
 


 

No. 2



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



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

ยังออกเป็นหน้าเปล่าครับ
11
พอกด Next ขึ้นมาให้ใส่วันที่ตาม Parameter ครับ พอเลือกวันที่ตามที่เด้งขึ้นมา ข้อมูลถึงออกครับ
12

เลยสงสัยครับ ผมจะต้องส่งค่ายังไง ผมเขียนไรผิดอีกไหม
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-11 23:09:15 By : toey1
 

 

No. 3



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

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

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

Code (C#)
		ReportDocument rpt = new ReportDocument();
		string directory = My.Application.Info.DirectoryPath;
		//rpt.Load(directory & "\myCrystalReport1.rpt")
		rpt.Load("C:\\DemoCrystalReport3\\DemoCrystalReport3\\myCrystalReport1.rpt");
		rpt.SetParameterValue("CustomerID", this.txtCustomerID.Text);
		this.CrystalReportViewer1.ReportSource = rpt;
		this.CrystalReportViewer1.Refresh();


สร้าง Parameter และ Formula Fields บน Crystal Reports (VB.NET,C#)

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-12 09:45:13 By : mr.win
 


 

No. 4



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



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

ผมเขียนตรงไหนผิดหรือป่าวครับ รบกวนช่วยชี้แนะหน่อยครับ ยังไม่ได้เลยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-12 22:31:29 By : toey1
 


 

No. 5



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



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

มีท่านไหนช่วยแนะนำเพิ่มไหมครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-13 10:19:42 By : toey1
 


 

No. 6



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



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

ตอนนี้ที่ติดอยู่คือ พอกด Next page แล้วค่าในช่องวันที่ ที่กรอกไว้หายไป
date
ทำให้ต้องมีหน้ากรอกวันที่ของ parameter ขึ้นมา
next

Code (C#)
        protected void cmdPrint_Click(object sender, EventArgs e)
        {
            CrystalDecisions.CrystalReports.Engine.ReportDocument rptReport
                = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            rptReport.Load(Server.MapPath("report4.rpt"));

            rptReport.SetDatabaseLogon("sa", "pa2ssword");
            CrystalReportViewer1.ReportSource = rptReport;

            rptReport.SetParameterValue("startdate", dtpDate1.Text);
            rptReport.SetParameterValue("enddate", dtpDate2.Text);

            Session["ReportSource1"] = rptReport;
        }
       
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session["ReportSource1"] != null)
            {
                CrystalReportViewer1.ReportSource = Session["ReportSource1"];
            }
        }



แก้ยังไงครับ แนะนำด้วยครับ !!


ประวัติการแก้ไข
2015-11-13 13:33:14
2015-11-13 13:39:30
2015-11-13 13:39:55
2015-11-14 14:31:37
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-11-13 10:51:03 By : toey1
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : สอบถามการส่ง parameter 2ค่าไปยัง crystal report ยังไงครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 05
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 อัตราราคา คลิกที่นี่