TheRealMcD
New member
- Joined
- Feb 20, 2012
- Messages
- 3
- Programming Experience
- 10+
I have an application that provides the users a list of crystal reports that they can run.
I use a datatable, displayed on a datagrid within a form, to show the users descriptive names for the reports, and a check box for each.
The users clicks the check box for the report(s) they want to run. (I also have select All, deselect all, etc.. )
The users then clicks a "OK" button and then I do a For each ... loop through the datatable to determine the reports selected.
Within a Public Class, in a different but included .vb file, I have a sub for each of the reports within the list and there is a field within the datatable that has the exact name of the sub I want to call.
The subs generate the data and call the desired crystal report.
On my development machine the application works perfectly within the Visual Studio 2008 test environment, and also after I build, publish, and then run it from explorer or wherever.
However, when I run in on another machine. It fails to invoke the subs within the public class. Everything else work fine. I did the old fashioned method of putting msgbox comments in every section
and determined it fails when I try to invoke the sub.
Like I said, it works on my development machine. My development machine is Windows 7 64bit, and the target machine is Windows 7 32bit but the compiler settings is set to any machine so that should not make
a difference right?
Any help will be appreciated
Thank You
Public Sub RunRept(ByVal ReptName As String, ByVal ReptMode As Int16, ByVal cs As SqlConnection, ByRef ds_cklst As DataSet, _
ByVal mo As Int16, ByVal yr As Int16, ByVal ReptID As String, ByVal PDF_PTH As String, ByVal PDF_CR_PTH As String, ByVal Prnter As String)
Dim Reptobj As New ReptCall
Dim myType As System.Type = GetType(ReptCall)
Dim myInfo As System.Reflection.MethodInfo = myType.GetMethod(ReptName)
Dim myParams() As Object = {ReptMode, cs, ds_cklst, mo, yr, ReptID, PDF_PTH, PDF_CR_PTH, Prnter}
Try
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Sales Analysis")
End Try
Try
myInfo.Invoke(Reptobj, myParams)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Sales Analysis")
End Try
End Sub
I use a datatable, displayed on a datagrid within a form, to show the users descriptive names for the reports, and a check box for each.
The users clicks the check box for the report(s) they want to run. (I also have select All, deselect all, etc.. )
The users then clicks a "OK" button and then I do a For each ... loop through the datatable to determine the reports selected.
Within a Public Class, in a different but included .vb file, I have a sub for each of the reports within the list and there is a field within the datatable that has the exact name of the sub I want to call.
The subs generate the data and call the desired crystal report.
On my development machine the application works perfectly within the Visual Studio 2008 test environment, and also after I build, publish, and then run it from explorer or wherever.
However, when I run in on another machine. It fails to invoke the subs within the public class. Everything else work fine. I did the old fashioned method of putting msgbox comments in every section
and determined it fails when I try to invoke the sub.
Like I said, it works on my development machine. My development machine is Windows 7 64bit, and the target machine is Windows 7 32bit but the compiler settings is set to any machine so that should not make
a difference right?
Any help will be appreciated
Thank You
Public Sub RunRept(ByVal ReptName As String, ByVal ReptMode As Int16, ByVal cs As SqlConnection, ByRef ds_cklst As DataSet, _
ByVal mo As Int16, ByVal yr As Int16, ByVal ReptID As String, ByVal PDF_PTH As String, ByVal PDF_CR_PTH As String, ByVal Prnter As String)
Dim Reptobj As New ReptCall
Dim myType As System.Type = GetType(ReptCall)
Dim myInfo As System.Reflection.MethodInfo = myType.GetMethod(ReptName)
Dim myParams() As Object = {ReptMode, cs, ds_cklst, mo, yr, ReptID, PDF_PTH, PDF_CR_PTH, Prnter}
Try
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Sales Analysis")
End Try
Try
myInfo.Invoke(Reptobj, myParams)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Sales Analysis")
End Try
End Sub