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!

How to link the subreport with Main report- Multi selection parameters

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
HI,
CR 8.5 / SQL server.
Consider a main report which contains 10 parameters.
The expecting output of the report is

Empid Gender State Position
222 M NY xxxxs
333 M TX eeeee
555 F IO ggggg
....

For this report we are using 10 parameters to filter the data.
Each and every parameter from diff. tables. i.e. we are connecting more tables with the main table because of the long parameter list. And parameter values are multiple selections.

I want to go for a sub report because of the confusing links.
For example I want to split the parameter called "Position". Here the position means that employee's current & previous positions.
Ex.
empid position year
222 Project Lead 2003 to Till
222 Programmer 2000 to 2003
...
333 Analyst 2004 to Till
333 Developer 2001 to 2003
...
Task is filter using the current position of each employee.
I want to write a sub report for getting the position value for each employee and connect with the main report and getting the result (ie current position for each emp. in a single line.)
Empid Gender State Position (from sub report current position)
222 M NY xxxxs
333 M TX eeeee
555 F IO ggggg
....

I'm not sure how much clearly explaining my problem. Please let me know if you need any clarification.
Thanks
MK

 
You can achieve this very simply by linking your subreport to EmpID group field and also to each one of your main report parameters (the destinations without the ?Pm prefix).
 
Thanks for your replay. If you get a chance could you please explin in deatail with example.
Thanks,
MK
 
Okay...

For the sake of argument, let's say your report looks like this:

RepHdr
PgeHdr
Gr1Hdr -- The grouping field is EmpID
Dtl -- Suppressed
Gr1Ftr -- Subreport placed here
PgeFtr
RepFtr

Report Paramters:
{?EmpID}
{?Date}

In this layout, you will need to link your subreport to the paramters {?EmpID} and {?Date}. When you try establishing a link on, say, {?EmpID}, you'll be faced with the possibility of linking to {?Pm-?EmpID}. Scroll down, using the very small scrollbar until you see the literal field {?EmpID}, and link to that.

In the example above, the subreport is placed at group level - which is where I imagine you will be placing yours. So, you'll need to link on the grouping field as well.

Naith
 
Thanks, if its possible to link the sub report without "empid". I forgot to mension about it. if we use the empid then we only get one line output .
for example empid - 222
the output is
222 ....
but in the report we need to list out the employees who reach the condtions with other parameter.

I hope you its little bit clear.
If you need more info. please let me know.
Thanks
MK
 
Need more info?!?! please let me know.
 
Well, I tried the "ALL" in the Empid parameter. it works good. but some times it displaying the values. ie first time I ran the report it gives nothing. and I went to the subreport and move the display values from detail to groupfooter (and next time gfooter to detail ) click the preview, now it shows the value.?!?!?! lot of confustion.
Please let me know if any one have the solution.
Feel free to ask questions!!
Thanks
MK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top