Application is hanging after exporting a report

Post Author: AnthonyM
CA Forum: .NET
I am using Crystal Reports XI R2 with C# in VS 2005. I am also using Crystal Reports SDK 11.5. I have a main report that contains 4 subreports that I want to pass data to at run-time. When I run my app to do this and save it as a pdf, it hangs and I eventually have to manually terminate the EXE. Now here is where it gets interesting: When I forcibly terminated the program and checked the file that it was supposed to write to, I notice that the report was transformed and written correctly. The issue was that the app was not closing upon completion.
I then stepped through the code using the debugger and saw that after I exit main's body; I get a message box saying "unknown software exception (0xe06d7363) occurred in the application at location 0x7c812a5b". Now, I went back and commented out the foreach loop in SetData() to iterate through the subreports to see what would happen. The result was that there was no message box about the software exception, but the report now had 4 empty subreports and made the main report practically useless. This means that something in the process of assigning data to the subreports is causing this "unknown software exception" to occur. The code I am using is:
public static void Main()
ReportDocument doc = new ReportDocument();
DataSet ds = new DataSet("ProbeSheetPrimeLeadStats");
try
//use the schema to create structure of the dataset
ds.ReadXmlSchema(new FileStream("C:
xmlFiles
ProbeSheetSchema.xsd", FileMode.Open, FileAccess.Read));
//now use the dummyLead.xml file to pass it data
ds.ReadXml(new FileStream("C:
xmlFiles
dummyLead.xml", FileMode.Open, FileAccess.Read));
//load the report in
doc.Load("C:
reports
ProbeSheetV2WSchema.rpt");
// set all the data for the main report
ApplyReportData(ds, doc);
//doc.ExportToDisk(ExportFormatType.PortableDocFormat, "C:
xmlFiles
ProbeTestOutput.pdf");
MemoryStream stream = (MemoryStream)doc.ExportToStream(ExportFormatType.PortableDocFormat);
FileStream outputOfResult = new FileStream("C:
xmlFiles
ProbeTestOutput.pdf", FileMode.Create, FileAccess.Write);
outputOfResult.Write(stream.ToArray(), 0,(int) stream.Length);
finally
//clean up the garbage :-p
doc.Dispose();
ds.Dispose();
private static void ApplyReportData
(DataSet DsReportData, ReportDocument theReport)
//set the main report's data
SetData(DsReportData, theReport);
//now set it for each subreport
/*NOTE: If you skip the below foreach loop, the app works fine!!! */
foreach (ReportDocument SubReport in
theReport.Subreports)
SetData(DsReportData, SubReport);
private static void SetData
(DataSet DsReportData, ReportDocument someReport)
//each table in the report find's corresponding sibling
//in the dataset's table collection
foreach (Table table in someReport.Database.Tables)
table.SetDataSource
(DsReportData.Tables[table.Name]);
I have a feeling that it could be a bug in Crystal Reports SDK 11.5, but I can't confirm that. Does any one have any Ideas or suggestions? I need to dynamically set the datasource for this report and its subreports and can't remove the subreports because each of them represents an attribute of the main entity that can be multi-valued and I do not think can be displayed in one page otherwise.
Thank you in advance for any help. Let me know if there is anything that needs clarification.
-Anthony

Post Author: AnthonyM
CA Forum: .NET
I found out what the problem was. It was not Crystal Reports API, it was me (ID10t error :-p). When I wrote the report and used the XML Schema for the data layout in the report, I had all the tables originally inputted into the main report and then again in each subreport. What I think was happening was some sort of a data conflict when I was exporting with the subreport data filled out and having it present in the main report as well. I'm not precisely sure what was going on, but removing the extra tables from the main report did solve the problem.
I hope this saves someone some time; it took be 3 days to figure it out.

Similar Messages

  • MapiSendMail doesn't work after Exporting a report in CR2008 (Outlook2003)

    Hi,
    This one sounds crazy but I'm hoping this might make sense to someone..
    We're using CR2008 SP4. In our WinForms app, we use the MapiSendMail function to open up a new email message for the user to send.
    This issue only occurs when Outlook 2003 is installed (outlook 2007 and 2010 work fine).
    If, in my application, I call MapiSendMail to send an email before exporting a Crystal Report to PDF .i.e oReport:Export() then both the export and sending mail work fine as long as I'm logged into my app.
    If, however, in my application, I export a Crystal Report to PDF .i.e oReport:Export() and then I try to call MapiSendMail I get a generic MAPI erorr(2). I have to log out of my app to be able to open up a new mail message.
    Is there anything in the Report:Export method that some affects default MAPI behavior?
    Thanks,
    Fergus

    Hi Don,
    Many thanks for getting back to me. I've found a workaround without having fully understood the cause. I'll put it all down here in case some others have similar problems.
    I was already closing and disposing the report object in my code as soon as the export completed.
    The Mapi error 2 is  MAPI_E_FAILURE  which translates to "One or more unspecified errors occurred while sending the message. It is not known if the message was sent."
    I could not find any any "Access Denied"s using ProcMon.
    I used the Modules.exe to determine which dlls were loaded when the MapiSendMail worked correctly and compared that to when it didn't work. One dll that poped out was "outex.dll".
    I searched for that in ProcMon and (in the case where MapiSendMail didn't work) and found that it was looking for this outex.dll but couldn't find it. It's located in C:\Program Files\Common Files\System\MSMAPI\1033 but it never looked there.
    So:
    Calling MapiSendMail before exporting a report - outex.dll can be found
    Calling MapiSendMail after exporting a report - outex.dll can't be found
    To get around this I added C:\Program Files\Common Files\System\MSMAPI\1033 to the path on the machine(s) in question and it worked every time.
    Thanks again for your help.
    Fergus
    p.s. After finding this workaround I found an almost identical problem but with Oracle instead of Crystal (How to serach text via TREX with cryptograph attachment in SAP system?).

  • No link to the local .avi files after exporting Crystal report as .pdf

    Hello all,
    The overall scenario is like-
    My application fires a query on SQL Server database and result of that query is stored in a Dataset. This dataset is set as a datasource to the Crystal report.  Now some, records (returned by the query) have .avi files(i.e. Event Videos which are stored on the local hard disk) associated with them. I have stored these .avi files in a specific path on local Hard disk say "C:/EventVideos/*.avi" .   I used a special format in these avi files name. (like - "EventVideo_1.avi" (This is for 1st event), "EventVideo_5.avi" (This is for 5th event)etc. to identify which avi is for which event. All events do not have avi files associated with them)
          Now, I take one Text Object in crystal report. Using it's Format editor created a formula for hyperlink as -
          "file:///c:/EventVideos/EventVideo_" + {DataTable1.EventID} + ".avi" .
    EventID is the field of dataset which has ID's (like 0, 1, 2,  3, 4 etc) of all resulted events. It is of a String data type.
         Now when I export, my report as .xls, .rtf, .doc, I can open the avi files. When I bring cursor on this Text Object, cursor get change to Hand and after click on it avi file start to play.
         But if I export it as .pdf, it does not contain the link for avi files. When I bring cursor on this Text Object , it does not change to Hand, and after click on it nothing happens. No video play.
    I stick to this problem. What should be done in this case?
    Appreciate your help.
    Thanks in advance.

    duplicate - please do not post multiple times

  • No link after exporting Crystal report as pdf file

    Hello,
              If my Crystal Report contain link to the .avi file saved on the local hard disk and if I export the Report as .pdf file, pdf file does not contain that link. Why?
    The overall scenario is like-
    My application fires a query on SQL Server database and result of that query is stored in a Dataset. This dataset is set as a datasource to the Crystal report.  Now some, records (returned by the query) have .avi files(i.e. Event Videos which are stored on the local hard disk) associated with them. I have stored these .avi files in a specific path on local Hard disk say "C:/EventVideos/*.avi" .   I used a special format in these avi files name. (like - "EventVideo_1.avi" (This is for 1st event), "EventVideo_5.avi" (This is for 5th event)etc. to identify which avi is for which event. All events do not have avi files associated with them)
          Now, I take one object in crystal report. Using it's Format editor created a formula for hyperlink as -
          "file:///c:/EventVideos/EventVideo_" + {DataTable1.EventID} + ".avi" .
    EventID is the field of dataset which has ID's (like 0, 1, 2,  3, 4 etc) of all resulted events. It is of a String data type.
         Now when I export, my report as .xls, .rtf, .doc, I can open the avi files. When I bring cursor on this object, cursor get change to Hand and after click on it avi file start to play.
         But if I export it as .pdf, it does not contain the link for avi files. When I bring cursor on this object, it does not change to Hand, and after click on it nothing happens. No video play.
    I stick to this problem.
    Appreciate your help.
    Thanks in advance.

    Taken from CR Help File:
    "PDF format is a page-based format. The exported documents are intended for printing and redistribution. PDF format will export both layout and formatting in a manner that is consistent with how the report looks on the Preview tab. PDF format embeds the TrueType fonts that appear in the document. (Non-TrueType fonts are not supported.) This export format does not support Microsoft font-linking technologyu2014which is used to provide support for some extended character sets such as Chinese HKCS. Therefore, the fonts used in the report must contain all of the required glyphs. These URI types are supported for hyperlinks: "http:", "https:" and "mailto:".
    Therefore your hyperlink is not working as u are using File type when cr only supports http https and mailto uri types

  • Formating issue after export crystal report to excel format

    Hi Everyone,
    I have a crystal report devloped in crystal 8.5 and i am calling this report from my .net windows application.  I have a problem when i export the report in excel format. One of the column size(which is report footer) gets increased because of which my report is not properly formated. I have reoved all the blank lines and extra space but still i am not able to reduce the column size. Any help will be appriciated.
    Thanks in advance.

    Hi,
    Please let us know the Visual Studio Version that you are using, just to inform you, VS2005 is compatible with CRXIR2 and above and VS2008 is compatible with CR2008 + SP0.
    Do the report display properly from the designer? Does the Export from the designer in xls works fine?
    Thanks,
    AG.

  • Layout Issue after exporting crystal report XI in pdf format

    Hi All,
    I have developed a crystal report in XI version. I have set my page layout properties in the report to be in landscape orientation and A2 size sheet with No Printer(optimize for screen display) option unchecked. The problem is when I export the report in pdf and open the report in pdf for printing, it takes the printer preference settings that are set to portrait and letter format. If I change my printer prefence settings to landscape, it works fine. But, I do not want to change my printer preference settings and want that the settings that I am giving in crystal report designer must be taken for printing purposes in pdf.
    I hope, I was able to put forward the question correctly without any confusion.
    Can someone please help me out to find a solution ?
    Thanks in advance.

    Hi Akshay
    Always quote the actual version of Crystal Reports you are working with. E.g.; CR IX is not quite enough and the best place to find the actual version is in the Help | About screen of the CR designer.
    By CR XI, you could mean CR 11.0.x, or CR 11.5.x. If you are using CR 11.0.x, update to CR 11.5 (also referred to as CR XI R2). See this blog on how to.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Excel output display issue after exporting the report

    Hi All.
    We are using BI Publisher with Oracle retail for report generation.While exporting report in excel format , after saving the file we are not able to see the data.
    When we do a Format-->Autoformat and select one of the options, we can see the data .
    What could be the possible reason for this?Can i do anything to avoid this.
    Is there a possibility of checking excel log to see how the Excel treating the incoming data.If yes, how can we check the excel log(failed to find anything on this).
    Thanks!!

    Hmm.. Not really sure. Have you checked your Financial Reporting preferences on Workspace? Couple of things to look for:
    - Export to Office Application options
    - User Point of View options
    I would just check the preferences and test various options.
    Cheers,
    Mehmet

  • CrystalReport - Getting "The Report Application Server failed" while export

    Hi Experts,
    I am using Crystal Reports 2008 in my ASP.NET application to generate reports. Everythings works fine in the development environment. When I deploy it on my Windows Server 2003 system, I get an error "The Report Application Server failed" while exporting the report from the report control. But, the report assuch is working fine even in the production environement. I experience this issue only while exporting to excel or anyother format.
    Do I need to configure anything or any settings needs to be turned on in the .rpt files!!
    Appreciate any help to get this issue resolved.
    TIA,
    Prem

    First a confirmation. When you say; "...exporting the report from the report control...", you mean the printer button on the viewer?
    Questions;
    What version of .NET?
    What Crystal Reports Service Pack are you on?
    How was the CR runtime installed on the server?\
    Can you print the report OK?
    Are you using sessions?
    Ludek

  • Exporting Crystal Reports with embedded Xcelsius content to PDF

    Hi,
    I have a crystal report with an embedded xcelsius chart. I would like to schedule this report using Crystal Server 2008, sending it monthly as a PDF file attached to an email. But after exporting the report through Crystal Server, the xceslsius content is just blank. Shouldn't this be working?

    What is the version of Adobe Reader? Adobe Reader 9 should be there.Also check whether you have Flash Palyer/ flash Active X control installed.
    If you can view the dashboard after exporting it to PPT,it means you have Flash Player installed. You need to try with Adobe Reader 9.

  • CR2008 hangs after upgrade to SP2 when opening a report w/ invalid printer

    Hi,
    until CR2008 SP1, when I open a report that was formatted for an unknown printer, a messagebox is displayed with that message an I was able to edit the report and/or assign a correct printer to it. After installing SP2 this behaviour is changed in a an "application hang". CR2008 stops responding. When I open that same report in CR2008 SP1 and delete the printer info, the report opens without any problems in CR2008 SP2
    THIS I.M.H.O. A SERIOUS BUG!!!!
    Regards,
    Adri

    From the header of this forum:
    +Forum: .NET Development - Crystal Reports
    This forum is dedicated to topics related to custom application development or deployment with Crystal Reports in .Net. This includes full versions of Crystal Reports as well as those versions of Crystal Reports bundled with Microsoft Visual Studio .Net+
    As your query concerns the Crystal Reports Designer, I am moving the thread to the Crystal Reports Design forum.
    Ludek

  • Report Viewer doesn't Preview after Export

    The Windows Application has a C# class for a Report Menu which calls any one of several reports.  The Report Menu allows the selection of various parameters for the report being called and then calls a C# class that builds a sql query and sets it as the report data source and sets the report parameters then opens the report in Crystal report viewer.
    The report displays in the viewer and I can click on the close button and the Report Menu in the App allows me to select a different report with different parameters, no problem. 
    However, when any report is previewed in the viewer, before clicking the close button, I can click on the Export button and successfully export the report in whatever format and get "Export Completed".  Then click on the close button and I am back at the Report Menu in the App.  Try to preview any report now and it will crash.  The error messages vary somewhat depending on the report selected.  I can set a break point at the beginning of the class (that builds the query and sets the data source) and hit that break before doing an Export - -
    but after the export the break point is never hit.  Its like the Report Menu class is somehow trying to display the report without calling the report building class!
    VS 2005 and CR XI R2

    OK. A good place to start is with the basics.
    See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Step 2 Asking Your Question; Provide Enough Information
    So, please provide the necessary info as per the above.
    Also:
    " The error messages vary somewhat depending on the report selected. I can set a break point at the beginning of the class (that builds the query and sets the data source) and hit that break before doing an Export - -"
    Please provide the most common error you get, else provide all of the errors.
    Ludek

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Problem to export a report (to PDF) after converting my reports to CR13

    I have an old project with reports developped using Crystal Reports for Visual Studio 2003 (.NET 1.1). I want to convert them so I can now use Crystal Reports for Visual Studio 2010 (with .NET 3.5).
    I installed Crystal Reports for VS2010 and I converted my reports to the new format. Unfortunately, one of my reports is not working anymore.
    My ASP.NET application generate the report and export it as a PDF. I use CrystalDecisions.CrystalReports.Engine.ReportDocument.Export().
    Everytime I run this method, an exception is thrown...
    System.Exception was unhandled by user code
      Message=System.Runtime.InteropServices.COMException (0x80041004):
    Mémoire insuffisante pour l'opération.
       à CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       à CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
       à CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
       à CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
       à
      Source=GSPRapport
      StackTrace:
    I also tried to export the report (using PDF format) at design time with the "Export Report" button in Preview mode. It didn't work. But, I can export the report at design time using another format type (like XML).
    The old version of te report (using .NET 1.1, CR9) work fine. As I said, other reports in that same project work perfectly.
    Is someone have an idea of what's wrong!
    Thanks!
    Max.

    The most common cause of this problem is having very large detailed images, or lots and lots of images in your report. The Crystal Report engine changed a lot from 9.1 to 13. The big change was from 9.1 to 10 though when we started using the RAS InProc engine.
    The Crystal reporting engine is not efficient at handling the images and it can cause memory issues like you are seeing. As a test, try suppressing the images that show up frequently in your report and retry your export. If it works you'll have your answer and you'll need a new creative way to design your report without so many images.

  • Hyperion IR 9.3.1 - Issue in printing the report after exporting it to pdf

    Hi All,
    I am facing a problem in printing the report after exporting it to pdf format using Hyperion Interactive Reporting 9.3.1. I have set page size of report section to 11X17 inch landscape. Now I am exporting this report section to pdf. Report gets exported to pdf with size 11X17 inch landsacpe. But when I am trying to print this pdf it is shrinking the documnet size to A4 size paper and printing it rather it should print it on 11X17 inch paper size. Please suggest if there is fix available for this issue.
    Thanks
    Ujjawal

    "File > Print Setup > Paper > Size" on PDF.
    I think this issue is only to do with the printer and not IR.
    I think the question now is "Can your printer print 11X17 pages or not".

  • How to export the report in HTML format for desktop application

    Hi,
    i have wrote the JRC desktop application to export the report and i am able to export it in PDF and other formats as mentioned in "ReportExportFormat" API.
    i would like to know is there any API there which can export the report in HTML format.
    i know it would be possible with web based application of JRC, but how can i do it in desktop application?

    There's no mechanism for static HTML pages that displays the report.
    You can use the CrystalReportViewer DHTML viewer, but that's 'interactive'.
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • My new iPhone 5 don't going aktive!

    I since about 24 h a new nano base card but whenever I enter the PIN comes There: unlock... / but it unlocked just not please help!

  • Update controlling area

    Hello experts, I need your help. My client is using controlling area 40(USS) and he wants to change to 10(R$-brazillian currency) that is the same as the company code. However, all the planning of 2009 were created using 40 currency. If I change the

  • ServletContext Vs Properties file

    Dear Friends, My question is related to optimization. In our Servlet application, We have to read some values from properties files. In this which one is better from the following or is there any better way of doing? 1. Reading from the Properties fi

  • Array in Forms

    Hi all What is the problem in this code declare type temp is record (invoice_num inv_detail.invoice_num%type); type temp5 is table of temp index by binary_integer; temp6 temp5; idx integer := 0; begin      go_block('inv_search');      first_record;  

  • Who goes over bugs in the "bug reporter"?

    I opened a bug in the "bug reporter" - for my point of view is really important (UX bug) and up to now there is no response what so ever. I assume that there are lots of bugs, but still, go over and see what's what. to make things short, my bug (whic