Skip to Content
0
Former Member
Mar 23, 2009 at 04:38 PM

subreport calculated columns show no data

24 Views

I have a simple report that uses a subreport to display some data.

The subreport was created with the wizard.

here is the sql used to pull in the records:

String sql = "SELECT MemberName, Count(MemberName) AS Total, Sum(RunBucks) AS Run_Bucks "
                + "FROM runs_members, Members "
                + "WHERE Member=Members.id and cr in "
                + "(SELECT cr from runs where Date_Time>=#1/1/2008 00:00:00# and Date_Time <= #12/31/2009 23:59:59#) "
                + "GROUP BY MemberName "
                + "ORDER BY MemberName;";

I created a dummy datasource in my project to use in the wizard to create the fields. I really have 2 questions:

1. How do I add fields to a report that aren't part of a datasource, but really are part of a dynamic query.

2. The report shows records for MemberName, but the columns for Total and Run_Bucks are empty, even thought when I dump the dataset to the console I see:

MemberName	Total	Run_Bucks	
Jones, Bob	3	4
Smith, Jack	1	1
Doe, Joe  	1	1
Doe, Jane  	1	1

Peter