Solved

Frustrating Crystal Reports / VS2013 problem

Posted on 2015-02-07
16
164 Views
Last Modified: 2015-03-14
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
Comment
Question by:Shane Kahkola
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 6
16 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 40596129
WHat are the formulas you are using on the report for the values?

mlmcc
0
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40596134
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 40596137
Can you upload the report file?

mlmcc
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40596142
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 40596158
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
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40596167
Private messaged
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 150 total points
ID: 40596184
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
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40596189
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 40596263
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
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40596297
I'll fix the column names, and doesn't excel automatically consider a numeric value as a number when it imports?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 40596351
Probably.  Are they strings in the XSD?

mlmcc
0
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40597217
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
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40606388
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
 
LVL 3

Author Comment

by:Shane Kahkola
ID: 40613336
Now the stupid thing keeps asking for a login.  I can't win.
0
 
LVL 3

Accepted Solution

by:
Shane Kahkola earned 0 total points
ID: 40654923
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
 
LVL 3

Author Closing Comment

by:Shane Kahkola
ID: 40664875
I appreciate the help MLMCC, I gave you some points because of the effert you put into helping me.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question