Help with Custom Field

This public forum is for user-to-user discussions of ASP Report Maker. Note that this is not support forum.

Help with Custom Field

Postby ready4data » Fri Jun 17, 2016 10:21 pm

I'm trying to create a custom field in a report (V9.0.1). No matter what I put in the custom field properties pop-up, the field doesn't get added.
The report is called rptPrepToCertification source table is tblPrepCourseReport. I tried adding the following in the properties of the Custom Field
Field Name: OverallPct
Caption: OverallPct
Expression: SELECT [StudentsCertified]/[Students] AS OverallPct FROM tblPrepCourseReport;
I also tried:
'StudentsCertified' / 'Students'
SELECT [StudentsCertified]/[Students] FROM tblPrepCourseReport
'SELECT [StudentsCertified]/[Students] FROM tblPrepCourseReport'
and some others.
Then I thought maybe it has to be added to the source table first.
In the properties of the Custom Field I added the Field Name and the Caption and clicked OK. The field was added to the table with '' in the expression.
I edited the Custom Field expression with variations of the ones above but the expression never populated.

What am I doing wrong? There is no Custom Field example in the demo project to compare to.
Instructions were not clear on exactly what goes in the expression field, SQL or just the field names and calculations
Thanks,
Scott
ready4data
 
Posts: 276
Joined: Mon Nov 19, 2012 8:24 pm

Re: Help with Custom Field

Postby motfs » Sat Jun 18, 2016 11:02 am

ready4data wrote:
> Then I thought maybe it has to be added to the source table first.

Yes, you need to add to the source table first and simply try this expression:

StudentsCertified / Students
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm


Return to General Discussion (ASP Report Maker)