Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

Frustrating Crystal Reports / VS2013 problem

I have a strange problem. I inherited a project that was written in VB 6, and needs to be converted to .NET.  I am now down to the reports.  I have a report that contains several subreports (7).  Every bit of the data I'm feeding each subreport is being displayed appropriately with the exception of one subreport.

I am providing data by means of the .SetDataSource(<datatable) method.  I have verified that the XSD has the correct field mappings, and that the data types are correct.  I have also verified that the table I'm passing has data in it.  The data just doesn't display on the report.  I have tried updating to release 13 of CR for Visual Studio version 13, but I still get the same results.

I realize I'm not providing a lot of informaiton, but I'm not sure what to give you beyond the code snippets below (remember, naming conventions have been inherited from vb6 days):
            crpReport.SetDataSource(rsRunReport.Tables(0))
            crpSubLogo.SetDataSource(rsLogoPic.Tables(0))
            crpSubRunLot.SetDataSource(rsRunLot.Tables(0))
            crpSubProcessArea.SetDataSource(rsProcessInfo.Tables(0))
            crpSubAddress.SetDataSource(rsAddress.Tables(0))
            crpSubProdData.SetDataSource(rsProcessInfo.Tables(0))
            crpSubEventLog.SetDataSource(rsEventLog.Tables(0))

Open in new window

I have verified that rsProcessInfo.Tables(0) has valid data.  I have also checked the specific fields called by that subreport and they are populated correctly.  The rsProcessInfo.Tables(0) datatable is intended to supply data to multiple subreports.  Again, this is inherited code.
The results of this report run returns the information on the screenshot I uploaded.
report.png
0
Shane Kahkola
Asked:
Shane Kahkola
  • 10
  • 6
2 Solutions
 
mlmccCommented:
WHat are the formulas you are using on the report for the values?

mlmcc
0
 
Shane KahkolaDirector of I.T.Author Commented:
I'm not using a formula for the missing data.  Those fields were created by dragging the datasource field name to the report.  The formulas you are seeing are labels.  Those are being populated appropriately.
0
 
mlmccCommented:
Can you upload the report file?

mlmcc
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Shane KahkolaDirector of I.T.Author Commented:
Due to confidentiality documents, no, I can't.  I realize that limits what others can do to help. Basically I'm looking for someone to see the problem and thin, "I've seen that before."

I realize it's probably an odd problem.  So, I would take any suggestions, and I do appreciate the frustration that can ensue when trying to help someone who can't give you all of the information.

I would probably be able to do it if I exchanged the file with you privately.
0
 
mlmccCommented:
Can you upload with no data?

How is the subreport linked to the main report?

If you run that subreport as its own report does it show data?

mlmcc
0
 
Shane KahkolaDirector of I.T.Author Commented:
Private messaged
0
 
mlmccCommented:
WHen you generate the data file, are you sure there is data for that subreport?

There is no filter on the subreport.  It is not linked to the main report.
Knowing those 2 items indicates there is no data for the subreport.

Try a verify database to ensure all subreports are correctly tied to the sources.

You could also try a set datasource location on that subreport

mlmcc
0
 
Shane KahkolaDirector of I.T.Author Commented:
I looped through the rsProcessInfo table in the code and sent the output to a text file.  I have attached it here.
Data.txt
0
 
mlmccCommented:
The report thinks the values are strings.  When I converted your text file to a spreadsheet everything was taken to be numbers

I also don't see those column names in the XSD file.

mlmcc
0
 
Shane KahkolaDirector of I.T.Author Commented:
I'll fix the column names, and doesn't excel automatically consider a numeric value as a number when it imports?
0
 
mlmccCommented:
Probably.  Are they strings in the XSD?

mlmcc
0
 
Shane KahkolaDirector of I.T.Author Commented:
Yes, they are strings in the XSD.  What's interesting is that I generated the XSD from the rsProcessInfo.WriteXmlSchema() method.  Then I added the XSD to the project, and re-mapped the Data Source Location in the field explorer to the new XSD.  I did have to change a couple of field mappings, but the rest matched-up with what the report expected to see.
0
 
Shane KahkolaDirector of I.T.Author Commented:
The issue still is not resolved, but I was able to create a new report, use the same XSD, and get data on the new report.  I'm really confused as to why that is working.  I have decided to rebuild the report from scratch.  I'm going to add one dataset at a time, and one subreport at a time.  When it breaks, hopefully that will resolve the issue.
0
 
Shane KahkolaDirector of I.T.Author Commented:
Now the stupid thing keeps asking for a login.  I can't win.
0
 
Shane KahkolaDirector of I.T.Author Commented:
The original issue was me modifying one report while the program was calling for a different report.  They are "basically" the same report.  My only defense is that I inherited the application -- I didn't write it.

The second issue comes down to an empty dataset being passed to the report.  Once I corrected the empty dataset issue, all was well.
0
 
Shane KahkolaDirector of I.T.Author Commented:
I appreciate the help MLMCC, I gave you some points because of the effert you put into helping me.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 10
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now