Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 Exporting Crystal Reports to PDF using ASP.NET
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gyto
Posting Yak Master

144 Posts

Posted - 10/26/2006 :  10:30:19  Show Profile  Reply with Quote
Hi there,

I have created a crystal report in Visual Studio 2005 which retrieves it's information from an SQL Server 2000 Table. VS has automatically generated the following ASP.NET page to display the report for me:



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="CostDetailsReport.aspx.vb" Inherits="_Default" %>
<%@ Register TagPrefix="CR" Namespace="CrystalDecisions.Web" Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Cost Details</title>
</head>
<body>

    <form id="form1" runat="server">
    <div>
        <CR:CrystalReportViewer ID="CrystalReportViewer1" Runat="server" AutoDataBind="True"
            Height="947px" ReportSourceID="CrystalReportSource1" Width="845px" />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="CostDetailsReport.rpt">
            </Report>

        </CR:CrystalReportSource>

    </div>

    </form>
</body>
</html>


Here's the issue:

Instead of loading and displaying the report inside the Crystal Report Viewer of a browser window, I would like to export it straight into a PDF document and display that instead. I have seen a few code examples but I am not particularly familier with ASP.NET so I don't know how to implement them inside the page. Could anyone suggest a way of doing this? Or maybe even some code?

Thanks in advance for any help! =S

Edited by - Gyto on 11/02/2006 07:14:51
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000