Report library file

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

Is it possible to do this...

I want to make a DLL file full of reports done in crystal reports, but then
i want to get a listing of all the reports in the dll file (kind of an
available report listing) anyway to do this? thanks
 
Hi Brian,

Since Crystal report issue is supported by Business Objects, I am not
familar with the crystal report issue.
At a quick look, if the report is an instance in the memory then we can
build the dll as as class, when we add reference to the dll and then new
the instance of the class and then call some of its methods to build the
report instace and return the instance for further use.

For detailed information, I suggest you post in the crystal report forum
for further response.
Here is the Forum you may have a try.
http://support.businessobjects.com/forums/content.asp?fid=251&sk=5&

http://support.businessobjects.com/

Crystal Reports Samples
http://support.businessobjects.com/fix/samplescr.asp


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
well, how bout in a general issue like this (kind of the same thing) if you
had a link library full of forms, (nothing else just winforms) and none were
instanciated just the library full of classes, and you wanted to get a list
of all the forms in the link library from another project that referenced
this DLL, could you in the other project maybe through reflection or
something? get that list of all the form classes in the DLL then instanciate
it to create a form on screen from the DLL file? thanks!
 
Hi Brian,

Yes, we can use the reflection to enumerate the form class in the assembly.
Here goes the code snippet.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim asm As [Assembly] =
[Assembly].LoadFrom("c:\test\ClassLibrary1\bin\ClassLibrary1.dll")
Dim types() As Type = asm.GetTypes()
For i As Integer = 0 To types.Length - 1
If types(i).BaseType Is GetType(System.Windows.Forms.Form) Then
Debug.WriteLine(types(i).Name)
Dim o As Object = Activator.CreateInstance(types(i),
BindingFlags.CreateInstance, Nothing, New Object() {}, Nothing)
o.Show()
End If
Next
End Sub

You may have a try and let me know the result.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top