Hi,
I built a web form to display a crystal report in web, every thing work
properly. I added then a button to display the report in the embedded adobe
reader by using the below codes:
Dim oStream As New MemoryStream
oStream =
crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/msword"
Response.BinaryWrite(oStream.ToArray())
Response.End()
It works as well. Then I supressed the button and called above codes at the
last time of form load, but the browser returned me some strange codes
instead of the pdf report. Is there a way to display the report directly in
adobe reader?
I appreciate for any helps 7 4159
Li - Try setting the ContentType property to "application/pdf" and set the
ExportFormatType property to "PortableDocFormat."
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.com... Hi,
I built a web form to display a crystal report in web, every thing work properly. I added then a button to display the report in the embedded adobe reader by using the below codes:
Dim oStream As New MemoryStream oStream = crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows) Response.Clear() Response.Buffer = True Response.ContentType = "application/msword" Response.BinaryWrite(oStream.ToArray()) Response.End()
It works as well. Then I supressed the button and called above codes at the last time of form load, but the browser returned me some strange codes instead of the pdf report. Is there a way to display the report directly in adobe reader?
I appreciate for any helps
hi,
I try to do the same thing as you mentionned but I ma one step backwards
I am not able to display report data on a web form
How do you do this, do you have a sample ?
Do you use the embeded Crystal file to framework or did you installed the
full developper version ?
thanks for your hlep
regards
"Li Pang" wrote: Hi,
I built a web form to display a crystal report in web, every thing work properly. I added then a button to display the report in the embedded adobe reader by using the below codes:
Dim oStream As New MemoryStream oStream = crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows) Response.Clear() Response.Buffer = True Response.ContentType = "application/msword" Response.BinaryWrite(oStream.ToArray()) Response.End()
It works as well. Then I supressed the button and called above codes at the last time of form load, but the browser returned me some strange codes instead of the pdf report. Is there a way to display the report directly in adobe reader?
I appreciate for any helps
Hi
It looks like you are using MS word export format and not pdf
Response.ContentType = "application/pdf"
ExportFormatType.PortableDocFormat
"serge calderara" wrote: hi,
I try to do the same thing as you mentionned but I ma one step backwards I am not able to display report data on a web form
How do you do this, do you have a sample ?
Do you use the embeded Crystal file to framework or did you installed the full developper version ?
thanks for your hlep regards
"Li Pang" wrote:
Hi,
I built a web form to display a crystal report in web, every thing work properly. I added then a button to display the report in the embedded adobe reader by using the below codes:
Dim oStream As New MemoryStream oStream = crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows) Response.Clear() Response.Buffer = True Response.ContentType = "application/msword" Response.BinaryWrite(oStream.ToArray()) Response.End()
It works as well. Then I supressed the button and called above codes at the last time of form load, but the browser returned me some strange codes instead of the pdf report. Is there a way to display the report directly in adobe reader?
I appreciate for any helps
If you still want to show word file, use following code:
Response.ContentType = "octet/stream";
Response.AddHeader("Content-Disposition", "attachment;filename=filename");
HTH
"Li Pang" wrote: Hi,
I built a web form to display a crystal report in web, every thing work properly. I added then a button to display the report in the embedded adobe reader by using the below codes:
Dim oStream As New MemoryStream oStream = crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows) Response.Clear() Response.Buffer = True Response.ContentType = "application/msword" Response.BinaryWrite(oStream.ToArray()) Response.End()
It works as well. Then I supressed the button and called above codes at the last time of form load, but the browser returned me some strange codes instead of the pdf report. Is there a way to display the report directly in adobe reader?
I appreciate for any helps
Hi,
Thanks for all. I'm sorry that there is a mistake in my codes, I did use
Response.ContentType = "application/pdf"
and not
Response.ContentType = "application/msword"
otherwise I could get Adobe working. My issue is to display the report in
adobe directly but not by clicking a button with a codes given.
serge calderara,
please refer to the book
"Professional Crystal Reports for Visual Studio .NET"
"Li Pang" wrote: Hi,
I built a web form to display a crystal report in web, every thing work properly. I added then a button to display the report in the embedded adobe reader by using the below codes:
Dim oStream As New MemoryStream oStream = crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows) Response.Clear() Response.Buffer = True Response.ContentType = "application/msword" Response.BinaryWrite(oStream.ToArray()) Response.End()
It works as well. Then I supressed the button and called above codes at the last time of form load, but the browser returned me some strange codes instead of the pdf report. Is there a way to display the report directly in adobe reader?
I appreciate for any helps
I'm not sure if you can do this in the Page_Load. Try putting your code in
the Page_Render method instead.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com... Hi,
Thanks for all. I'm sorry that there is a mistake in my codes, I did use Response.ContentType = "application/pdf" and not Response.ContentType = "application/msword"
otherwise I could get Adobe working. My issue is to display the report in adobe directly but not by clicking a button with a codes given.
Since you export CR to word format, you can’t open it by adobe
Reader, even if you use
Response.ContentType = "application/pdf".
adobe Reader will recognize it is not pdf file.
HTH
Elton
"Li Pang" wrote: Hi,
Thanks for all. I'm sorry that there is a mistake in my codes, I did use Response.ContentType = "application/pdf" and not Response.ContentType = "application/msword"
otherwise I could get Adobe working. My issue is to display the report in adobe directly but not by clicking a button with a codes given.
serge calderara, please refer to the book "Professional Crystal Reports for Visual Studio .NET"
"Li Pang" wrote:
Hi,
I built a web form to display a crystal report in web, every thing work properly. I added then a button to display the report in the embedded adobe reader by using the below codes:
Dim oStream As New MemoryStream oStream = crReportDocument.ExportToStream(CrystalDecisions.S hared.ExportFormatType.WordForWindows) Response.Clear() Response.Buffer = True Response.ContentType = "application/msword" Response.BinaryWrite(oStream.ToArray()) Response.End()
It works as well. Then I supressed the button and called above codes at the last time of form load, but the browser returned me some strange codes instead of the pdf report. Is there a way to display the report directly in adobe reader?
I appreciate for any helps This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Raghu |
last post by:
Hi,
In my ASP.NET web application project we need to design
crystal reports with Crystal Reports version 8.5
enterpraise edition(Please Note:It is not the Crystal
Reports that comes with...
|
by: Stephanie Stowe |
last post by:
I am doing a support rotation for our massive ASP app. We use Crystal
Reports / Enterprise. By some magic which I am unfamiliar with Crystal
Enterprise allows the creation of a report on the...
|
by: Colin Graham |
last post by:
I have recently created a report in crystal(10) linking to a dataset
as the datasource. I notice however that the fields available in the
report all have STRING format and therefore i cannot change...
|
by: Ron Holmes |
last post by:
I posted this question on the Crystal Reports Support site and I am still
waiting for an answer.
Using Crystal Reports 9.0 Developer Full edition:
My Crystal report .RPT file has a Picture box...
|
by: Zoury |
last post by:
Hi there ! :O)
I'm having a two strange behaviors with Crystal Report which seems to have
the same cause..
All the fields used in the reports comes from some SQL Server views.
*** 1st...
| |
by: Robin Cushman |
last post by:
Hi all,
I need some help -- I'm working with an A2K database, using DAO, and
am trying to read records into a Crystal Report and then export it to
a folder on our network as an Excel...
|
by: LP |
last post by:
I am using (trying to) CR version XI, cascading parameters feature works it
asks user to enter params. But if page is resubmitted. It prompts for params
again. I did set...
|
by: CBKowitz |
last post by:
I have an intermittent problem, when viewing a crystal report. This problem
only happens to some users and some report formats. When they try to view
the report in Microsoft Word format the...
|
by: jaYPee |
last post by:
I have a report created in crystal report. My problem is on how can I
remove the decimal point without converting the value.
say for example if I have this data:
Unit
2
1.5
2
3
|
by: Pittaman |
last post by:
Hello
I am creating some crystal reports (for visual studio 2005) based on the content of certain .NET objects. I'm doing this in .NET 2.0.
For one of them I'm using a Cross-table to summarize...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |