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 September 24th, 2004, 02:29 AM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cyrstal report subreport problem

I'm developing a report within my C# windows app. I'm using a subreport within the details section of my main report. While running the report from the project window(VS.Net IDE) it works fine. However if I try to run the exe directly (or after installing the application setup), it gives me error as follows,

Object reference not set to an instance of an object. (title of error message: Crystal Report Windows Forms Viewer).

Here is the code which i'm using

ReportDocument objDoc = new ReportDocument ();

objDoc.Load (Application.StartupPath + @"rptTest.rpt");
objDoc.SetDataSource (datasetName);
crystalReportViewer1.ReportSource = objDoc;

My doubt is I have not mentioned about the subreport in the code. So I suspect about that. Can anybody give me idea about using subreport with in a report?


I tried with a test report without using subreport, it works just fine. I would like to request you all to suggest me a solution for this.

Thanks and regards,
Keshav.





Similar Threads
Thread Thread Starter Forum Replies Last Post
link report & subreport bib BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 November 22nd, 2007 01:42 AM
link subreport with report bib Visual Basic 2005 Basics 1 August 30th, 2006 01:20 AM
Portrait report with a Landscape subreport ?? norfy Crystal Reports 0 March 15th, 2006 12:25 PM
Performance when loading report contains subreport jessicawkm Forum and Wrox.com Feedback 2 November 16th, 2004 10:34 AM
SubReport in data report vb6? stupidz VB Databases Basics 0 March 1st, 2004 04:18 AM





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