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

Sub Report Not Showing Data

We are migrating around 80 plus reports created with version 9 to the new Crystal Reports. Old code was in C++ and now we have implemented a .Net Library to handle all these reports and all of them are working fine except 1 report. This report like others has few sub reports and only for this report one of the sub report is not showing the details. From the main report, we pass parameter and this is used to call the required stored proc to get the details. Backend is SQL Server. We are using ODBC connectivity. If I run the report from designer with all the parameters and login info, sub report shows the data properly. If I run it through our program one of the sub report doesn't show the data. Our application is written using VS2015. Any advice on how to fix this issue would be greatly appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Aug 24, 2016 at 06:05 PM

    Which service pack of Crystal for VS are you using in your application?

    Which version of SQL Server are you connecting to and which version of the SQL Server client is being used by the ODBC connections?

    In your code, are you setting the logon for each of the subreports? Which object model are you using - CrystalReportViewer, ReportDocument, or ReportClientDocument?

    -Dell

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Ludek Uher

      Sorry for not being clear. Sub Report 16 Calls a stored procedure that has delete statement. Since the order of execution of sub reports was not retained, this caused the premature deletion of records. All these sub reports are not saved as a separate report. They all are embedded into a single report.

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2016 at 06:05 PM

    Below is the code that we have in our library to execute thes rpt file


    CR.txt.zip (1.2 kB)
    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.