473,625 Members | 2,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web crystal report in pdf format

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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 14 '05 #1
7 4169
Li - Try setting the ContentType property to "applicatio n/pdf" and set the
ExportFormatTyp e property to "PortableDocFor mat."

"Li Pang" <Li****@discuss ions.microsoft. com> wrote in message
news:A2******** *************** ***********@mic rosoft.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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 14 '05 #2
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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 14 '05 #3
Hi
It looks like you are using MS word export format and not pdf

Response.Conten tType = "applicatio n/pdf"
ExportFormatTyp e.PortableDocFo rmat


"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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 14 '05 #4
If you still want to show word file, use following code:

Response.Conten tType = "octet/stream";
Response.AddHea der("Content-Disposition", "attachment;fil ename=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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 14 '05 #5
Hi,

Thanks for all. I'm sorry that there is a mistake in my codes, I did use
Response.Conten tType = "applicatio n/pdf"
and not
Response.Conten tType = "applicatio n/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
"Profession al 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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 15 '05 #6
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****@discuss ions.microsoft. com> wrote in message
news:37******** *************** ***********@mic rosoft.com...
Hi,

Thanks for all. I'm sorry that there is a mistake in my codes, I did use
Response.Conten tType = "applicatio n/pdf"
and not
Response.Conten tType = "applicatio n/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.

Dec 15 '05 #7
Since you export CR to word format, you can’t open it by adobe
Reader, even if you use
Response.Conten tType = "applicatio n/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.Conten tType = "applicatio n/pdf"
and not
Response.Conten tType = "applicatio n/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
"Profession al 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 =
crReportDocumen t.ExportToStrea m(CrystalDecisi ons.Shared.Expo rtFormatType.Wo rdForWindows)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/msword"
Response.Binary Write(oStream.T oArray())
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

Dec 16 '05 #8

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

Similar topics

2
3717
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 VisualStudio.NET). Also the Crsyatl Report software 8.5 version will not be installed in the IIS web server which is hosting my ASP.NET web application. It will be installed in a different server which has .net and IIS 5.0.
1
2006
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 server, then the report containing the data can be viewed within the browser using a Crystal Viewer. My experience with Crystal is limited to VB client apps, so this is the limit of my understanding of precisely how this works in the ASP world. Once...
3
6026
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 format in crystal(10) e.g. I wish to change a date field to have the format dd/MM/yyyy. The main problem here is that the dataset seems to store data only as string. Is there anyway i can avoid this. Many thanks,
1
5823
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 which is an OLE Object located in the Page Header section of my .RPT file. This is the call which works perfectly in VB6 to format the crystal reports Page Header section of my report file EquipLst.rpt.
0
1586
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 Problem :
6
13127
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 spreadsheet. I'm having trouble with my code at the point at which it hits ".ReadRecords" -- the module just runs and runs without generating anything. I've gotten this code to correctly save .rpt files without any data, but not with data, nor have I been...
19
3868
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 ReuseParameterValuesOnRefresh="True" in a viewer, but it still doesn't work. Did anyone run into this problem. What's the solution? Please help. Thank you
1
3262
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 system prompts them to login (User name and Password). If they view it in PDF format they do not get the login prompt. I do not get the login prompt at all. This problem occurs with users on the Internet and our Intranet. I checked the web site and...
4
12165
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
2
11903
Pittaman
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 the information of a bunch of objects. The actual data is numeric. Since these reports are meant to be flexible number formatting must be configured as defined by the requirements. For example, sometimes the values will have to be rounded to 5...
0
8635
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.