Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 16th, 2005, 06:17 AM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default subReport export to doc,Urgency!

I develop a report(name is oRpt) which contain a subReport,I using the following code to export the report sheet to a word page:

         CrystalDecisions.Shared.ExportOptions myExportOptions ; CrystalDecisions.Shared.DiskFileDestinationOptions myDiskFileDestinationOptions
    string myExportFile = "a.doc";
         if ( ! System.IO.Directory.Exists( myExportFile ) ) { System.IO.Directory.CreateDirectory( myExportFile );
                }

         myDiskFileDestinationOptions = new CrystalDecisions.Shared.DiskFileDestinationOptions (); myDiskFileDestinationOptions.DiskFileName = myExportFile;
    myExportOptions = oRpt.ExportOptions;

         myExportOptions.DestinationOptions = myDiskFileDestinationOptions;

    myExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.Disk File;

         myExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.WordForWi ndows;

         oRpt.Export();

    Response.ClearContent();
    Response.ClearHeaders();
         Response.ContentType = "application/vnd.ms-word";

    Response.Redirect( "a.doc", false );
    Response.Flush();
    Response.Close();

The Master Report display correctly in the word page, but the sub report can not display the data from datasouce,only the txtObject in it can be seen.
And both the Master report and subreport display well in the CrystalReportViewer.

Can anybody help me about this? Expect for your reply ! Thanks first!


Reply With Quote
  #2 (permalink)  
Old March 17th, 2005, 01:46 AM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have find out the reason :)
The field object in report must have enough space, then it will display correctly in pdf,doc as well as in the CrystalReportViewer.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working on Doc Array inside another Doc Array? chriscym XSLT 5 April 4th, 2007 05:56 AM
Copy text from 1 doc to other doc thru vba in word itchock Word VBA 2 December 29th, 2006 02:47 AM
subreport srnarla Crystal Reports 1 August 31st, 2006 10:48 AM
subreport bib Visual Basic 2005 Basics 0 August 25th, 2006 12:56 AM
A subreport cannot contain a subreport. dkells Crystal Reports 0 March 3rd, 2005 06:05 PM



All times are GMT -4. The time now is 12:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.