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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to add a subreport into a text object? 1

Status
Not open for further replies.

tkschief

MIS
Apr 20, 2006
28
US
Hi,

I have a subreport that I need to insert into an existing text object in my main report which contains several other fields. However, I cannot drag or cut the subreport link/field into my text object. Is this possible? Or is there some trick to this? If you need further information or details, please let me know. I'm using Crystal Reports 11.

Another question: I'm using a formula to format a case_IncidentID number as follows:

picture(totext({T_CASE_INCIDENT.INCIDENT_ID},0,""),"ICR #xx-xxxxx")

The issue I now have is if there is more than 1 icr # for a case number, the record is repeating itself - once with the first ICR # and again with the second ICR #. How do I get all case ICR #'s in the report as follows:

ICR #xx-xxxxx, ICR #xx-xxxxx

My report is grouped by T_CASE1.CASE_NUM

Thanks,

T
 
You could instead set up the value you want in the text box as a shared variable in the subreport, and then reference the shared variable in a formula in the main report that you then drop into the text box. The subreport would need to be in an earlier section, e.g., RH_a, with the text box in RH_b.

Second issue: You could collect the various values in a variable using these formulas:

//{@reset} for the case number group header and suppressed:
whileprintingrecords;
stringvar x;
if not inrepeatedgroupheader then
x := "";

//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
stringvar x := x + picture(totext({T_CASE_INCIDENT.INCIDENT_ID},0,""),"ICR #xx-xxxxx")+", ";

//{@display}:
whileprintingrecords;
stringvar x;
if len(x)>2 then
left(x,len(x)-2)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top