OLE in Reports
Hi Friends,
Is there concepts of using OLE in report? if yes can u please direct me to an appropriate link so that i can learn more about it. I need info for Reports 10g R2.
Regards,
Manoj
There is no OLE in Reports 10g anymore. See this document and the possible workarounds:
http://www.oracle.com/technetwork/database/migration/reports-guide-to-changed-functional-132446.pdf
Similar Messages
-
OLE in Reports 3.0.5
Hi,
I created a OLE object and created a link to a bitmap(logo). the path is correct, case doesnt matter. I ran and tested the report too, it is fine. But the next day, i try to open the report , it doesnt. Same with all the back up reports that i saved. can anyone tell me what i can do to open it. It involved a lot of work, alignment of address, etc. I would be really grateful.
Thanks. GopalThe problem is that you're going to have to jump through hoops to do something that's very, very easy in the release you're going to, so you need to seriously consider where to put your efforts. If you want to do this in 3.0, then you'll need to follow the data file report example in the 2.5 Building Reports manual (see http://otn.oracle.com/doc/reports25/bror2/ch6a.htm#toc096)
Regards,
Danny -
OLE automation To Print picture in word document
We are upgrading from 4.6c to ECC 6.0.One of Our OLE automation Report is used to launch the word document to print CV and photo.But the program acts differently to the different Presentation servers even though they all have the same GUI and word versions.Text box and images are drawn at different sizes and at different locations in the word document.
Please advise.Sure,
I need to make an abap program to execute a word document
in this document I want to insert a picture
we have a picture in SAP in the transaction SE78 (Administration of Form Graphics)
I want to know if I can use this picture or if the only method is to have the picture in local into the PC
regards
Patrick -
Post Author: georgeb
CA Forum: Data Connectivity and SQL
Does anyone know if the issue with date ranges in OLE DB reports using Visual Foxpro databases has been resolved in Crystal Reports 10?
Currently all OLE DB reports that use date ranges crash with:
Failed to open a rowset.Details: ADO Error Code: 0x80004005Source: Microsoft OLE DB Provider for Visual FoxProDescription: SQL: Column 'DATETIME' is not foundNative Error: 806We referred this to Business Objects some time ago and their comment was that they do not supportVisual FoxPro ...
Any assistance would be appreciated.Here is how you can do datetime range with EOMONTH:
SELECT Count(DISTINCT[form number]) AS OutofFunding
FROM [dbo].[newview]
WHERE [cohort desc] IN ( 'Apprenticeships' )
AND [expected end] > Eomonth(Getdate(), -1)
AND [expected end] < Dateadd(dd, 1, Eomonth(Getdate(), 4));
BLOG on datetime ranges:
http://www.sqlusa.com/bestpractices2008/between-dates/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Avoid Database Login prompt when using CrystalReportViewer
Is there a way to keep the Database Login prompt from coming up when using Crystal Reports runtime 2008 SP2? I'm using that plus Visual Studio 2008 to develop a Windows Form application to view reports on a client machine that accesses data on a seperate SQL Server 2005 machine. My customer would like to avoid having users manually enter anything everytime a report is opened with the Crystal Reports viewer.
I've used the following code with ODBC and OLE DB report connections. When I use ODBC, the prompt comes up with Integrated Security checked which must be cleared. When I use OLE DB, the prompt comes up with Database Name blank and greyed out so I cannot manually enter it.
Am I missing something here?
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms
Public Class Form1
Private Sub setDatabaseLogon(ByVal myConnectionInfo As ConnectionInfo)
Dim logOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo
For Each logOnInfo As TableLogOnInfo In logOnInfos
logOnInfo.ConnectionInfo = myConnectionInfo
Nex
End Sub
Private Sub ConfigureCrystalReports()
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
setDatabaseLogon(myConnectionInfo)
myConnectionInfo.DatabaseName = "ClearView"
myConnectionInfo.UserID = "reports"
myConnectionInfo.Password = "dstreports"
myConnectionInfo.IntegratedSecurity = False
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ConfigureCrystalReports()
End Sub
End ClassThanks Jonathan for the tip. I tried it before and after the setDatabaseLogin call yesterday, but got the same results. I'm still going to follow your suggestion because that makes more sense.
Turns out it was the configuration of my ODBC/System DSN that was causing the problem. I reconfigured the System DSN by clearing the check box to provide username/password and now I don't get the Database Login anymore.
I found a different blog post that answered the OLE DB issue I was seeing where the DatabaseName was coming up blank:
Login Error Database at Runtime
Haven't tried it yet and probably won't because I got the Viewer to work with ODBC the way I like it.
Thanks for the help! -
Hello All,
Im downloading EAN11 (it is a character of length 18 ) field form MARA table to an excel. In excel i got the value like 3.16514E+12 where as actual value to be displayed is 3165140039925.
But i know that, to get the value displayed without exponential format, i need to put single quatation in front of the number. I mean, we need to concatenate single quatation with the value.
But is there any other way to do this. If im not wrong, we have to do some thing with OLE format.
Good answers will be appriciated.
Thanks in advance.
Best Regards,
Sasidhar Reddy Matli.Please check below code may help to create excel usign OLE.
REPORT ZTEST_BYW.
* OLE specific include file
INCLUDE OLE2INCL.
INCLUDE EXCEL__C.
* data definitions of OLE objects with type ole2_object
PARAMETERS: P_FILENM(80) LOWER CASE OBLIGATORY
DEFAULT 'C:\Documents and Settings\gunasekharb\Desktop\report_tsl.xls'.
DATA: G_TMP_WORKBOOK TYPE OLE2_OBJECT.
DATA: G_TMP_WORKSHEETS TYPE OLE2_OBJECT.
DATA: G_TMP_WORKSHEET1 TYPE OLE2_OBJECT.
DATA: G_TMP_WORKSHEET2 TYPE OLE2_OBJECT.
DATA: G_PC_TEMPLATE LIKE RCGFILETR-FTAPPL
VALUE 'C:\Documents and Settings\gunasekharb\Desktop\mmr_rpt_tsl_tmp.xls'.
DATA: G_EXCEL TYPE OLE2_OBJECT.
DATA: G_WORKBOOKS TYPE OLE2_OBJECT.
DATA: G_WORKBOOK TYPE OLE2_OBJECT.
DATA: G_WORKSHEETS TYPE OLE2_OBJECT.
DATA: G_WORKSHEET TYPE OLE2_OBJECT.
DATA: G_CELL TYPE OLE2_OBJECT.
DATA: G_CELL1 TYPE OLE2_OBJECT.
DATA: G_CELL2 TYPE OLE2_OBJECT.
DATA: G_CELLRANGE TYPE OLE2_OBJECT.
DATA: G_FONT TYPE OLE2_OBJECT.
DATA: G_INTERIOR TYPE OLE2_OBJECT.
DATA: G_BORDERS TYPE OLE2_OBJECT.
DATA: G_FIRST_WS VALUE 'Y'.
DATA: G_ROW TYPE I.
DATA: G_COL TYPE I.
* definition of loop counter
DATA: I TYPE I VALUE '5'.
DATA: BEGIN OF T_SHEET1 OCCURS 1,
COL1(10),
COL2(20),
END OF T_SHEET1.
DATA: BEGIN OF T_SHEET2 OCCURS 1,
COL1(10),
COL2(20),
END OF T_SHEET2.
START-OF-SELECTION.
PERFORM PREPARE_DATA.
PERFORM DOWNLOAD_TO_EXCEL.
END-OF-SELECTION.
* call method of excel 'QUIT'.
* it is now possible to leave the EXCEL application
* remark: you have to go to the EXCEL application and answer the
* popup dialog screen
*& Form PREPARE_DATA
FORM PREPARE_DATA.
T_SHEET1-COL1 = 'A1'.
T_SHEET1-COL2 = 'A2'.
APPEND T_SHEET1.
T_SHEET1-COL1 = 'B1'.
T_SHEET1-COL2 = 'B2'.
APPEND T_SHEET1.
T_SHEET2-COL1 = 'Y1'.
T_SHEET2-COL2 = 'Y2'.
APPEND T_SHEET2.
T_SHEET2-COL1 = 'Z1'.
T_SHEET2-COL2 = 'Z2'.
APPEND T_SHEET2.
ENDFORM. " PREPARE_DATA
*& Form DOWNLOAD_TO_EXCEL
FORM DOWNLOAD_TO_EXCEL.
PERFORM OPEN_EXCEL.
PERFORM ADD_WORKSHEET1.
PERFORM ADD_WORKSHEET2.
PERFORM OPEN_TEMPLATE_FILE.
PERFORM CLOSE_EXCEL.
WRITE: / 'End of program'.
ENDFORM. " DOWNLOAD_TO_EXCEL
*& Form FILL_CELL
*& FORM routine, which fills the specified cell in the EXCEL sheet
*& with the given value
FORM FILL_CELL USING I_ROW TYPE I
I_COL TYPE I
I_VALUE
I_FONTBOLD
I_DIGIT
I_WRAPTEXT
I_HORIZON_ALIGN
I_VERTICAL_ALIGN.
DATA: L_STR TYPE STRING.
CALL METHOD OF G_EXCEL 'CELLS' = G_CELL
EXPORTING #1 = I_ROW
#2 = I_COL.
SET PROPERTY OF G_CELL 'VALUE' = I_VALUE.
IF I_FONTBOLD = 'X'.
GET PROPERTY OF G_CELL 'Font' = G_FONT.
SET PROPERTY OF G_FONT 'Bold' = 1.
ENDIF.
IF NOT I_WRAPTEXT IS INITIAL.
SET PROPERTY OF G_CELL 'WrapText' = 1.
ENDIF.
IF NOT I_HORIZON_ALIGN IS INITIAL.
IF I_HORIZON_ALIGN = 'L'.
SET PROPERTY OF G_CELL 'HorizontalAlignment' = XLLEFT.
ELSEIF I_HORIZON_ALIGN = 'R'.
SET PROPERTY OF G_CELL 'HorizontalAlignment' = XLRIGHT.
ELSEIF I_HORIZON_ALIGN = 'C'.
SET PROPERTY OF G_CELL 'HorizontalAlignment' = XLCENTER.
ENDIF.
ENDIF.
IF NOT I_VERTICAL_ALIGN IS INITIAL.
IF I_VERTICAL_ALIGN = 'T'.
SET PROPERTY OF G_CELL 'VerticalAlignment' = XLTOP.
ELSEIF I_VERTICAL_ALIGN = 'B'.
SET PROPERTY OF G_CELL 'VerticalAlignment' = XLBOTTOM.
ELSEIF I_VERTICAL_ALIGN = 'C'.
SET PROPERTY OF G_CELL 'VerticalAlignment' = XLCENTER.
ENDIF.
ENDIF.
* To set number format for cell
IF I_DIGIT <> ''.
IF I_VALUE IS INITIAL AND I_DIGIT <> '%'.
SET PROPERTY OF G_CELL 'VALUE' = ''.
ELSE.
* Set number format for cell with number
IF I_DIGIT = '1'.
SET PROPERTY OF G_CELL 'NumberFormat' = '#,###.0 '.
ELSEIF I_DIGIT = '2'.
SET PROPERTY OF G_CELL 'NumberFormat' = '#,##0.00 '.
ELSEIF I_DIGIT = '%'.
SET PROPERTY OF G_CELL 'NumberFormat' = '#,##0.00% '.
ELSE.
SET PROPERTY OF G_CELL 'NumberFormat' = '#,### '.
ENDIF.
ENDIF.
ENDIF.
ADD 1 TO I_COL.
ENDFORM.
*& Form OPEN_EXCEL
FORM OPEN_EXCEL.
DATA: L_CNT TYPE I.
* create object excel of OLE class 'EXCEL.APPLICATION'
CREATE OBJECT G_EXCEL 'EXCEL.APPLICATION'.
CALL METHOD OF G_EXCEL 'WORKBOOKS' = G_WORKBOOKS.
CALL METHOD OF G_WORKBOOKS 'ADD' = G_WORKBOOK.
GET PROPERTY OF G_WORKBOOK 'Worksheets' = G_WORKSHEETS.
GET PROPERTY OF G_EXCEL 'ACTIVESHEET' = G_WORKSHEET.
SET PROPERTY OF G_EXCEL 'DISPLAYALERTS' = 0.
GET PROPERTY OF G_WORKSHEETS 'Count' = l_cnt.
L_CNT = L_CNT - 1.
* Delete unwanted worksheets
DO L_CNT TIMES.
GET PROPERTY OF G_EXCEL 'ACTIVESHEET' = G_WORKSHEET.
CALL METHOD OF G_WORKSHEET 'DELETE'.
ENDDO.
ENDFORM. " OPEN_EXCEL
*& Form CLOSE_EXCEL
FORM CLOSE_EXCEL.
SET PROPERTY OF G_EXCEL 'VISIBLE' = 1.
CALL METHOD OF G_WORKBOOK 'SAVEAS'
EXPORTING #1 = P_FILENM.
* quit Excel and free all OLE objects
* call method of g_excel 'QUIT'.
FREE OBJECT G_INTERIOR.
FREE OBJECT G_BORDERS.
FREE OBJECT G_FONT.
FREE OBJECT G_CELL.
FREE OBJECT G_CELL1.
FREE OBJECT G_CELL2.
FREE OBJECT G_CELLRANGE.
FREE OBJECT G_EXCEL.
FREE OBJECT G_WORKBOOKS.
FREE OBJECT G_WORKBOOK.
FREE OBJECT G_WORKSHEETS.
FREE OBJECT G_WORKSHEET.
ENDFORM. " CLOSE_EXCEL
*& Form ADD_WORKSHEET
FORM ADD_WORKSHEET USING I_NAME.
* Add new worksheet
IF G_FIRST_WS <> 'N'.
G_FIRST_WS = 'N'.
GET PROPERTY OF G_EXCEL 'ACTIVESHEET' = G_WORKSHEET.
ELSE.
CALL METHOD OF G_WORKSHEETS 'Add' = G_WORKSHEET.
ENDIF.
SET PROPERTY OF G_WORKSHEET 'NAME' = I_NAME.
G_ROW = 1.
G_COL = 1.
ENDFORM. " ADD_WORKSHEET
*& Form ADD_WORKSHEET1
FORM ADD_WORKSHEET1.
PERFORM ADD_WORKSHEET USING 'Test 1'.
* fill line in EXCEL sheet with headerlines of table columns
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'My First Worksheet' 'X' ''
PERFORM MERGE_CELL USING G_ROW 1 G_ROW 4.
PERFORM SET_BORDER USING G_ROW 1 G_ROW 4 4 ''.
ADD 1 TO G_ROW.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'ID'(001) 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL 'Name'(002) 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL 'Telephon'(003) 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL 'Rabatt'(004) 'X' '' '' '' ''.
* loop at customr table and print values into EXCEL sheet
ADD 1 TO G_ROW.
LOOP AT T_SHEET1.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL T_SHEET1-COL1 '' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL T_SHEET1-COL2 '' '' '' '' ''.
ADD 1 TO G_ROW.
ENDLOOP.
G_COL = 4.
PERFORM SET_BORDER USING 1 1 G_ROW G_COL '' 4.
ENDFORM. " ADD_WORKSHEET1
*& Form ADD_WORKSHEET2
FORM ADD_WORKSHEET2.
PERFORM ADD_WORKSHEET USING 'Test 2'.
* fill line in EXCEL sheet with headerlines of table columns
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'My Second Worksheet' 'X' ''
PERFORM MERGE_CELL USING G_ROW 1 G_ROW 4.
PERFORM SET_BORDER USING G_ROW 1 G_ROW 4 1 'X'.
PERFORM SET_COLOR USING G_ROW 1 G_ROW 4 'LT'.
ADD 1 TO G_ROW.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'ID'(001) 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL 'Name'(002) 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL 'Telephon'(003) 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL 'Rabatt'(004) 'X' '' '' '' ''.
* loop at customr table and print values into EXCEL sheet
ADD 1 TO G_ROW.
LOOP AT T_SHEET2.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL T_SHEET2-COL1 '' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL T_SHEET2-COL2 '' '' '' '' ''.
ADD 1 TO G_ROW.
ENDLOOP.
G_COL = 4.
PERFORM SET_BORDER USING 1 1 G_ROW G_COL 2 'X'.
ADD 4 TO G_ROW.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'This is a wrap text' 'X' ''
'X' 'C' 'T'.
PERFORM FILL_CELL USING G_ROW G_COL 'Vertical - Bottom' 'X' ''
'' 'L' 'T'.
ADD 4 TO G_ROW.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'Amount 1' 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL '100.04' '' 'X' '' '' ''.
ADD 1 TO G_ROW.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'Amount 2' 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL '200.01' '' 'X' '' '' ''.
ADD 1 TO G_ROW.
G_COL = 1.
PERFORM FILL_CELL USING G_ROW G_COL 'Total' 'X' '' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL '=SUM(B13:B14)' 'X' 'X' '' '' ''.
PERFORM FILL_CELL USING G_ROW G_COL '0.00' 'X' 'X' '' '' ''.
PERFORM COPY_CELL USING G_ROW 2 17 5 25 8.
ENDFORM. " ADD_WORKSHEET2
*& Form MERGE_CELL
FORM MERGE_CELL USING I_ROW1 I_COL1
I_ROW2 I_COL2.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
EXPORTING #1 = I_ROW1
#2 = I_COL1.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
EXPORTING #1 = I_ROW2
#2 = I_COL2.
CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
EXPORTING #1 = G_CELL1
#2 = G_CELL2.
CALL METHOD OF G_CELLRANGE 'Merge'.
ENDFORM. " MERGE_CELL
*& Form SET_BORDER
FORM SET_BORDER USING I_ROW1 I_COL1
I_ROW2 I_COL2
I_THICKNESS
I_ALLBORDERS.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
EXPORTING #1 = I_ROW1
#2 = I_COL1.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
EXPORTING #1 = I_ROW2
#2 = I_COL2.
CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
EXPORTING #1 = G_CELL1
#2 = G_CELL2.
IF I_ALLBORDERS IS INITIAL.
CALL METHOD OF G_CELLRANGE 'BorderAround'
EXPORTING #1 = 1 "Continuous line
#2 = I_THICKNESS. "Thickness: 1 - Normal, 4 - Thick
ELSE.
GET PROPERTY OF G_CELLRANGE 'Borders' = G_BORDERS.
SET PROPERTY OF G_BORDERS 'LineStyle' = '1'.
SET PROPERTY OF G_BORDERS 'Weight' = I_THICKNESS.
ENDIF.
ENDFORM. " SET_BORDER
*& Form SET_COLOR
FORM SET_COLOR USING I_ROW1 I_COL1
I_ROW2 I_COL2
I_COLOR.
DATA: L_COLORINDEX TYPE I.
CASE I_COLOR.
when 'BK'.
L_COLORINDEX = 1. "Black
when 'BR'.
l_colorindex = 53. "Brown
when 'OG'.
l_colorindex = 52. "Olive Green
when 'DG'.
l_colorindex = 51. "Dark Green
when 'DT'.
l_colorindex = 49. "Dark Teal
when 'DB'.
L_COLORINDEX = 11. "Dark Blue
WHEN 'ID'.
L_COLORINDEX = 55. "Indigo
when 'G4'.
l_colorindex = 56. "Gray 80%
when 'DR'.
L_COLORINDEX = 9. "Dark Red
when 'OR'.
l_colorindex = 46. "Orange
when 'DY'.
l_colorindex = 12. "Dark Yellow
when 'GR'.
l_colorindex = 10. "Green
when 'TL'.
L_COLORINDEX = 14. "Teal
WHEN 'BL'.
L_COLORINDEX = 5. "Blue
WHEN 'BY'.
L_COLORINDEX = 47. "Blue Gray
when 'G3'.
l_colorindex = 16. "Gray 50%
when 'RD'.
L_COLORINDEX = 3. "Red
when 'LO'.
l_colorindex = 45. "Light Orange
when 'LI'.
l_colorindex = 43. "Lime
when 'SG'.
l_colorindex = 50. "Sea Green
when 'AQ'.
L_COLORINDEX = 42. "Aqua
WHEN 'LB'.
L_COLORINDEX = 41. "Light Blue
WHEN 'VL'.
L_COLORINDEX = 13. "Violet
when 'G2'.
l_colorindex = 48. "Gray 40%
when 'PK'.
L_COLORINDEX = 7. "Pink
when 'GD'.
l_colorindex = 44. "Gold
when 'YL'.
L_COLORINDEX = 6. "Yellow
when 'BG'.
L_COLORINDEX = 4. "Bright Green
WHEN 'TQ'.
L_COLORINDEX = 8. "Turquoise
WHEN 'SB'.
L_COLORINDEX = 33. "Sky Blue
WHEN 'PL'.
L_COLORINDEX = 54. "Plum
when 'G1'.
l_colorindex = 15. "Gray 25%
when 'RS'.
l_colorindex = 38. "Rose
when 'TN'.
l_colorindex = 40. "Tan
when 'LY'.
l_colorindex = 36. "Light Yellow
when 'LG'.
l_colorindex = 35. "Light Green
when 'LT'.
L_COLORINDEX = 34. "Light Turquoise
WHEN 'PB'.
L_COLORINDEX = 37. "Pale Blue
WHEN 'LV'.
L_COLORINDEX = 39. "Lavender
when 'WH'.
L_COLORINDEX = 2. "White
WHEN OTHERS.
L_COLORINDEX = 2. "White
ENDCASE.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
EXPORTING #1 = I_ROW1
#2 = I_COL1.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
EXPORTING #1 = I_ROW2
#2 = I_COL2.
CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
EXPORTING #1 = G_CELL1
#2 = G_CELL2.
GET PROPERTY OF G_CELLRANGE 'Interior' = G_INTERIOR.
SET PROPERTY OF G_INTERIOR 'ColorIndex' = L_COLORINDEX.
ENDFORM. " SET_COLOR
*& Form COPY_CELL
FORM COPY_CELL USING I_CROW I_CCOL
I_PROW1 I_PCOL1
I_PROW2 I_PCOL2.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL
EXPORTING #1 = I_CROW
#2 = I_CCOL.
CALL METHOD OF G_CELL 'Copy'.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
EXPORTING #1 = I_PROW1
#2 = I_PCOL1.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
EXPORTING #1 = I_PROW2
#2 = I_PCOL2.
CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
EXPORTING #1 = G_CELL1
#2 = G_CELL2.
CALL METHOD OF G_WORKSHEET 'Paste'
EXPORTING #1 = G_CELLRANGE.
ENDFORM. " COPY_CELL
*& Form OPEN_TEMPLATE_FILE
FORM OPEN_TEMPLATE_FILE.
CALL METHOD OF G_WORKBOOKS 'Open' = G_TMP_WORKBOOK
EXPORTING #1 = G_PC_TEMPLATE
#2 = 2
#3 = 0
#4 = 1
#5 = 0
#6 = 0
#7 = 1.
CALL FUNCTION 'FLUSH'
EXCEPTIONS
OTHERS = 0.
GET PROPERTY OF G_TMP_WORKBOOK 'Worksheets' = G_TMP_WORKSHEETS.
GET PROPERTY OF G_TMP_WORKSHEETS 'Item' = G_TMP_WORKSHEET1
EXPORTING #1 = 1.
GET PROPERTY OF G_TMP_WORKSHEETS 'Item' = G_TMP_WORKSHEET2
EXPORTING #1 = 2.
CALL METHOD OF G_TMP_WORKSHEET1 'Copy'
EXPORTING #1 = G_WORKSHEET.
CALL METHOD OF G_TMP_WORKSHEET2 'Copy'
EXPORTING #1 = G_WORKSHEET.
* call method of g_tmp_workbook 'Close'.
CALL FUNCTION 'FLUSH'
EXCEPTIONS
OTHERS = 0.
ENDFORM. " OPEN_TEMPLATE_FILE
Edited by: Gunasekhar B on Apr 16, 2009 3:19 PM
Edited by: Gunasekhar B on Apr 16, 2009 3:19 PM -
Why the Parameter Dialog not invoked with OpenReport RDC SDK?
Hai,
I am working in Crystal Reports XI Release 2 with Visual studio .Net 2003 (VC++).I am using RDC SDK
OpenReport function to create report.The report is generating without any fail.But the parameter dialog not invoked though the report is designed with parameter .
Here is the code snippet i used to generate
OnInitDialog()
CoInitialize(NULL);
IApplicationPtr m_Application;
IReportPtr m_Report;
HRESULT hr = m_Application.CreateInstance("CrystalRuntime.Application");
m_Report = m_Application->OpenReport("Sample.rpt");
m_Viewer.SetReportSource(m_Report);
m_Viewer.ViewReport();
It creates report in ActiveX viewer but the parameter dialog not invoked before showing in viewer.
But in my another project i have used Crystal report 8 and CRPE32 dll(8 version) API PEStartPrintJob
It invokes parameter dialog automatically before showing report in Viewer.
Thankyou,
SatheeshKumar
Edited by: SatheeshDharmaraj on Mar 18, 2009 12:29 PMPlease note:
The RDC is specifically designed around the COM technologies and is intended for use Visual Basic 6 developers; therefore, it is not recommended, nor tested, for use in a .NET application. This limits the support offering for the RDC in a .NET application; however, because COM is a supported technology in .NET the RDC is known to function as expected in a .NET application.
To support any issue encountered with the RDC in a .NET application, these issues need to be reproducible in a supported COM-based development tool (such as VB6).
Also, the RDC is a retired technology, no longer shipping in the current version of CR - CR 12.x:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289
this may have implications to your applications lifecycle as CR XI r2 will be out of support June 10 of this year. See the following for more details:
Business Objects Product Lifecycles [original link is broken]
I'd recommend you forget about RDC in .NET and use the CR Assemblies for .NET.
Nevertheless, if you absolutely must stay with the RDC in .NET, the error suggests that you are either not using any database logon code, or the code is incorrect. To connect the report to a database, you must use the connection properties bag. More information on the connection properties bag is [here|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81]
C++ code could look something like this:
bstrt bstrReportPath("C:
Documents and Settings
Mujeeb
Desktop
VC++
RDC_VCPP_CR10
Report1.rpt";);
m_Application.CreateInstance("CrystalRuntime.Application.10";);
m_Report = m_Application-->OpenReport(bstrReportPath, vtTempCopy);
m_Report-->DiscardSavedData();
m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->DeleteAll();
m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Provider","SQLOLEDB.1";);
m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Data Source","10.10.17.30";);
m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("User ID","sa");
m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Password","excellence");
m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Database","Northwind");
m_Report>Database>Verify();
m_Viewer.SetReportSource(m_Report);
m_Viewer.ViewReport();
Now, you do not have to use the deleteAll property and simply log on to the database. Unfortunately only code I have handy for that is as described in the above doc. The code woudl be something like this in VB:
(ODBC)
report.database.tables(1).connectionProperties("DSN") = "the DSN"
report.database.tables(1).connectionProperties("user ID") = "the user ID"
report.database.tables(1).connectionProperties("database" = "the database name"
report.database.tables(1).connectionProperties("password") = "the password"
(if using OLE DB)
report.database.tables(1).connectionProperties("data source") = "the server name"
report.database.tables(1).connectionProperties("user ID") = "the user ID"
report.database.tables(1).connectionProperties("initial catalog") = "the database name"
report.database.tables(1).connectionProperties("password") = "the password"
(if using native connection)
report.database.tables(1).connectionProperties("server:) = "the server name"
report.database.tables(1).connectionProperties("user ID") = "the user ID"
report.database.tables(1).connectionProperties("password") = "the password"
I also recommend searching our notes database for more resources:
https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
The downloads section may also contain C++ sample code, but I am not sure if there will be anything that uses the connection properties bag. E.g.; do not use deprecated methods such as
.LogOnserver, .SetNthTableLogOnInfo, etc.
Ludek -
Can't print OLE objects when 9i report developed in 6i
Hi,
I am migrating my reports from 6i to 9i. I just open report in 9i which is already developed in 6i and run the report it don't print OLE objects. It shows when I run report in Designer Preview, but in printing it shows blank
--VijayHello,
The answer is in the Migration FAQ :
When I open an Oracle6i Reports Developer report in the Oracle Reports Builder 10g and run my Web layout, I get an empty Web page in my browser.
http://www.oracle.com/technology/products/reports/htdocs/faq/faq_migration.htm#368
Regards -
How to add OLE wordpad objects to a crystal report through VB program
Can we programmatically add OLE wordpad objects to a crystal report XI r 2. through VB.NET or VB6?
And is there a way of treating a database binary/blob field as an ole object in CR?Hi Mohan,
Try it in the Designer first. If it works in the designer then it will work in our SDK's but you'll have to use RAS. So when you post your question to the .NET Development - Crystal Reports Forum be sure to specify what version you are using and anything else as far as versions go.
It may be easier to simply link the OLE Object in the designer, check the help file out on how to.
Thank you
Don -
Report with OLE Object Problem (Crystal Report 11)
Post Author: ibertola
CA Forum: General
Hi all,I'm a new user, and I've got a problem with OLE object. I would like to have a report that show me ONLY one of many OLE (word document) in Crystal structure.I've created 3 section detail, and in each one I've insert OLE object (creating from a file, and LINK).So, if I change one document stored locally, and then refresh the report, the content doesn't change like the linked file! Actually I've got all locally Please help me.CR XI r2 is not supported on WIN 2008. See the [supported platforms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7081b21c-911e-2b10-678e-fe062159b453]
documentation and [this|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567] wiki.
Ludek -
Crystal Reports: How to change Oracle OLE DB server at runtime
Post Author: dvlasman
CA Forum: Data Connectivity and SQL
I'm using a rpt made with Crystal Reports 8.0.1 and VB 6. The report was made using the Microsoft OLE DB provider for Oracle. What I want to do is change to Oracle server / database the report is connecting to at run time before the report is displayed. I am using the Crystal Report Engine 8 Object Library (cpeaut32.dll), not the ocx.After creating the report object:Dim CrystalReport As CRPEAuto.ReportI open my report and discard saved data:'Open The ReportSet CrystalReport = CrystalApplication.OpenReport(msReportSource)CrystalReport.DiscardSavedDataConst sDBServer = "ORCL.SERVER" 'My TNS name for the Oracle ServerConst sDatabase = "ORCL.SERVER" 'I'm not sure what this value should beConst sUID = "system"Const sPwd = "manager"I was then going to change the database connection one of two ways:1:Dim objDatabaseTable As CRPEAuto.DatabaseTableFor Each objDatabaseTable In CrystalReport.Database.Tables Call objDatabaseTable.SetLogOnInfo(sDBServer, sDATABASE, sUID, sPWD) If (Not objDatabaseTable.TestConnectivity) Then Debug.Print "Database failed connection: " & objDatabaseTable.Name End IfNextSet objDatabaseTable = Nothing2:call crystalapplication.LogOnServer("pdsoledb.dll","MSDAORA.1",sDATABASE,sUID,sPWD)Neither of these two way gets me a successful connection. What am I doing wrong, and which is the preferred method to use?ThanksDeanDid you get a resolution to your problem? I cannot dynamically change the datasource location in .NET using CR XI via OLE DB for Oracle. I get "This field name is not known." messages and when I try using the set datasource location in the designer tool, the mapping dialog box comes up with no fields in the right box. Thanks, Brian
-
Attention!!-don't use OLE object in Reports
If you are planning to use or is currently using OLE objects in Reports-please don't use it as the object maynot reload in future and your report may not even open in Report Builder.I got this message when opening the report containing OLE object:
REP-4004: Error occurred while restoring OLE object
and it refused to open up crashing my days of work.
The pity is I can't open my report even to remove the OLE object.I know that is weird.I placed the object in the same directory-but in vain.Afterall, what's the logic of putting it in the same directory after embedding it?
-
<p>Hi, everybody,</p><p> I have a problem which the picture in the report can't be printed.</p><p>I want to display some pictures in the reports and print them.So I insert the picture as OLE object, select the graph format and set graph location fomular with the path of the picture which is stored in the local machine. I run the system and generate the report, the picture is displayed correctly in the report, but when i print the report using ie's tool, the picture is gone and replaced with a little red mark. </p><p>I want to use the new feature of dynamic graph location about the crystal report xi version, but I don't know where I should put the picture into on the web server and what the path is . Because my web server is installed in the another machine.</p><p>I check the view source of html report and find that the system searches the picture under the crystalreportviewer11 folder on the web server.</p>
Need to give the web server access to the folder
-
Hello Friends,
I want to display OLE content from database using
Reports,after report development I am facing following
problem.does anybody know how to solve it.
1. Some times OLE content appears in small font,it is very
difficult to read.
2. After navigating to pages, some fonts become larger or very
small.
3. After navigating to pages, message 'Report can not be
formatted,Object 'vertically' can never fit within...
this error continues even objects and corresponding frames
elasticity changed to variable or Expand.
can anyone have faced such problems ? Please send me solutions,
It's very urgent.
Thanx
AdiHello,
After lot of R&D, I found solution to my problem,but though
It is working now, I am not sure about it's full success,so I
welcome any comment on it.
I just changed number of vertical panels per page property of
main section and it is working correctly,but drawback is suppose
your report is of 2 panel,and you have specified panel to 10
then it creates empty panels and prints it as a blank. How to
avoid this ?
Adi -
Powerpivot Report 2010 - OLE DB or ODBC error: Query timeout expired; HYT00
0
I have report already developed by someone in powerpivot 2010 and deployed to sharepoint in powerpivot gallery library. The data source for this report is SQL Server 2008 r2. I have set the refresh options in sharepoint to run after business hours during
week end. When I check the refresh history it shows this error message "OLE DB or ODBC error: Query timeout expired; HYT00. An error occurred while processing the 'xxx' table. The current operation was cancelled because another operation in the
transaction failed..
I have tried to run the "Also refresh as soon as possible " just to check but same error message is shown.
This is the detailed error message details:
03/02/2014 21:06:55 03/02/2014 22:08:15 01:01:20 Failed
OLE DB or ODBC error: Query timeout expired; HYT00. An error occurred while processing the 'xxx' table. The current operation was cancelled because another operation in the transaction failed
Could anyone guide me on this issue? Truly appreciate your help in advance.Hi asritha,
I would suggest you take a look at the following articles regarding how to configure PowerPivot data refresh in SharePoint Server:
Configure and Use Stored Credentials for PowerPivot Data Refresh:
http://technet.microsoft.com/en-us/library/ee210671(v=sql.105).aspx
Configure and Use the PowerPivot Unattended Data Refresh Account:
http://technet.microsoft.com/en-us/library/ff773327(v=sql.105).aspx
Note: Please ensure that the account have sufficient permission access to your data source.
In addition, please elaborate your PowerPivot data soure with more detail. If you are using SSAS cube, please try to increase "ExternalConnectionTimeout" property default value to see if this helps. Here is the similar thread for your reference,
please see:
http://social.technet.microsoft.com/Forums/en-US/35b26c06-9e6d-41e5-ae44-bfb1233510ac/ssas2008-ole-db-error-ole-db-or-odbc-error-query-timeout-expired-hyt00?forum=sqldatamining
Regards,
Elvis Long
TechNet Community Support
Maybe you are looking for
-
LR images not loading in PS editor
I have PS on my internal H drive and LR on my C drive. In LR, when I export an image to PS the Photoshop program comes up but the image does not load. I just moved my PS to the H drive to save room on my ssd C drive.
-
Where to find keynote poster templates?...link is broken?
I'm looking for poster templates....the link in the tutorial video doesn't work? Any suggestions? Thanks
-
Adding dim property - Error processing (Invalid column name)
BPC 5.1 SP3 I'm trying to add FormulaH1 and FormulaH2 properties to a user-defined dim containing two hierarchies. Properties are added and processed without any issues. However, when I subsequently try to process the member sheet, which has two new
-
Problems printing with Mountain Lion and Epson WorkForce 645.
Ever since I installed Mountain Lion I've been having problems printing on my Epson WorkForce 645. My initial problems started while trying to print from Google Chrome. The printer would always jam once I tried to print from the browser. I would ha
-
2 Gamecenter's on 1 Apple ID!? Please help!
So on Friday of last week, I signed out of Gamecenter and then tried to log back in, however, here's what happened: Gamecenter said I had to accept new terms and conditions. Used E-mail associated with my Apple ID to log into Gamecenter and it asked