Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED HELP on Sub-report charting!!!!

Status
Not open for further replies.

jcrock

Programmer
Nov 7, 2003
4
US
I've been trying to use the charting on print time formulas pdf file from Crystal Decisions for Crystal Report 9.

I am running into one problem.
The chart is blank.
Formulas are as follows:

@SubShowValue //in the sub report
ToNumber(Split({?Pm-@ShowValue}, "^")[RecordNumber])

@ShowValue
stringvar strShowValue;
strShowValue := strShowValue + totext({@displaystest}) + "^";

@OnChangeOf
whileprintingrecords;
stringvar strOnChangeOf;
strOnChangeOf := strOnChangeOf + {SensorData.SensorName} + "^"

the parameters that are being passed to the subreport are:

@ShowValue
14.00^32,793.00^14,476.00^21,871.00^4,658.00^4,955.00^4,523.00^21,923.00^1,095.00^1,095.00

@OnChangeOf
Bloomberg^Choke^Outside^Prod_Cert^Prod_CA_Web^Prod_Net^Prod_Tran^Prod_Web^scanner_1^scanner_1

On the main report:

GROUP HEADER:
@clearstest
whileprintingrecords;
shared NumberVar st;
st := 0

DETAILS:
@newstest
whileprintingrecords;
shared NumberVar st;
if {SensorData.AlertCount} <= 0 then
st := st + 1
else
st := st + {SensorData.AlertCount};
st

GROUP FOOTER A:
{sensorname.sensordata}

@displaystest
whileprintingrecords;
shared NumberVar st;
shared NumberVar gt;
gt := gt + st;
st

GROUP FOOTER B:
@OnChangeOf
@ShowValue

REPORT FOOTER A:
@displaygtest
whileprintingrecords;
shared numbervar gt;
gt

REPORT FOOTER B:
ChartSub // subreport with chart

On the sub report:

REPORT FOOTER:

CHART // Sensordata.SensorName - A for the On Change Of
// @SubShowValue for the Show Value

The record selection for the sub report is as follows:

{SensorData.SensorName} in split({?Pm-@OnChangeOf},&quot;^&quot;)
 
I am having the same problem. It seems when I change the @subShowValue I will see the chart but no values will be plotted. This is what I changed it to..

If IsNumeric({?Pm-@ShowValue-Two}) then
ToNumber(Split({?Pm-@ShowValue-Two},"^")[RecordNumber])
Else 0

At least it's a step closer....hopefully
 
Ok, I was wrong. I wasn't getting results on the chart because the parameter will never be numberic because it is still in format 21^23^etc....

However, I did get the chart to work by doing the following in the subreport.
1. Change the subShowValue to
ToNumber(Split({?Pm-@ShowValue-Two},"^")[GroupNumber])
2. Remove the record select and add to the group select
{PROD_FINAL_AUDIT.MADE_BY_ENTITY_ID} in split({?Pm-@OnChangeOf},"^")
3. Created a group formula for the chart since it seemed to be charting a null value
(split({?Pm-@OnChangeOf},"^")[groupnumber])
4. In the chart expert remove what is in there and add the group I just created to the “On Change of”
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top