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!

Formulas/FIltering issue

Status
Not open for further replies.

Down55

Technical User
Dec 9, 2003
5
US
Let me first say I am new to Crystal! I am teaching myself, and have been doing a lot of trial and error on this issue most of the day, I will try to explain it as best I can, please tell me if you need more data. (I am using CRv9)

I need two different formula's in one reort. Everytime I get one to work, the other will not. I know that is due to the filtering I'm using, so I created a subreport for the 2nd part. I have both sections correct, but now need data from each of them for the last part. Is it possible for me to create a formula using one part of the regular report, and one part of the subreport?

Thanks,
Tara
 
Yes, it is possible using shared variables, but this is probably more complicated than necessary. I think subreports should be avoided when possible since they slow reports among other things. If you tell us more about the report design (groups, etc.) and share the contents of the formulas, there might be a much simpler approach that can be suggested.

-LB
 
I'll tell you what I can recall off the top of my head, if you need more info I will reply from work tomorrow with it. It really should be simple, I'm just trying to get a ratio.

I'm trying to get the ratio for # of new leads (per week)/# of lead interactions (for the new leads)

These are grouped by {Systemuser.fullname}

To get the leads, I'm using {lead.fullname} and using the selection expert to filter {lead.createdon} by last7days. This works the way I need it to.

For the next part, I got it to work correctly in the subreport by using {lead.fullname} along with {activity.objecttypecode} filtered to only equal "4" (along with the same date filter listed above.) This too works correctly in the subreport.

THe problem I kept running into when trying to do them together is this: In the test data I have it should show that I have 3 new leads, and 1 new interaction. I get the leads set up correctly, but when I try to add in the part for the interactions, it is only pulling the 1 with the interaction instead of all 3.

Hopefully all of this made a little sense!! It's really a pretty simple thing I'm trying to do, it's just not turning out right... which I'm sure means it's user error ;) Perhaps I can get away with it on the grounds of being so new to all this? :)

Thanks for your help, and I'll try to give you more (or better) info if you need it!
Tara
 
Change your link between tables to a left join FROM the lead table to the activity table--probably on a field like {lead.personID}. You can now place the lead person's name and the activity field on the report and return all three leads.

-LB
 
nifty :) Thanks, I'll give it a shot in the morning!! I appreciate your help!
Tara
 
Once again... Thank you so much for your help!! I just finished that report, your suggestion worked perfectly! I figured it would be something simple!
Thanks,
Tara
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top