Solved

Frustrating Crystal Reports / VS2013 problem

Posted on 2015-02-07
16
159 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
  • 10
  • 6
16 Comments
 
LVL 100

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 100

Expert Comment

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

mlmcc
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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 100

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 100

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 100

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 100

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Web Form VB.Net  import CSV 4 39
Error handling in asp.net site 5 28
VB.Net/LINQ: ".Contains" condition not finding existing result in MSSQL 16 36
Sql server insert 13 31
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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