I have query with following column names: cust_no, Firm_no, Name, homeaddress, homecity, homestate, homezip, officeaddress, officecity, officestate, officezip I want to be able to pull it this way that whenever there is a certain unique Firm_no it should populate the homeaddress, homecity, homestate, homezip for this customer. What do I have to do to accomplish this?
U can achieve this by the following way: Use the following expresson to display Homeaddress: =IIF(IsNothing(Previous(Fields!Firm_no.Value)), Fields!homeaddress.Value, IIF(Fields!Firm_no.Value = Previous(Fields!Firm_no.Value), "", Fields!homeaddress.Value)) In the same way implement the same logic to display homecity, homestate, homezip. Regards,
saras, I have a unique firm_no that I want to use when my report runs it should look like: Custo_no Firm_no Name Address City State Zip 123 1111 Jon Doe Main Dallas TX 75000 321 1122 Jon Doe Globe Pano TX 75001 So when anytime the Firm_no is '1122' I want the address to print their homeaddress. Thanks for your help. [quoted text, click to view] "saras" wrote: > U can achieve this by the following way: > > Use the following expresson to display Homeaddress: > > =IIF(IsNothing(Previous(Fields!Firm_no.Value)), > Fields!homeaddress.Value, > IIF(Fields!Firm_no.Value = Previous(Fields!Firm_no.Value), > "", > Fields!homeaddress.Value)) > > > In the same way implement the same logic to display homecity, homestate, > homezip. > > Regards, > SaraS
Thanks Saras, It worked I just dint have it in the correct place. Stupid typo mistake. Thanks a bunch have a great day! [quoted text, click to view] "saras" wrote: > U can achieve this by the following way: > > Use the following expresson to display Homeaddress: > > =IIF(IsNothing(Previous(Fields!Firm_no.Value)), > Fields!homeaddress.Value, > IIF(Fields!Firm_no.Value = Previous(Fields!Firm_no.Value), > "", > Fields!homeaddress.Value)) > > > In the same way implement the same logic to display homecity, homestate, > homezip. > > Regards, > SaraS
Saras, Sorry to bother again...but now its printing all the homeaddress I still have this questions: I have query with following column names: cust_no, Firm_no, Name, homeaddress, homecity, homestate, homezip, officeaddress, officecity, officestate, officezip I want to be able to pull it this way that whenever there is a certain unique Firm_no it should populate the homeaddress, homecity, homestate, homezip for this customer. What do I have to do to accomplish this? Thanks [quoted text, click to view] "Shan" wrote: > I have query with following column names: > cust_no, Firm_no, Name, homeaddress, homecity, homestate, homezip, > officeaddress, officecity, officestate, officezip > > I want to be able to pull it this way that whenever there is a certain > unique Firm_no it should populate the homeaddress, homecity, homestate, > homezip for this customer. > > What do I have to do to accomplish this? >
Can u provide some more data, how u actually want to display? Regards,
Ok. I have these fields. Cust_no, Firm_name, Firm_no, Name, OfficeAddr, OffCity, OffSt, OffZip, HomeAddr, Homecity, HomeSt, HomeZip In my report I only want to show based on my query the following format Custo_no Firm_name Firm_no Name Address City State Zip 123 Keller 1111 Jon Doe Main Dallas TX 75000 321 Ebby 1122 Jon Doe Globe Pano TX 75009 102 Cold 1234 Jon Doe Holly Plano TX 75002 103 Nonmember 1000 Jon Doe Trench Allen TX 75001 109 Nonmember 1000 Jon Doe Trail Prosper TX 75003 Now I want to populate the Address field with customer's homeAddr anytime the firm_no is 1000 which is a Non member otherwise if the firm_no is anything else then populate the Address with their OfficeAddr. The Firm_no 1000 doesn't have an OfficeAddr so we want to populate it with customer's homeaddr. Thanks for your help. [quoted text, click to view] "Shan" wrote: > saras, > > I have a unique firm_no that I want to use when my report runs it should > look like: > > Custo_no Firm_no Name Address City State Zip > 123 1111 Jon Doe Main Dallas TX 75000 > 321 1122 Jon Doe Globe Pano TX 75001 > > So when anytime the Firm_no is '1122' I want the address to print their > homeaddress. > > Thanks for your help. > "saras" wrote: > > > U can achieve this by the following way: > > > > Use the following expresson to display Homeaddress: > > > > =IIF(IsNothing(Previous(Fields!Firm_no.Value)), > > Fields!homeaddress.Value, > > IIF(Fields!Firm_no.Value = Previous(Fields!Firm_no.Value), > > "", > > Fields!homeaddress.Value)) > > > > > > In the same way implement the same logic to display homecity, homestate, > > homezip. > > > > Regards, > > SaraS
Don't see what you're looking for? Try a search.
|