Index
2008-11-30 12:47 – johnf : [dabo-users] report writer ?'s
2008-11-30 16:16 – Paul McNett : Re: [dabo-users] report writer ?'s
2008-11-30 17:03 – johnf : Re: [dabo-users] report writer ?'s
2008-11-30 20:13 – Paul McNett : Re: [dabo-users] report writer ?'s
2008-11-30 21:56 – johnf : Re: [dabo-users] report writer ?'s
2008-12-01 11:05 – johnf : Re: [dabo-users] report writer ?'s
2008-12-01 11:10 – Ed Leafe : Re: [dabo-users] report writer ?'s
2008-12-01 11:22 – johnf : Re: [dabo-users] report writer ?'s
2008-12-01 12:54 – Paul McNett : Re: [dabo-users] report writer ?'s
2008-12-01 12:55 – Paul McNett : Re: [dabo-users] report writer ?'s
Back to top
[dabo-users] report writer ?'s

Author: johnf

Posted: 2008-11-30 12:47:19   Link

Hi,

I have a few questions concerning the ReportDesigner and the related output=

=2E =20

I have 17 text fields that need to be part of a report (don't ask why 17 no=

t=20

my idea). When I add the text fields how does the report writer determine=

=20

how to expand to meet the size requirements? Is there a setting like in VF=

P?

In the part 1 of the screencast it was suggested that the printing of a fie=

ld=20

could use a boolean to determine if printing was required. Could someone=20

explain how I can determine if a text field contains data and how to tell t=

he=20

report writer not to print or to print the field. While playing I discover=

ed=20

Record.textField =3D Null still attempted to print.

How can I determine page length? I'm worried about insuring that the field=

s=20

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

creating an invoice I do not want to start a new detail line if the line wi=

ll=20

start within =BD inch of the page footer.

=2D-=20

John Fabiani

©2008 johnf
Back to top
Re: [dabo-users] report writer ?'s

Author: Paul McNett

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

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
Back to top
Re: [dabo-users] report writer ?'s

Author: johnf

Posted: 2008-11-30 17:03:22   Link

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 a=

sk

> > 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 setti=

ng

> 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=20

TEXT. A VFP memo.=20

>

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

I was thinking about stretch and float with overflow, remove if blank, etc..

> > 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 h=

ow

> > to tell the report writer not to print or to print the field. While

> > playing I discovered Record.textField =3D 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 t=

he

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

=20

making a ref to text data type field. Most of the time it's value is Null.=

=20

Does 'None' apply?

>

> 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 =C2=BD inch of the page footer.

>

> You'll probably find that the report writer is smart enough in this regar=

d,

> 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

>

Hope so. Let me play a little more by providing more data. But I still wa=

nt=20

to know what happens with the text data types.

=2D-=20

John Fabiani

©2008 johnf
Back to top
Re: [dabo-users] report writer ?'s

Author: Paul McNett

Posted: 2008-11-30 20:13:04   Link

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

©2008 Paul McNett
Back to top
Re: [dabo-users] report writer ?'s

Author: johnf

Posted: 2008-11-30 21:56:51   Link

On Sunday 30 November 2008 05:13:04 pm Paul McNett 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). =A0When I add the text fields how does the

> >>> report writer determine how to expand to meet the size requirements?

> >>> =A0Is there a setting like in VFP

So I have 17 text data type fields. How does the report writer deal with t=

he=20

sizing of the PDF output for the text data types? Will it just expand to=20

meet the sizing. Will it expand across pages. VFP has several settings su=

ch=20

as float,stretch and overflow that control how controls expand etc... =20

>Ok, an rfxml paragraph.

I don't know what a "paragraph" is/means. There is no object=20

called "paragraph" in the report designer. =20

Also what about page numbers? Meaning how do I get the page number to prin=

t.

=2D-=20

John Fabiani

©2008 johnf
Back to top
Re: [dabo-users] report writer ?'s

Author: johnf

Posted: 2008-12-01 11:05:28   Link

On Sunday 30 November 2008 06:56:51 pm johnf wrote:

