Hi,
In the MBS DynaPDF DrawListBox method is the following code which sets a title at the top of the page:
call pdf.WriteFText pdf.ktaJustify, “Test Title”
If I try to change it to the contents of a TextField, as below:
call pdf.WriteFText pdf.ktaJustify, TitleTextField.text
I receive no errors when compiling, but when the .exe creates the PDF, there is no Title at the top of the PDF?
Does anyone know if it is possible to replace hardcoded text with that of a TextField?
I would ask Christian directly, but it is almost midnight in Germany, and I was asked to post questions in these forums so that other users can benefit.
Thank you.
I don’t use DynaPDF, but a couple of things to try:
-
Put the TitleTextField.text value into a variable and then use the variable in the call (and check to see if it’s actually got a value using System.DebugLog or something similar)? Is TitleTextField actually the name of the field, or is it a subclass name and is the name actually TitleTextField1 (or something like that)?
-
Try making the call with “–” + TitleTextField.text + “–” and see if anything shows up in between the "–"s.
Bill,
there is something strange going on - probably my lack of knowledge.
In Window1>Open Event I have the following code:
Dim UserName as String
In Window1>DrawListBox method I have the following code:
call pdf.WriteFText pdf.ktaJustify, UserName
However - when I try to compile I get the error message “This item does not exist”??
How can it not exist when it is clearly in Window1’s open event???
Because when it’s Dimmed in the open event, UserName is only in scope in the open event. You would need to make it a property of Window1 for it to be available throughout Window1’s methods and events.