Jump to content
Server Maintenance This Week. ×

Save as PDF - Background only


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

Recommended Posts

Hi,

 

I am creating a school db and I want to ability to email a record to some colleagues. The send email bit works fine, it attaches a pdf as required to the email prior to sending.

 

The bit that's gone a bit wrong (or maybe not!) is the actual PDF has only got the layour design on there, the data hasn't been added. I'm getting a header and name of the layout and then a blank screen.

 

I've attached my script. Any help / direction is greatly appreciated.

 

Thanks

Ann

post-112258-0-66868100-1421675006_thumb.

Link to comment
Share on other sites

How are the tables "TeacherEvaluation_tbl_Subject" and "tbl_TeacherEvaluationForm" related. Perhaps by the teacher's primary id, "__Pk_"?

 

If so, use Go to Related Records, match current record, to jump from one context to the other.

 

I find your table naming convention difficult to follow. You might wish to post a diagram of your tables and how they are related, because having the correct data model is crucial to a successful solution.

Link to comment
Share on other sites

HI,

Thank you for your help. I've attached a copy of the relationships so you can see how the tables are related.

 

I've got a slide control on the layout I want to save to pdf. Will this cause a problem.

 

Many Thanks
Ann

 

post-112258-0-26311200-1421753207_thumb.

Link to comment
Share on other sites

Ann,

 

It looks like you're relating an evaluation form to the subject table incorrectly. I see __fk_Subject = SubjectDescription, rather than __fk_Subject=__pK__

 

 

Also, whenever I have people related to an entity, I use this data model:

 

People>Team<Entity

 

So, in your case, rather than all the separate relationship from the Evaluation Form to Staff, all you'd need is one relationship. The Team table would have the foreign keys for the Evaluation form and the Person, and a RoleID. Create a RoleType table. All you need is RoleID and Description. Then, on the Evaluation form, place a portal to the Team table and allow the user to add Team members and select their role.

 

Back to the original problem:

On what layout is the "Send Evaluation" button. I realize now that I have no idea where you're starting. You want to send a specific evaluation to a teacher, correct? "I want to ability to email a record to some colleagues." Or, are you looking to send all the evaluations that you have for a specific teacher to him?

 

btw, your naming conventions are overly complicated. But, if your comfortable with them, then that's your decision. imho, there is no need to include tbl in a table name.

Link to comment
Share on other sites

LOL, Wim. Do you want to take on this one?

 

I'm onsite all day, so that's the last bit of time I have for this. (Wish me luck on External Authentication and a FMS12 server upgrade!).

Link to comment
Share on other sites

Thanks BCooney. I missed that error.

 

In answer to your questions, the Send Email button is on a layout based on the TeacherEvaluationForm table. It's on the last slide control so once the observer has entered all the information they can then email a copy of it to the teacher they have just evaluated.

 

I only want it to send the current record that they are looking at.

 

Wim, I am on the main table as per the diagram above.

 

Thanks
Ann

Link to comment
Share on other sites

Ok, instead of using "find matching records", do the file explicitly by using

 

Enter Find Mode

Set Field <you want to search on> = <what you want to find>

Perform Find

set variable [ $error = get(lasterror) ]

If[ $error <> 0]

  show custom dialog] $error ]

End if

 

I'm pretty sure you'll see that the find request errors out

Link to comment
Share on other sites

Hi Wim,

 

Thanks for that. The script doesn't seem to be erroring, however, even with the above changes when it creates the pdf it's blank.

 

I check it with another layout and it worked fine. :)

 

The difference in the layouts is I have a slide control on the one that comes out blank and nothing on the other layout.

I think I'll have to create a view layout without the slide control to get it to work, unless there is another way?

 

Thanks for your help. Its greatly appreciated. :laugh2:  :laugh2:

Ann

Link to comment
Share on other sites

If you go to a layout with a tab panel or slide control, it will default to the default tab/panel.  So if your stuff is not on that default panel you will need to do a "go to object" to activate the right tab/panel

Link to comment
Share on other sites

This topic is 3382 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.