What is wrong with this???

J

jaloplo

Hi,

I have an application that was moved to other server. Before the
changed, It works properly, but now, there is an error when it creates
a Crystal Report.

I would like to know if this code is correct or has something wrong or
not correct at all.

'------------------------------------------------------------------------------------------

Public Function GenerarInformePdf() As Stream
Dim client As ReportClientDocument
Dim miStream As Stream

On Error GoTo controlError

Set client = DameInforme()

Set miStream = New Stream

miStream.Open
miStream.Type = adTypeBinary
miStream.Write
client.PrintOutputController.Export(crReportExportFormatPDF,
0).ByteArray
miStream.Position = 0

Set GenerarInformePdf = miStream
Set miStream = Nothing

Exit Function
controlError:

Set GenerarInformePdf = Nothing
End Function

'------------------------------------------------------------------------------------------


I'm not able to know the error it produces, because the function is in
a dll file.


Thanks in advance!!!!
 
M

Mark Schupp

Is the code you are showing from the DLL? If not then I'm guessing you code
is ASP.NET. You'll need to check a .net group.

If the code is in a DLL then you need to modify the dll to report errors
when it encounters then instead of just exiting (either raise the error
again after cleaning up or write it to a log file).
 

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

Members online

Forum statistics

Threads
473,795
Messages
2,569,644
Members
45,358
Latest member
TreyTritt8

Latest Threads

Top