Re: [dabo-users] report writer ?'s

Author: Paul McNett

Posted: 2008-11-30 at 16:16:36

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.

If you need more than one line of output from the String object, such as an invoice

description that can wrap to multiple lines, there's a 'paragraph object' that can do

that for you, but as of now it isn't available for placement by the ReportDesigner.

You can see an example of the Paragraph object in the invoice sample from the old

dabodemo:

http://svn.dabodev.com/dabodemo/trunk/reports/

Note that it needs to be part of something called a FrameSet, which can contain

multiple columns or paragraphs.

I don't know what VFP setting you are referring to.

> 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.

The best way for me to help though is with specific examples. Post your rfxml file to

the trac wiki and let me take a look at specific things you've tried, instead of

trying to interpret what you mean in your prose.

> How can I determine page length? I'm worried about insuring that the fields

> fit on the page without extending to the next page. For example when

> creating an invoice I do not want to start a new detail line if the line will

> start within œ inch of the page footer.

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.

Paul

©2008 Paul McNett