> On Sunday 30 November 2008 05:13:04 pm Paul McNett 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). =A0When I add the text fields how does the

> > >>> report writer determine how to expand to meet the size requirements?

> > >>> =A0Is there a setting like in VFP

>

> So I have 17 text data type fields. How does the report writer deal with

> the sizing of the PDF output for the text data types? Will it just expand

> to meet the sizing. Will it expand across pages. VFP has several settin=

gs

> such as float,stretch and overflow that control how controls expand etc...

>

> >Ok, an rfxml paragraph.

>

> I don't know what a "paragraph" is/means. There is no object

> called "paragraph" in the report designer.

>

> Also what about page numbers? Meaning how do I get the page number to

> print.

I must have done something wrong in my editor because yesterday I did not=20

find "paragraph" in the rfxml file. I download it again and sure enough it=

's=20

there. Could it be that opening the file with ReportDesigner will remove t=

he=20

tag? I'm printing the reportlab doc's and hope to get futher with my=20

reporting.

=2D-=20

John Fabiani

©2008 johnf
Back to top
Re: [dabo-users] report writer ?'s

Author: Ed Leafe

Posted: 2008-12-01 11:10:04   Link

On Dec 1, 2008, at 10:05 AM, johnf wrote:

> I must have done something wrong in my editor because yesterday I

> did not

> find "paragraph" in the rfxml file.

From Paul's first response:

"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/"

-- Ed Leafe

©2008 Ed Leafe
Back to top
Re: [dabo-users] report writer ?'s

Author: johnf

Posted: 2008-12-01 11:22:25   Link

On Monday 01 December 2008 08:10:04 am Ed Leafe wrote:

> On Dec 1, 2008, at 10:05 AM, johnf wrote:

> > I must have done something wrong in my editor because yesterday I

> > did not

> > find "paragraph" in the rfxml file.

>

> From Paul's first response:

>

> "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/"

>

>

> -- Ed Leafe

I did read his response. But yesterday I could not find where the

word 'paragraph' existed. It was not in the rfxml file nor in the

ReportDesigner. Today however I downloaded the file again and there it was.

I'm at a lost but I think yesterday I opened the file with the

ReportDesigner. I haven't checked but I wonder if it removed the entry. I

doubt it but I'm sure the file did not contain the word 'paragraph'. I'm

moving on. I need a way to print 17 memo fields on a report and only if the

memo field contains data (along with a labels of course).

--

John Fabiani

©2008 johnf
Back to top
Re: [dabo-users] report writer ?'s

Author: Paul McNett

Posted: 2008-12-01 12:54:09   Link

johnf wrote:

> On Sunday 30 November 2008 05:13:04 pm Paul McNett 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

>

> So I have 17 text data type fields. How does the report writer deal with the

> sizing of the PDF output for the text data types? Will it just expand to

> meet the sizing. Will it expand across pages. VFP has several settings such

> as float,stretch and overflow that control how controls expand etc...

Each paragraph has width and height. It'll wrap to the width, and fill up the height.

If height is None, the height will grow dynamically to accommodate the content.

>> Ok, an rfxml paragraph.

> I don't know what a "paragraph" is/means. There is no object

> called "paragraph" in the report designer.

The report writer knows about paragraphs; the report designer does not. This is why I

pointed you to the invoice sample which shows it in action (read the xml).

> Also what about page numbers? Meaning how do I get the page number to print.

Please enter a ticket for this. It won't be hard for me to do.

Paul

©2008 Paul McNett
Back to top
Re: [dabo-users] report writer ?'s

Author: Paul McNett

Posted: 2008-12-01 12:55:41   Link

johnf wrote:

> I must have done something wrong in my editor because yesterday I did not

> find "paragraph" in the rfxml file. I download it again and sure enough it's

> there. Could it be that opening the file with ReportDesigner will remove the

> tag? I'm printing the reportlab doc's and hope to get futher with my

> reporting.

If you open a rfxml that *already* has paragraph tags, it'll preserve it. It'll even

try to display it visually (somewhat). What's missing is being able to define a new

paragraph object visually.

Paul

©2008 Paul McNett