Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Murali Narayanan
  Where is Murali Narayanan?
 Mumbai
 India
 Murali Narayanan
 To: Tore Bleken
  Where is Tore Bleken?
 Stokke
 Norway
 Tore Bleken
 Tags
Subject: RE: multiple if commands in report
Thread ID: 416071 Message ID: 416081 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Sunday, December 21, 2014 5:20:44 AM         
   


Thank you
Icase works fine though I have no idea what an UDF is
Problem solved
regards
Murali Narayan

> > Dear All,
> > I need to evaluate 3 expressions in a report & possibly display one value (m_box_numb).
> > Scenario:-
> > 1. I have a report with page size 300 x 480 mm / 3 columns / 8 records vertically / 3 records horizontally / total of 24 records per page / max 1000 records per file
> > 2. I need to print the corresponding BOX No. at the page footer for the corresponding page
> >
> > How to evaluate multiple if conditions in a report??
> >
> > if between(recno(),1,300) then m_box_numb = "BOX 1"
> > if between(recno(),301,600) then m_box_numb = "BOX 2"
> > if between(recno(),601,1000) then m_box_numb = "BOX 3"
> >
> > How do I get the m_box_numb assigned to the proper value during runtime in the report
> >
> > instead of recno() the expression could be created using _pageno also
> >
> > Thanks & regards
> > Murali Narayan
>
> Either you use Icase() instead of if, or you make a UDF.
>
> m_box_numb=icase(between(recno(),1,300),'BOX 1',between(recno(),301,600),'BOX 2',between(recno(),601,1000),'BOX 3','ERROR')

>
>
> There's a fine line between helping and adding to the confusion.
>
> How to create sample data

ENTIRE THREAD

multiple if commands in report Posted by Murali Narayan @ 12/20/2014 5:01:53 PM
RE: multiple if commands in report Posted by Tore Bleken @ 12/20/2014 5:17:10 PM
RE: multiple if commands in report Posted by Murali Narayan @ 12/21/2014 5:20:44 AM
RE: multiple if commands in report Posted by Ali Koumaiha @ 12/23/2014 7:25:07 PM
RE: multiple if commands in report Posted by Jun Tangunan @ 12/21/2014 4:01:03 AM
RE: multiple if commands in report Posted by Murali Narayan @ 12/21/2014 5:23:19 AM
RE: multiple if commands in report Posted by Jun Tangunan @ 12/21/2014 7:49:29 AM