473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

What is wrong with this???

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(crReportExport FormatPDF,
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!!!!

Nov 24 '05 #1
1 1189
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).

--
--Mark Schupp
<ja*****@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
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(crReportExport FormatPDF,
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!!!!

Nov 25 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike Henley | last post by:
I first came across rebol a while ago; it seemed interesting but then i was put off by its proprietary nature, although the core of the language is a free download. Recently however, i can't...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
28
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr();...
9
by: Pyenos | last post by:
import cPickle, shelve could someone tell me what things are wrong with my code? class progress: PROGRESS_TABLE_ACTIONS= DEFAULT_PROGRESS_DATA_FILE="progress_data" PROGRESS_OUTCOMES=
3
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when...
89
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the...
20
by: Daniel.C | last post by:
Hello. I just copied this code from my book with no modification : #include <stdio.h> /* count characters in input; 1st version */ main() { long nc; nc = 0;
24
by: MU | last post by:
Hello I have some code that sets a dropdownlist control with a parameter from the querystring. However, when the querystring is empty, I get an error. Here is my code: Protected Sub...
2
by: mingke | last post by:
Hi... So I have problem with my if condition..I don't know what's wrong but it keeps resulting the wrong answer.... So here's the part of my code I have problem with: for (i=0; i<size2;...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.