Couple of things.
I was looking for a copy of the manual.
https://www.yumpu.com/en/document/view/9317270/rm-cobol-users-guide-second-edition-micro-focus
I have several index files to convert to sequential you can do it in a batch this is the command line.
runcobol recover2 A="INDEXFILE.INX, SEQUENTIALFILE.TXT ,NOSUB"
lunes, 14 de diciembre de 2015
jueves, 10 de diciembre de 2015
Export Data From Crystal Reports to Excel - Work Around
So I was requested to Export the Data from a Crystal Report to Excel with Headers.
This is a work around not the perfect solution. It worked for my request, maybe it will for you as well.
The report uses a DataTable as DataSource.
What I did I export the DataTable as comma delimited file using this method
DataTable2CSV - Saving a DataTable to a CSV file
http://www.devx.com/vb2themax/Tip/19703
Again it worked for me. I got the data and the Headers.
The Report was simple straight forward not a Master - Detail Report.
This is a work around not the perfect solution. It worked for my request, maybe it will for you as well.
The report uses a DataTable as DataSource.
What I did I export the DataTable as comma delimited file using this method
DataTable2CSV - Saving a DataTable to a CSV file
http://www.devx.com/vb2themax/Tip/19703
Again it worked for me. I got the data and the Headers.
The Report was simple straight forward not a Master - Detail Report.
Operation not yet implemented - Crystal Reports
I have this problem when the users use EXPORT AS A PDF from a Crystal Report.
The solution was simple
Grab the Arial and Times Roman Font from a XP Machine put them into a Flash Drive and copy them to the machine you are getting the problem. That will fix it.
What causes this problem? Microsoft update the fonts and they are "not compatible" with CR.
A work around is changing all the Fonts in your report to something else, mmmmm User will not wait for that I will stick with the XP Solution. I can not upload them here but you can send me a email I will send them to you if you need them.
Have a good one
The solution was simple
Grab the Arial and Times Roman Font from a XP Machine put them into a Flash Drive and copy them to the machine you are getting the problem. That will fix it.
What causes this problem? Microsoft update the fonts and they are "not compatible" with CR.
A work around is changing all the Fonts in your report to something else, mmmmm User will not wait for that I will stick with the XP Solution. I can not upload them here but you can send me a email I will send them to you if you need them.
Have a good one
viernes, 4 de diciembre de 2015
Export a Crystal Reports Data to Excel
Simple.
Private Sub btnLoadReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadReport.Click
Try
vLoadDataSet() 'load the datatable with the records
Dim pr1 As New ParameterDiscreteValue
pr1.Value = dtDateFrom.Value.ToShortDateString
Dim pr2 As New ParameterDiscreteValue
pr2.Value = dtDateTo.Value.ToShortDateString
Dim pr3 As New ParameterDiscreteValue
pr3.Value = txtTitle.Text
Dim crSource As New RepMcLennanCCCriminalDocket
crSource.SetDataSource(dtReport)
crSource.SetParameterValue("pFrom", pr1)
crSource.SetParameterValue("pTo", pr2)
crSource.SetParameterValue("pTitle", pr3)
crViewer.ReportSource = crSource
crViewer.Refresh()
crViewer.Visible = True
crViewer.Show()
''here set the export
crSource.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
crSource.ExportOptions.ExportFormatType = ExportFormatType.ExcelRecord
Dim objExcelOptions As ExcelFormatOptions = New ExcelFormatOptions
objExcelOptions.ExcelTabHasColumnHeadings = True
objExcelOptions.ExcelUseConstantColumnWidth = False
crSource.ExportOptions.FormatOptions = objExcelOptions
Dim objOptions As DiskFileDestinationOptions = New DiskFileDestinationOptions
objOptions.DiskFileName = "SettingList.xls"
crSource.ExportOptions.DestinationOptions = objOptions
''here export
crSource.Export()
''here open the excel
Process.Start("EXCEL.EXE", """SettingList.xls""")
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
Private Sub btnLoadReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadReport.Click
Try
vLoadDataSet() 'load the datatable with the records
Dim pr1 As New ParameterDiscreteValue
pr1.Value = dtDateFrom.Value.ToShortDateString
Dim pr2 As New ParameterDiscreteValue
pr2.Value = dtDateTo.Value.ToShortDateString
Dim pr3 As New ParameterDiscreteValue
pr3.Value = txtTitle.Text
Dim crSource As New RepMcLennanCCCriminalDocket
crSource.SetDataSource(dtReport)
crSource.SetParameterValue("pFrom", pr1)
crSource.SetParameterValue("pTo", pr2)
crSource.SetParameterValue("pTitle", pr3)
crViewer.ReportSource = crSource
crViewer.Refresh()
crViewer.Visible = True
crViewer.Show()
''here set the export
crSource.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
crSource.ExportOptions.ExportFormatType = ExportFormatType.ExcelRecord
Dim objExcelOptions As ExcelFormatOptions = New ExcelFormatOptions
objExcelOptions.ExcelTabHasColumnHeadings = True
objExcelOptions.ExcelUseConstantColumnWidth = False
crSource.ExportOptions.FormatOptions = objExcelOptions
Dim objOptions As DiskFileDestinationOptions = New DiskFileDestinationOptions
objOptions.DiskFileName = "SettingList.xls"
crSource.ExportOptions.DestinationOptions = objOptions
''here export
crSource.Export()
''here open the excel
Process.Start("EXCEL.EXE", """SettingList.xls""")
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
lunes, 31 de agosto de 2015
Error 2869
I was trying to install a msi file in a windows 8.1 machine and got the Error 2869
I had tried to run msiexec /i msipack.msi in a command prompt windows as administrator, still the same.
Now I knew the package i was trying to install is a .NET Framework 2 and this Windows 8.1 was a fresh installation. So I added the .Net Framework 2 and 3.5 (add/remove programs | turn windows features On or Off | check Net Framework 3.5 Includes 2) to Windows 8.1
run again the command prompt as Administrator.
Problem solved.
I had tried to run msiexec /i msipack.msi in a command prompt windows as administrator, still the same.
Now I knew the package i was trying to install is a .NET Framework 2 and this Windows 8.1 was a fresh installation. So I added the .Net Framework 2 and 3.5 (add/remove programs | turn windows features On or Off | check Net Framework 3.5 Includes 2) to Windows 8.1
run again the command prompt as Administrator.
Problem solved.
martes, 31 de marzo de 2015
Microsoft Word Automation, let word do the numbering for you
This is a simple trick,
We use MSWord to generate some quick reports for our clients, We create a table in a word document and we fill the table with the data we retrieve from SQL Server. Sometimes we need to add a number to the each Row to show the number of records or just numbering each row, so we added ROW_NUMBER ... etc to our queries, until now, because I tried this trick.
like the picture shows bellow we draw a 3 rows tables and in the row were the data will be populated i create a empty column and I clicked in the Numbering Icon from the Word Tool Bar, this will insert a number 1. in that empty column.
The result will be :
The report with a sequential number in each row, pretty simple and some time saver.
We use MSWord to generate some quick reports for our clients, We create a table in a word document and we fill the table with the data we retrieve from SQL Server. Sometimes we need to add a number to the each Row to show the number of records or just numbering each row, so we added ROW_NUMBER ... etc to our queries, until now, because I tried this trick.
like the picture shows bellow we draw a 3 rows tables and in the row were the data will be populated i create a empty column and I clicked in the Numbering Icon from the Word Tool Bar, this will insert a number 1. in that empty column.
The result will be :
The report with a sequential number in each row, pretty simple and some time saver.
Suscribirse a:
Comentarios (Atom)

