Skip to Content
author's profile photo Former Member
Former Member

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Nov 10, 2008 at 03:04 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.