Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2004, 03:42 PM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exporting Web-Based Reports To PDF

I'm Using Crystal Reports within ASP.Net

I’m trying to export a crystal report to PDF…everything seems to work OK with an existing (saved) report. However when I try to do it with a report that has been just created it doesn’t work!
-----
Load report failed.
crReportDocument.Load("ReportName.rpt")
------

Is there a way to do it?
Or shall I just save the created report then load it?
& How can I save the report?!!
Does saving the reports means that the user has to have write access to the folder? cuz this is a web application
 
Old September 2nd, 2004, 11:43 PM
Registered User
 
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mohithmohith
Default

Hi,

   You have to save report to disk before loading it. Better you create a folder in the application and include the report in that folder and give the path to ReportDocument. You need not share the folder at all in this case.

 Thanks
 Mohith
 
Old September 4th, 2004, 12:24 AM
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've been trying to save the dynamicallly generated reports within the code, but seems that i'm missing something here
i'm kinda lost with the arguments of the SaveAs() method
-------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        cnReport2.Open()
        Dim report As New CrystalReport2

        DsReport2.Clear()
        daReport2.SelectCommand.CommandText = "SELECT Customer.AnnualProfitRate, Customer.CustomerAccountNbr, Customer.CustomerName, Customer.FacilityAmount, Customer.FacilityPeriod, Customer.FirstDay, Customer.FirstMonth, Customer.FirstYear, Customer.FlatProfitRate, Customer.PrincipalAmount, Customer.ProfitAmount, Customer.RepaymentAmount, Repayment2.FacilityBalance, Repayment2.RepaymentAmount AS Expr1, Repayment2.RepaymentNbr FROM Customer, Repayment2"
        daReport2.Fill(DsReport2, "Customer")

        CrystalReportViewer1.Visible = True

        CrystalReportViewer1.ReportSource = report

        report.SetDataSource(DsReport2)
        'i'm LOST with both arguments, either an invalid file name or file format is not defined!
        ' report.SaveAs(, )

        cnReport2.Close()

    End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting Crystal Reports to PDF using ASP.NET Gyto Crystal Reports 2 November 22nd, 2006 12:53 AM
Exporting To PDF Ardvisoor Reporting Services 0 May 28th, 2006 07:06 AM
Problem in exporting data to PDF vasansrini Crystal Reports 1 December 10th, 2004 11:48 AM
Logon failed... exporting crystal reports into pdf JerBlur VB.NET 0 July 23rd, 2004 02:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.