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!

xi report/subreports in java 1

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
I have an xi mainreport and subreport that uses two prompts. We are trying to run it from Java by clicking a button. If I have the subreport linked, it says that we are missing parameters. I did notice that when you run the report via xi, it shows both the main report and subreport names.
i.e. StartDate/StartDate(stsTrackReportSub.rpt). Are there any particular tricks to make this act as if there is only one set of prompts with the values passed to the subreport?
 
In CR XI, you should be linking the parameters to each other in the subreport linking screen, by using the dropdown in the lower left to select the actual subreport parameter {?parm}, not the default {?pm-?parm}.

I'm not sure how this translates in Java, but it will mean there is only one prompt in CR.

-LB
 
I changed the link as you stated and that seems to work but brings up a question.

When I created the subreport, I basically saved the original report with a new name because the only thing that changed was that the date group was cummulative and not monthly.

The parameters are:
Start Date
End Date
Cummulative Totals (yes/no)
Employee List

I was trying to link all four parameters but now am not sure if that is correct. Should I only be passing the Start Date one? When I tried to do the link as you suggested, it only prompted me for one link.
Thanks
 
It depends upon whether you want the exact same values used in both main and subreport. If you want different values, you probably need to set up the selection formulas differently. It might help if you showed each selection formula and explained what you want the main and sub to do. Also, please explain in what report section the sub is located.

-LB
 
I am trying to switch the Start and end dates to a range. this seems to take care of the problem because but it messed up one of my formulas and I have been reading suggestions for about 2 hours now trying to resolve the problem. Maybe you can steer me clear.

If I want to sum 3 different fields for each person what is the correct formula?

I've read many suggestions and one of yours was similar but it was for counting.

What have is:

Group1 process Date
Group 2 process Date
Group 3 Employees

I want to add the sick leave, annual leave and training days which are in my details section. Then I will take this result and subtract it from an existing value.

The formula that I was using in GH3 (employee name) is:

whileprintingrecords;
Global numbervar cnt :=
Sum ({@SickLeaveD}) + Sum ({@TrainingD}) + Sum ({@AnnualLeaveD})

Note: SickLeaveD, TrainingD and AnnualLeaveD are in details

I've also tried
global numbervar cnt := {@SickLeaveD} + @TrainingD} + {@AnnualLeaveD}



I put the reset formula in GH2

whileprintingrecords;
numbervar cnt;
@ResetPersonal
if not inrepeatedgroupheader then (
cnt := 0;
);


My problem is that I can't get it to reset for each employee.


Thanks for taking so much time with me.
 
What does this have to do with the current thread topic?

-LB
 
my mistake. I should have put it somewhere else. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top