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

values of subreport shown as 0 in main report

Status
Not open for further replies.

sugu

Programmer
Jan 12, 2004
90
SG
Hi,
I have 1 main report which is grouped by time between 12:00 AM till 11:45PM (1 day).

I have another table which i placed in a subreport which requires get the averages based on agents in a call center.(im NOT using sql DB)

I have declared the calculated averages as a shared numbervar in the sub report and called them in the main report with that shared variable. since its a sum, i have placed the sub report in the groupfooter and supressed the section.

The following is the formula in the sub report for each field.

Average ACD
-----------
whileprintingrecords;
shared NumberVar SumACD:= Sum({iAgentByApplication.Talktime})/Sum({iAgentByApplication.CallsAnswered});

Average ACW
------------
whileprintingrecords;
shared NumberVar SumACW:= Sum({iAgentByApplication.PostProssingCalls})/Sum({iAgentByApplication.CallsAnswered});

Total TalkTime in hours
------------------------
whileprintingrecords;
shared NumberVar sumTalkTime:= Sum({iAgentByApplication.TalkTime})/(60*60)

formulas for each field in the main report to call(placed in the groupfooter section below the subreport )

sumACD
-------
whileprintingrecords;
shared NumberVar sumACD;

sumACW
----------
whileprintingrecords;
shared NumberVar sumACW;

sumAHT
-------
NumberVar sumAHT :={@sumACD} + {@sumACW};

sumTalkTime
------------
shared NumberVar sumTalkTime;

i'm getting 0.00 values for all the above mentioned fields in the mainreport.

i also need to find the averages of grand total for the fields. How do i go abt doin it?

thanks!
 
Hi again,

Btw,

I'm using the crystal report v9 bundled with visual studio .Net 2003
 
Where are you placing the variable formula in the main report? It needs to be in the section directly below the section the subreport is in. Try creating a second group footer section and placing the variable there.

Stacey
 


my sub report is in groupfooter #1a and the variable formula is in groupfooter #1b
 
hi again,

I need to submit this template today. Can someone pls help me!!! really need help.

thanks!
 
You cannot suppress the section that the subreport is located in, but you can suppress all sections within the subreport so that it does not display.

-LB
 

in the group section #1a where the subreport is, i have placed the fields used in the the table in main report and suppressedc it. And have created group section #1b and placed(copied) the same from the main report and also called the shared variables of the subreport. when i view the report, the data in subreprt is 0.0.

so now, should i clear the main report fields in group section #1b and just have the shared variables there and unsuppress groupsection #1a?

thanks!
 
I don't know your report design or why you are placing main report fields in the group section. Your first step is to unsuppress GF#1a so that the subreport will execute. Your shared variables should be in {GF#1b} and your related formulas using a combination of shared variable and main report fields could also be in that section.

-LB
 


ok, if i un suppress the GF#1a , there is no data in the subreport shown.And when i clck on the subreport, the page is blank. But when i open the report in crystal report 10 with the subreport unsuppressed, the data is shown. and the grand total in the report footer is also displayed correctly.

Is it a limitation of crystal report 9 that the subreport data is not displayed?

I need the template to be created in v9 as the symposium server only supports upto v9.
 
That should have nothing to do with the version. Try refreshing the report in 9.0. Not sure why that would happen.

-LB
 

i'm using v9 which is bundled with visual studio .net 2003. I had to create a crystalreport viewer in the windows form and attached the template to the form. And should run the form inorder to view the report.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top