Jump to content

Page numbering and more...


This topic is 8612 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi,

When I'm creating a report from FM I'd like to put page number in one corner in the format of "page X of Y". Displaying the current page number is obvious but I just can't come up with a way of showing the total number of pages in a report (preview mode). Help!

And a second question... does anyone know the easiest way to validate a join file in a many to many relationtionship to prevent duplicate records in the join file?

I might have to clarify that question... hmm

It's three database. One with Candidates and one with training Courses. Between these two I have ajoin file. What I want to do is to prevent candidates to enrol to the same training course twice (creating two identical records in the join file). Preferably I'd like a dialog box to pop up.

Any help very much appreciated!

Thanks,

Aps

Link to comment
Share on other sites

quote:

Originally posted by APS:

Hi,

When I'm creating a report from FM I'd like to put page number in one corner in the format of "page X of Y". Displaying the current page number is obvious but I just can't come up with a way of showing the total number of pages in a report (preview mode). Help!

This is pretty easy. Goto Preview Mode, Goto Last Record, Set a Global to Status (CurrentPageNumber).

This will get you your "...of Y" number.

quote:

And a second question... does anyone know the easiest way to validate a join file in a many to many relationtionship to prevent duplicate records in the join file?

I might have to clarify that question... hmm

It's three database. One with Candidates and one with training Courses. Between these two I have ajoin file. What I want to do is to prevent candidates to enrol to the same training course twice (creating two identical records in the join file). Preferably I'd like a dialog box to pop up.

Basically just use the IsValid function on a compound key before creating the related record. Use the If conditional in a script with IsValid (Join by CandidateIDdashTrainingID::CandidateID). If the relationship is valid then this candidate has already signed up for this training and you can do whatever else you want to do in that case.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

  • Newbies

Thanks Kurt!

Just one follow up question. Would it be possible to use field level validation on the compound key rather than a script?

I have tried but run in to problem as I can't validate a calcualtion field. Are there any tricks for this?

Many thanks again...

Rgds,

Aps

Link to comment
Share on other sites

quote:

Originally posted by captkurt:

Do not use field validation, you are actually performing the check via the script and will ALWAYS fail via validation.

Field level validation is used to make sure that the contents of the field match a certain criteria, not to validate relationships.


It is possible to user field validation to validate the kind of unique record you want, but it's much more compliated, using calcs and lookups. I've done it before, and it works. But I have to tell you, I like Kurt's solution much better.

If you really want to know how to do field level validation for two fields to ensure that no duplicate records exist such that the same values are in two fields, check out www.databasepros.com and do a search for "validate". The technique is described in a sample file there.

Chuck

Link to comment
Share on other sites

quote:

Originally posted by APS:

Thanks Kurt!

Just one follow up question. Would it be possible to use field level validation on the compound key rather than a script?

I have tried but run in to problem as I can't validate a calcualtion field. Are there any tricks for this?

Do not use field validation, you are actually performing the check via the script and will ALWAYS fail via validation.

Field level validation is used to make sure that the contents of the field match a certain criteria, not to validate relationships.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

This topic is 8612 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.