BlurredVision
Technical User
To follow is how I pull information from CE 9. I can report on what reports I have, who gets them and when. Sorry for the less then great instructions, but I don't have a lot of time available these days.
Here we go.
Run the following query via the CSP Query Builder
SELECT
SI_NAME,
SI_PROCESSINFO.SI_FORMAT_INFO,
SI_ID,
SI_OWNER,
SI_PARENT_FOLDER,
SI_CREATION_TIME,
SI_DATE,
SI_DESCRIPTION,
SI_UPDATE_TS,
SI_DEST_SCHEDULEOPTIONS,
SI_LAST_RUN_TIME,
SI_NEXTRUNTIME,
SI_PATH,
SI_FILES,
SI_FORMAT_INFO,
SI_SCHEDULE_TYPE,
SI_SCHEDULE_INTERVAL_MINUTES,
SI_SCHEDULE_INTERVAL_HOURS,
SI_SCHEDULE_INTERVAL_MONTHS,
SI_TYPE,
SI_ENDTIME,
SI_PROGID_SCHEDULE,
SI_RETRIES_ALLOWED,
SI_RETRY_INTERVAL,
SI_RUN_ON_TEMPLATE,
SI_STARTTIME,
SI_DESTINATION,
SI_SCHEDULEINFO
FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report'
From your web browser, save the results of the query to an html document.
Open up your html document in Excel.
From Excel, do an alt-F9 to create a new macro.
From the macro menu, type in a new macro name, then click ‘create’ (The macro editor will now open.
Select all text within the editor and copy and paste the following information within the editor:
' Start Copy
Sub Remove_Insert()
'
' Remove_Insert Macro
' Macro recorded 11/25/2003 by Brian Kuipers
'
'
Rows("1:13".Select
Selection.Delete Shift:=xlUp
ActiveSheet.Shapes("Picture 5".Select
Selection.Delete
Sheets.Add
Sheets("Sheet1".Select
Sheets("Sheet1".Name = "Sheet2"
Sheets("export".Select
Sheets("export".Move Before:=Sheets(1)
End Sub
Sub copyEmail()
Dim nFound As Boolean
counter = 1: nFound = False
For a = 1 To Range("E65535".End(xlUp).Row
Cells(a, 1).Activate
If ActiveCell.Value = "SI_ID" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 1)
End If
If ActiveCell.Value = "SI_OWNER" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 2)
End If
If ActiveCell.Value = "SI_PARENT_FOLDER" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 3)
End If
If ActiveCell.Value = "SI_UPDATE_TS" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 4)
End If
If ActiveCell.Value = "SI_CREATION_TIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 5)
End If
If ActiveCell.Value = "SI_LAST_RUN_TIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 6)
End If
If ActiveCell.Value = "SI_DESCRIPTION" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 7)
End If
If InStr(1, Cells(a, 3).Value, "frs://" <> 0 And nFound = True Then
Cells(a, 3).Copy Sheets(2).Cells(counter, 8)
End If
If InStr(1, Cells(a, 3).Value, ".rpt" <> 0 And nFound = True Then
Cells(a, 3).Copy Sheets(2).Cells(counter, 9)
End If
If InStr(1, Cells(a, 3).Value, "crx" <> 0 And nFound = True Then
Cells(a, 3).Copy Sheets(2).Cells(counter, 10)
End If
If ActiveCell.Value = "SI_SCHEDULE_TYPE" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 11)
End If
If ActiveCell.Value = "SI_NAME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 12)
End If
If ActiveCell.Value = "SI_TYPE" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 13)
End If
If ActiveCell.Value = "SI_ENDTIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 14)
End If
If ActiveCell.Value = "SI_PROGID_SCHEDULE" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 15)
End If
If ActiveCell.Value = "SI_RETRIES_ALLOWED" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 16)
End If
If ActiveCell.Value = "SI_RETRY_INTERVAL" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 17)
End If
If ActiveCell.Value = "SI_STARTTIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 18)
End If
If InStr(1, Cells(a, 5).Value, "@" <> 0 And nFound = True Then
Cells(a, 5).Copy Sheets(2).Cells(counter, 19): counter = counter + 1
End If
If ActiveCell.Value = "Properties" Then nFound = False: counter = counter + 1
Next a
End Sub
Sub InsertHeader()
With ThisWorkbook.Worksheets("Sheet2"
.Rows(1).Insert
.Range("A1".Value = "SI_ID"
.Range("B1".Value = "SI_OWNER"
.Range("C1".Value = "SI_PARENT_FOLDER"
.Range("D1".Value = "SI_UPDATE_TS"
.Range("E1".Value = "SI_CREATION_TIME"
.Range("F1".Value = "SI_LAST_RUN_TIME"
.Range("G1".Value = "SI_DESCRIPTION"
.Range("H1".Value = "SI_FILE_PATH"
.Range("I1".Value = "SI_FILE_NAME"
.Range("J1".Value = "SI_EXPORT_FORMAT"
.Range("K1".Value = "SI_SCHEDULE_TYPE"
.Range("L1".Value = "SI_NAME"
.Range("M1".Value = "SI_TYPE"
.Range("N1".Value = "SI_ENDTIME"
.Range("O1".Value = "SI_PROGID_SCHEDULE"
.Range("P1".Value = "SI_RETRIES_ALLOWED"
.Range("Q1".Value = "SI_RETRY_INTERVAL"
.Range("R1".Value = "SI_STARTTIME"
.Range("S1".Value = "SI_REPORT_RECIPIENTS"
'add header
End With
End Sub
Sub FillSI_ID()
For Each c In Range("A1:A748"
If c = "" Then c.Value = c.Offset(-1, 0).Value
Next
End Sub
Sub clearBorders()
Dim ws As Worksheet
Set ws = ActiveSheet
' Clear exiting borders
Cells.Borders.LineStyle = xlLineStyleNone
End Sub
Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub
' End Copy
Save and exit.
The following macro’s have been created:
clearBorders
copyEmail
DeleteEmptyRows
FillSI_ID
InsertHeader
Remove_insert
Press Alt-F9 to bring up the macro list. Highlight a macro in the following order and click run
Remove_Insert
clearBorders
copyEmail
DeleteEmptyRows (Run From Sheet 2)
FillSI_ID (You must edit this macro with the total amount of rows in your spread sheet) (Run From Sheet 2)
InsertHeader (Run From Sheet 2)
Now save your spread sheet in excel format. Now you can use Crystal Reports to report off of your newly created spread sheet.
If you have any questions.. Please post them. I'll help out if I can.
Brian
Here we go.
Run the following query via the CSP Query Builder
SELECT
SI_NAME,
SI_PROCESSINFO.SI_FORMAT_INFO,
SI_ID,
SI_OWNER,
SI_PARENT_FOLDER,
SI_CREATION_TIME,
SI_DATE,
SI_DESCRIPTION,
SI_UPDATE_TS,
SI_DEST_SCHEDULEOPTIONS,
SI_LAST_RUN_TIME,
SI_NEXTRUNTIME,
SI_PATH,
SI_FILES,
SI_FORMAT_INFO,
SI_SCHEDULE_TYPE,
SI_SCHEDULE_INTERVAL_MINUTES,
SI_SCHEDULE_INTERVAL_HOURS,
SI_SCHEDULE_INTERVAL_MONTHS,
SI_TYPE,
SI_ENDTIME,
SI_PROGID_SCHEDULE,
SI_RETRIES_ALLOWED,
SI_RETRY_INTERVAL,
SI_RUN_ON_TEMPLATE,
SI_STARTTIME,
SI_DESTINATION,
SI_SCHEDULEINFO
FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report'
From your web browser, save the results of the query to an html document.
Open up your html document in Excel.
From Excel, do an alt-F9 to create a new macro.
From the macro menu, type in a new macro name, then click ‘create’ (The macro editor will now open.
Select all text within the editor and copy and paste the following information within the editor:
' Start Copy
Sub Remove_Insert()
'
' Remove_Insert Macro
' Macro recorded 11/25/2003 by Brian Kuipers
'
'
Rows("1:13".Select
Selection.Delete Shift:=xlUp
ActiveSheet.Shapes("Picture 5".Select
Selection.Delete
Sheets.Add
Sheets("Sheet1".Select
Sheets("Sheet1".Name = "Sheet2"
Sheets("export".Select
Sheets("export".Move Before:=Sheets(1)
End Sub
Sub copyEmail()
Dim nFound As Boolean
counter = 1: nFound = False
For a = 1 To Range("E65535".End(xlUp).Row
Cells(a, 1).Activate
If ActiveCell.Value = "SI_ID" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 1)
End If
If ActiveCell.Value = "SI_OWNER" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 2)
End If
If ActiveCell.Value = "SI_PARENT_FOLDER" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 3)
End If
If ActiveCell.Value = "SI_UPDATE_TS" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 4)
End If
If ActiveCell.Value = "SI_CREATION_TIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 5)
End If
If ActiveCell.Value = "SI_LAST_RUN_TIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 6)
End If
If ActiveCell.Value = "SI_DESCRIPTION" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 7)
End If
If InStr(1, Cells(a, 3).Value, "frs://" <> 0 And nFound = True Then
Cells(a, 3).Copy Sheets(2).Cells(counter, 8)
End If
If InStr(1, Cells(a, 3).Value, ".rpt" <> 0 And nFound = True Then
Cells(a, 3).Copy Sheets(2).Cells(counter, 9)
End If
If InStr(1, Cells(a, 3).Value, "crx" <> 0 And nFound = True Then
Cells(a, 3).Copy Sheets(2).Cells(counter, 10)
End If
If ActiveCell.Value = "SI_SCHEDULE_TYPE" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 11)
End If
If ActiveCell.Value = "SI_NAME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 12)
End If
If ActiveCell.Value = "SI_TYPE" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 13)
End If
If ActiveCell.Value = "SI_ENDTIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 14)
End If
If ActiveCell.Value = "SI_PROGID_SCHEDULE" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 15)
End If
If ActiveCell.Value = "SI_RETRIES_ALLOWED" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 16)
End If
If ActiveCell.Value = "SI_RETRY_INTERVAL" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 17)
End If
If ActiveCell.Value = "SI_STARTTIME" Then
nFound = True: Cells(a, 2).Copy Sheets(2).Cells(counter, 18)
End If
If InStr(1, Cells(a, 5).Value, "@" <> 0 And nFound = True Then
Cells(a, 5).Copy Sheets(2).Cells(counter, 19): counter = counter + 1
End If
If ActiveCell.Value = "Properties" Then nFound = False: counter = counter + 1
Next a
End Sub
Sub InsertHeader()
With ThisWorkbook.Worksheets("Sheet2"
.Rows(1).Insert
.Range("A1".Value = "SI_ID"
.Range("B1".Value = "SI_OWNER"
.Range("C1".Value = "SI_PARENT_FOLDER"
.Range("D1".Value = "SI_UPDATE_TS"
.Range("E1".Value = "SI_CREATION_TIME"
.Range("F1".Value = "SI_LAST_RUN_TIME"
.Range("G1".Value = "SI_DESCRIPTION"
.Range("H1".Value = "SI_FILE_PATH"
.Range("I1".Value = "SI_FILE_NAME"
.Range("J1".Value = "SI_EXPORT_FORMAT"
.Range("K1".Value = "SI_SCHEDULE_TYPE"
.Range("L1".Value = "SI_NAME"
.Range("M1".Value = "SI_TYPE"
.Range("N1".Value = "SI_ENDTIME"
.Range("O1".Value = "SI_PROGID_SCHEDULE"
.Range("P1".Value = "SI_RETRIES_ALLOWED"
.Range("Q1".Value = "SI_RETRY_INTERVAL"
.Range("R1".Value = "SI_STARTTIME"
.Range("S1".Value = "SI_REPORT_RECIPIENTS"
'add header
End With
End Sub
Sub FillSI_ID()
For Each c In Range("A1:A748"
If c = "" Then c.Value = c.Offset(-1, 0).Value
Next
End Sub
Sub clearBorders()
Dim ws As Worksheet
Set ws = ActiveSheet
' Clear exiting borders
Cells.Borders.LineStyle = xlLineStyleNone
End Sub
Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub
' End Copy
Save and exit.
The following macro’s have been created:
clearBorders
copyEmail
DeleteEmptyRows
FillSI_ID
InsertHeader
Remove_insert
Press Alt-F9 to bring up the macro list. Highlight a macro in the following order and click run
Remove_Insert
clearBorders
copyEmail
DeleteEmptyRows (Run From Sheet 2)
FillSI_ID (You must edit this macro with the total amount of rows in your spread sheet) (Run From Sheet 2)
InsertHeader (Run From Sheet 2)
Now save your spread sheet in excel format. Now you can use Crystal Reports to report off of your newly created spread sheet.
If you have any questions.. Please post them. I'll help out if I can.
Brian