542 Views    -    9 Replies


Username Post: change fields        (Topic#213752)
Your continued generosity and support of FMForums is greatly appreciated.
mleiser 
journeyman
Posts: 201

Loc: Brooklyn, NY
Post Rank (AVG):
            


FMP: 9
OS: Windows XP
Skill: Intermediate



Tweet This! Tweet This Post!
03-09-10 06:13 PM - Post#352137     - Post Rank:             


I have a report that, say, has 10 fields. One field may be the class that a student is in. If we're in term1 the class is whatever it is. In term 2 the student may have been moved to another class. So I have a field in in the table for class for term1 and one for the class in term2 - which may be the same or different. I want to somehow have the ability to tell the report to print either class1 or class2 into the same spot on the report, depending on, say, some parameter. Any easy way to do that?
Mike










BruceR 
Pooh-Bah
Posts: 2031

Loc: Redmond WA
Post Rank (AVG):
            


FMP: 10 Advanced
OS: Mac OS X Leopard

Member: TechNet

Certified:
     

DBUG SIG

Tweet This! Tweet This Post!
03-09-10 08:06 PM - Post#352143     - Post Rank:             
    In response to mleiser

Sounds like a basic design problem - different fields for different classes? Should be a normalized design with a single field for class and other fields for term, student ID, etc.










mleiser 
journeyman
Posts: 201

Loc: Brooklyn, NY
Post Rank (AVG):
            


FMP: 9
OS: Windows XP
Skill: Intermediate



Tweet This! Tweet This Post!
03-10-10 07:22 AM - Post#352180     - Post Rank:             
    In response to BruceR

I guess I didn't explain it right. For example, we have a report for bus service. In the am they may take bus number abc, In the pm they may take the same bus of bus number xyz. I want ONE report that will print all the students info and when it comes to the bus number, if it's a report on the am buses the bus field on the report should contain the am bus, if the pm report that field on the report should have the pm bus number. It's not really a different type of field. I'm trying to determine how I can have a field on a report that is either this field or that field.
Mike










efen 
master
Posts: 334

Loc: England
Post Rank (AVG):
            


FMP: 8.5
OS: Windows XP



Tweet This! Tweet This Post!
03-10-10 07:58 AM - Post#352185     - Post Rank:             
    In response to mleiser

Now I am totally confused - in the first post you describe your problem with classes and then in the next post you talk about buses???










icanhazdatabase 
novice
Posts: 7

Post Rank (AVG):
            


FMP: 10 Advanced
OS: Windows XP
Skill: Advance



Tweet This! Tweet This Post!
03-10-10 08:10 AM - Post#352187     - Post Rank:             
    In response to mleiser

You can do several things:

1. If you have two fields, one for AM bus number and one for PM, add a sub-summary to the report for each field and put each field in it's own sub-summary. Then in your report script sort the records by either of the two fields (after sorting by student name or id or whatever else). Only the summary part that's based on a field that was in the sort will show up. If you sort by this field AFTER the student id/name field, then it will show up for each student.

2. Create a global flag field in the students db to track if you are running a report on AM or PM buses. Then create a calculation field that uses the flag field to decide weather to display AM or PM value. Add this field to the report. In your report script change the global flag depending on what you want to display.

I personally recommend solution 1.

Best,
Aleks T.










BruceR 
Pooh-Bah
Posts: 2031

Loc: Redmond WA
Post Rank (AVG):
            


FMP: 10 Advanced
OS: Mac OS X Leopard

Member: TechNet

Certified:
     

DBUG SIG

Tweet This! Tweet This Post!
03-10-10 08:52 AM - Post#352194     - Post Rank:             
    In response to mleiser

And the reply is still the same: you have a design problem.

It should be one field, with the correct value. There should not be an AM bus field and a PM bus field. There should be one bus field, and it might hold an empty value or AM or PM or whatever values you are using.










mleiser 
journeyman
Posts: 201

Loc: Brooklyn, NY
Post Rank (AVG):
            


FMP: 9
OS: Windows XP
Skill: Intermediate



Tweet This! Tweet This Post!
03-10-10 12:04 PM - Post#352215     - Post Rank:             
    In response to BruceR

I don't quite understand why this is a design floor. By the way, I used two exaples because the issue applies to both. I thought I can explain the bus one better. We have students that come into school on one bus and go home on another. Most come and go on the same one. So if I have a AM report it must show per student what bus they're on. If it's a PM report it must show the bus they are on going home. Those are two separate fields. I don't see the design flaw.
Mike










mleiser 
journeyman
Posts: 201

Loc: Brooklyn, NY
Post Rank (AVG):
            


FMP: 9
OS: Windows XP
Skill: Intermediate



Tweet This! Tweet This Post!
03-10-10 12:08 PM - Post#352216     - Post Rank:             
    In response to icanhazdatabase

Thanks for the response. I actually need both solutions. If it's a straight report where for each student I need to know the bus number I can use the calculation field on the report. If I'm printing a report in bus number order, the sub summary solution will work. I have to think on how to do it, but it should work. Thanks so much.
Mike










BruceR 
Pooh-Bah
Posts: 2031

Loc: Redmond WA
Post Rank (AVG):
            


FMP: 10 Advanced
OS: Mac OS X Leopard

Member: TechNet

Certified:
     

DBUG SIG

Tweet This! Tweet This Post!
03-10-10 02:59 PM - Post#352234     - Post Rank:             
    In response to mleiser

  • mleiser Said:
I don't quite understand why this is a design floor. By the way, I used two exaples because the issue applies to both. I thought I can explain the bus one better. We have students that come into school on one bus and go home on another. Most come and go on the same one. So if I have a AM report it must show per student what bus they're on. If it's a PM report it must show the bus they are on going home. Those are two separate fields. I don't see the design flaw.
Mike


So what is the context for the rest of the report? This is by student? Or by bus? Have you looked at the reporting section of the Web Viewer Example.fp7 file that comes with FileMaker?
It shows how to make a scripted HTML report which allows the user to specify fields. There are various ways to do "data collector" reports instead of hard-wired layouts.










Your continued generosity and support of FMForums is greatly appreciated.
mleiser 
journeyman
Posts: 201

Loc: Brooklyn, NY
Post Rank (AVG):
            


FMP: 9
OS: Windows XP
Skill: Intermediate



Tweet This! Tweet This Post!
03-11-10 06:47 AM - Post#352288     - Post Rank:             
    In response to BruceR

I actually haven't looked. I'll check it out.Thanks so much.
Mike










Icon Legend Permissions Topic Options
Print Topic

Email Topic

542 Views
Welcome Guest...
Enter your username and password to login. If you do not have a username you can register one here

Username

Password

Remember me. Help



Forgot Password...


Quick Links
Recent Posts
Active Topics
No Replies
Recent Files
Functions & Scripts
FileMaker Pro Help
FileMaker on Twitter
FileMaker Marketplace

Custom Search

Find FileMaker Developers

Don't have time to wait,
hire a developer now!

Recent Members
Welcome them to our community!
Find FileMaker Jobs

Want a new career?
Find your new job now!

Joy of Tech
Latest Joy of Tech!

Recent Topics
Recent Hot Topics
Contribute
With your generosity we can make some real magic happen!. Support your favorite online FileMaker community...
FM Forums.com


Click here...


Or a Donation of any amount.


Thanks for your support!

Active Blogs
0 Recent blogs:
People to Post Lately in this Topic
mleiser
BruceR
efen
icanhazdatabase
FM Forums Advertisers


FusionBB™ Version 3.0 FINAL | ©2003-2010 InteractivePHP, Inc.
Execution time: 0.625 seconds.   Total Queries: 127   Zlib Compression is on.
All times are . Current time is 09:03 AM
Content ©1996-2008 Ocean West Consulting, Inc. All Rights Reserved
Ocean West Consulting, Inc. can not and will not be held responsible for any of the contents in this site.
FM Forums™ is a trademark of Ocean West Consulting, Inc an independent entity, not affiliated with FileMaker Inc.
FileMaker® is a registered trademark of FileMaker Inc.
Top