Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Invalid export DLL or export format

I have a problem to export Excel format. I am using Crystal Report 2008, VB.net2008(CS) and Oracle 10g.

I was already following bellow articles.

"Invalid export DLL or export format

I have tested by myself...

one thing, I included "Call DataReport"

It is not working to export Excel and rtf format.

last thing, I did not include "Call DataReport"

It is working to export Excel and rtf format..

Why it is someting wrong?

I have installed sp0 and tested CRdesiner..

Private Sub butprint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butprint.Click

'Create Data

Call DataReport()

'Login Report

Call ConfigureCrystalReports()

With CrystalReportViewer1

.DisplayBackgroundEdge = True

.DisplayStatusBar = True

.DisplayToolbar = True

.Zoom(90)

End With

End Sub

Private Sub ConfigureCrystalReports()

'모래시계로 변경

Me.Cursor = Cursors.WaitCursor

'프로젝트에 포함된 보고서 사용 선언

'Dim crReport As New RPTNEWPROJECTPLANBYDSE()

'사용할 수식 필드 지정

Dim crFormulas As FormulaFieldDefinitions

Dim crFormulaTextField1, crFormulaTextField2, crFormulaTextField3, crFormulaTextField4, crFormulaTextField5, crFormulaTextField6 As FormulaFieldDefinition

'수식 필드 목록을 지정

crFormulas = crReport.DataDefinition.FormulaFields

'수식필드 지정

crFormulaTextField1 = crFormulas.Item(1)

crFormulaTextField2 = crFormulas.Item(2)

crFormulaTextField3 = crFormulas.Item(3)

crFormulaTextField4 = crFormulas.Item(4)

crFormulaTextField5 = crFormulas.Item(5)

crFormulaTextField6 = crFormulas.Item(6)

'Formula에 관한 날짜 구해옴

Dim Exp_Start_Year, Exp_End_Year, New_Start_Year, New_End_Year As String

Exp_Start_Year = Mid(Me.dtpStartYear.Text - 2, 3, 2)

Exp_End_Year = Mid(Me.dtpStartYear.Text - 1, 3, 2)

New_Start_Year = Mid(Me.dtpStartYear.Text - 1, 3, 2)

New_End_Year = Mid(Me.dtpStartYear.Text, 3, 2)

'변수의 필드 이름을 전달

If Me.ComCur.Text = "" Then

crFormulaTextField1.Text = Chr(34) & "Currency : All" & Chr(34) 'CUR

Else

crFormulaTextField1.Text = Chr(34) & "Currency : " & Me.ComCur.Text & Chr(34) 'CUR

End If

crFormulaTextField2.Text = Chr(34) & "FY" & Mid(Me.dtpCurrentDate.Text, 3, 2) & " New Project Plan by DSE" & Chr(34) 'TITLE

crFormulaTextField3.Text = Chr(34) & "Exp(SOP: Oct " & Exp_Start_Year & "~ Sep " & Exp_End_Year & ")" & Chr(34) 'EXP

crFormulaTextField4.Text = Chr(34) & "New(SOP: Oct " & New_Start_Year & "~ Sep " & New_End_Year & ")" & Chr(34) 'NEW

crFormulaTextField5.Text = Chr(34) & Me.dtpPreviousDate.Text & Chr(34) 'PRE_DATE

crFormulaTextField6.Text = Chr(34) & Me.dtpCurrentDate.Text & Chr(34) 'CUR_DATE

' CrystalReportViewer1.ReportSource = crReport

Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()

With myConnectionInfo

.ServerName = "XXXXX"

.DatabaseName = "XXXXX"

.UserID = "XXXXX"

.Password = "XXXXX"

End With

Dim myTableLogOnInfo As TableLogOnInfo

Dim myTableLogOnInfos As TableLogOnInfos

myTableLogOnInfo = New TableLogOnInfo

myTableLogOnInfos = New TableLogOnInfos

myTableLogOnInfo.ConnectionInfo = myConnectionInfo

myTableLogOnInfos.Add(myTableLogOnInfo)

'뷰어에 테이블 정보를 지정

CrystalReportViewer1.LogOnInfo = myTableLogOnInfos

CrystalReportViewer1.ReportSource = crReport

'화살표로 변경

Me.Cursor = Cursors.Arrow

End Sub

Private Sub DataReport()

Dim strparameter(3) As String

Dim strvalue(3) As String

Dim objOracleType(3) As OracleType

Dim intLength(3) As Integer

Dim intLoop As Integer

strvalue(0) = Mid(Me.dtpStartYear.Text, 1, 4)

strvalue(1) = Me.dtpPreviousDate.Text

strvalue(2) = Me.dtpCurrentDate.Text

strvalue(3) = Me.ComCur.Text

strparameter(0) = "P_START_YEAR"

strparameter(1) = "P_PREDATE"

strparameter(2) = "P_CURDATE"

strparameter(3) = "P_CUR"

For intLoop = 0 To strvalue.Length - 1

objOracleType(intLoop) = OracleType.Char

Next

intLength(0) = 4

intLength(1) = 7

intLength(2) = 7

intLength(3) = 3

Try

'DB Open

OrcaleConn.DBOpen()

OrcaleConn.ExecuteSqlWithParam("RPT_NEWPJOJECTPLANBYDSE ", strparameter, objOracleType, intLength, strvalue, True)

OrcaleConn.DBClose()

'CrystalReportViewer1.ReportSource = crReport

Catch ex As Exception

OrcaleConn.UnhandledExecptionHandler()

End Try

End Sub

Former Member
replied

There are two things I want to confirm:

1) Confirm that adding "C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

" to the front of the path variable did not help

A : I already had that folder.

- I understand that folder exist, but is the path in the environment var? E.G; here are the steps I want you to try:

a) Go to the "system properties"

b) Click on the <Environment Variables> button

c) Edit the "Path" variable by putting the full path to the CR 2008 bin directory (...\win32_x86) at the front of the Path string

3) Can you export a "saved data" report to either xls or rtf in your app?

A : No, I can not export xls and rtf in my app.

- Understood. But, if you run the report in the CR designer, go to the File menu and select "Save Data with Report", then save the report. Now comment out any logon code in your app and try to run the saved data report. Does it run? Note: This is just a test to see how the behavior on your computer compares to others.

I need to be clear about all of the above as this is a new issue that we can not reproduce in house. Thus I need as much info as possible so I can compare your issue to those reported by others on this forum.

One other test. Let me know if you can export to .DOC file format...

Ludek

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question