johnf wrote:
> On Sunday 30 November 2008 01:16:36 pm Paul McNett wrote:
>> johnf wrote:
>>> I have a few questions concerning the ReportDesigner and the related
>>> output. I have 17 text fields that need to be part of a report (don't ask
>>> why 17 not my idea). When I add the text fields how does the report
>>> writer determine how to expand to meet the size requirements? Is there a
>>> setting like in VFP?
>> First, I believe by "text field" you mean a "string object". You can have
>> as many string objects in your report as you need. You size them by setting
>> properties, such as Width, Height, and FontSize. Combining this with the
>> Align property ("left", "center", or "right") you should get close to what
>> you need as far as layout goes.
>
> sorry I mean a postgres text data type. I think mysql calls them BLOB or
> TEXT. A VFP memo.
Ok, an rfxml paragraph.
>>> In the part 1 of the screencast it was suggested that the printing of a
>>> field could use a boolean to determine if printing was required. Could
>>> someone explain how I can determine if a text field contains data and how
>>> to tell the report writer not to print or to print the field. While
>>> playing I discovered Record.textField = Null still attempted to print.
>> You set the Show property of the String object to an expression like:
>>
>> "len(self.Record.last_name.strip()) > 0". This gets evaluated at runtime,
>> so in this case if there's data in the last_name field, that data will
>> print. Else, it won't. Of course, in this case it doesn't matter to set the
>> Show field because a blank is a blank in any case.
>
> True blank is blank. But what about the label for the field. Again I was
> making a ref to text data type field. Most of the time it's value is Null.
> Does 'None' apply?
For the label for the field, you'd set the Show property like I suggested.
Database
NULL is equivalent to Python None. None evaluates to boolean False in Python...
>> You'll probably find that the report writer is smart enough in this regard,
>> but you can handle this with report groups, mostly like it works in VFP.
>> Add a group on an expression like "self.Record.invoice_num". Now you can
>> choose things like whether to reprint the group header on the next page,
>> etc.
>>
> Hope so. Let me play a little more by providing more data. But I still want
> to know what happens with the text data types.
"what happens with the text data types": that is a pretty vague question!
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]