 |
|
|
 |
 |
|
ข้อมูลที่ให้มาน้อยครับ คุณใช้อะไรบ้างครับ ตัวที่แสดงผล ActiveX ครับ
|
 |
 |
 |
 |
Date :
2012-09-18 11:22:35 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แบบนี้อะครับพี่วิน ช่วยผมด้วย
Code (ASP)
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.open "suggestion"," " , " "
set session("oRs") = Server.CreateObject("ADODB.Recordset")
session("oRs").ActiveConnection = oConn
session("oRs").Open "select * from Q_NewReport"
reportname = "GmoneyYtoD.rpt"
If Not IsObject (session("oApp")) Then
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application")
End If
Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
If IsObject(session("oRpt")) then
Set session("oRpt") = nothing
End if
On error resume next
Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
End If
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
'selection_formula="{R_holder.holdername}='" & request("h") &"'"
session("oRpt").DiscardSavedData
'session("oRpt").RecordSelectionFormula = cstr(selection_formula)
set Database = session("oRpt").Database
'Instantiates a database collection which references the database(s) used in the report.
set Tables = Database.Tables
'Instantiates a Tables collection which references the Tables of the Database object.
set Table1 = Tables.Item(1)
Table1.SetPrivateData 3, session("oRs")
On Error Resume Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write "Error Occurred Reading Records: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
Else
If IsObject(session("oPageEngine")) Then
set session("oPageEngine") = nothing
End If
set session("oPageEngine") = session("oRpt").PageEngine
End If
%>
<BODY BGCOLOR=C6C6C6 ONUNLOAD="CallDestroy();" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<object id="CRViewer"
classid="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
width=100% height=100%
codebase="/viewer9/activeXViewer/activexviewer.cab#Version=9,2,0,224">
<param name="EnableRefreshButton" value=0>
<param name="EnableGroupTree" value=0>
<param name="DisplayGroupTree" value=0>
<param name="EnablePrintButton" value=1>
<param name="EnableExportButton" value=1>
<param name="EnableDrillDown" value=1>
<param name="EnableSearchControl" value=1>
<param name="EnableAnimationControl" value=0>
<param name="EnableZoomControl" value=1>
</object>
<script language="VBScript">
<!--
Sub Window_Onload
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
if ScriptEngineMajorVersion < 2 then
window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
CRViewer.ReportName = Location.Protocol + "//" + Location.Host + "/scrsamples/Web Component Server/rptserver.asp"
else
Dim webSource
Set webSource = CreateObject("WebReportSource.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = Location.Protocol + "//" + Location.Host + "/scrsamples/rptserver.asp"
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</script>
<script language="javascript">
function CallDestroy()
{
window.open("Cleanup.asp");
}
</script>
<script language="javascript">
window.moveTo(0,0);
//window.resizeTo(screen.availwidth,screen.availheight);
</script>
|
ประวัติการแก้ไข 2012-09-18 13:48:55
 |
 |
 |
 |
Date :
2012-09-18 11:46:56 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองลง Crystal Report V 8.5 ก็เป็นเหมืนกันครับ
|
 |
 |
 |
 |
Date :
2012-09-18 13:47:03 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มีครับพี่วิน
ทำยังไงก็ไม่แสดงข้อมูล
พบการแสดงผลอยู่ 2 ลักษณะครับ
แบบที่ 1

แบบที่ 2

|
ประวัติการแก้ไข 2012-09-18 17:09:16 2012-09-18 17:11:13 2012-09-18 17:12:14
 |
 |
 |
 |
Date :
2012-09-18 16:35:14 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลง Version 10.2 ก็ไม่ได้ครับ เป็นเหมือนกัน
แต่สามารถ Export มาได้ทุก format ไม่มีปัญหา
เปิดกับตัวโปรแกรมได้ไม่มีปัญหา แต่พอใช้ asp เป็นตัวเรียก Report ก็เป็นแบบนี้ทุกทีเลยครับ
|
 |
 |
 |
 |
Date :
2012-09-19 01:25:04 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เยี่ยมเลยครับ กำลังจะมาบอกว่าถ้ายังไม่ได้ให้ PM มาครับ ผมมี Source และตัวอย่างที่รันผ่านที่พร้อมจะส่งให้ครับ
|
 |
 |
 |
 |
Date :
2012-09-21 08:39:32 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ส่งให้แล้วครับ ได้ไม่ได้ตอบกลับมาด้วยครับ
|
 |
 |
 |
 |
Date :
2012-09-21 17:00:56 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ได้รับเรียบร้อยแล้วครับ พี่วิน
กราบขอบพระคุณมากครับ 
|
 |
 |
 |
 |
Date :
2012-09-21 18:26:34 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ว่าแต่รันได้ไหม๊ครับ
|
 |
 |
 |
 |
Date :
2012-09-21 20:06:51 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่ได้เหมือนกันครับ ต้องไปแก้ ใน Function ของ RDCrptserver10.asp เหมือนกันครับ
แบบนี้มันเป็นเพราะอะไรครับพี่วิน งง ติงๆ
|
 |
 |
 |
 |
Date :
2012-09-23 23:20:32 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมใช้ Crystal Report 10 ครับ
|
 |
 |
 |
 |
Date :
2012-09-24 05:51:29 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมลอง code พี่วิน กับ version 10 ลองทั้ง win 7 และ windows server 2008 64 bit r2 ผลเป็นเหมือนกันครับ แต่ทำไมพี่วินได้ ของผมไม่ได้แปลกใจติงๆ
|
 |
 |
 |
 |
Date :
2012-09-24 18:49:57 |
By :
fangthaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมใช้กับ Windows 2003 + Crystal Report 10 ครับ
|
 |
 |
 |
 |
Date :
2012-09-25 05:39:43 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|