Create QRP
Create QRP
Hi.
I'm taking a look at "Report Builder ActiveX interface (ReportBuilder.apl)".
Attached a small sample (TD60) that inserts two lines in a page header and a field into the 1st line.
I tried a lot but I FAILED to create a "Background Text".
Is it my fault or it is not possible to do that?
I ask your help to do this or to tell me that "it is not possible".
Thank you.
I'm taking a look at "Report Builder ActiveX interface (ReportBuilder.apl)".
Attached a small sample (TD60) that inserts two lines in a page header and a field into the 1st line.
I tried a lot but I FAILED to create a "Background Text".
Is it my fault or it is not possible to do that?
I ask your help to do this or to tell me that "it is not possible".
Thank you.
You do not have the required permissions to view the files attached to this post.
Re: Create QRP
It would help me to see what you did try, Ivano, though it doesn't look like the AX/ReportBuilder.apl supports that. But if you found something (and does not work) that I don't see, I would like to know what that is.I tried a lot but I FAILED to create a "Background Text".
Re: Create QRP
Hi Jeff.
There is CreateField( Object ) to create a field. I did not find the same to create a background text.
When I said that I tried a lot I was saying that I tried to find an equivalent function for background text...
Thank you...
There is CreateField( Object ) to create a field. I did not find the same to create a background text.
When I said that I tried a lot I was saying that I tried to find an equivalent function for background text...
Thank you...
Re: Create QRP
Hi Ivano,
I haven't looked at this for a while (circa 4.1), but my code from back then uses the CreateObject( ) function, then SetExpText( ) to set a literal expression to the desired text. From that I gather there is no way to define an actual background text item, or perhaps internally they're stored as fields with literal text expressions anyway. I couldn't find any class object, or functions in the IReportList class, interface to support them explicitly.
In the example below, I'm creating column titles in a page header line (oPageLine), setting the position using SetLeft( ) and a calculated width using SetWidth( ), then setting the text as a literal from the field name, surrounded by single quotes (the SQ constant).
Hope this helps you out,
I haven't looked at this for a while (circa 4.1), but my code from back then uses the CreateObject( ) function, then SetExpText( ) to set a literal expression to the desired text. From that I gather there is no way to define an actual background text item, or perhaps internally they're stored as fields with literal text expressions anyway. I couldn't find any class object, or functions in the IReportList class, interface to support them explicitly.
In the example below, I'm creating column titles in a page header line (oPageLine), setting the position using SetLeft( ) and a calculated width using SetWidth( ), then setting the text as a literal from the field name, surrounded by single quotes (the SQ constant).
Code: Select all
! ** Set Header Field Properties **
Call oPageLine.CreateField( oPageField )
Call oPageField.SetLeft( nLeft, bOK )
Call oPageField.SetWidth( anWidth[nField] * nWidth / nTotal, bOK )
Call oPageField.SetExpText( SQ || asName[nField] || SQ, bOK )
Terry Phythian
Reprise Consulting
Reprise Consulting
Re: Create QRP
Hi Terry.
I already tried out your tip before writing here with no success.
I tried again using SetLeft and SetWidth (I have not used in previous test) and unfortunatelly no success. The bOK parameter of SetExpText is returning FALSE. See: Maybe I'm doing something wrong. If you or a friend check this is true please tell me.
Thank you for your attention.
My best regards.
I already tried out your tip before writing here with no success.
I tried again using SetLeft and SetWidth (I have not used in previous test) and unfortunatelly no success. The bOK parameter of SetExpText is returning FALSE. See: Maybe I'm doing something wrong. If you or a friend check this is true please tell me.
Thank you for your attention.
My best regards.
You do not have the required permissions to view the files attached to this post.
Re: Create QRP
Hi Ivano,
I may be wrong, but I think your call to SetExpText() is incorrect. You've specified the expression text as 'Header', which means only the word Header is being set as the expression. Unless you have an input item or variable called Header, the expression is invalid, and hence SetExpText() will return FALSE.
To include the literal value 'Header' (including the single quotes), then you'll need to enclose it in quotes, i.e. "'Header'" or '\'Header\'', so that the expression includes the literal constant 'Header', including the single quotes. In my example, the text value was obtained from an item in a string array, asName[nField], then prepended and appended with the single quote charater stored in the SQ global constant, and so the quotes are included in the expression to make it a literal text value.
Hope this helps,
I may be wrong, but I think your call to SetExpText() is incorrect. You've specified the expression text as 'Header', which means only the word Header is being set as the expression. Unless you have an input item or variable called Header, the expression is invalid, and hence SetExpText() will return FALSE.
To include the literal value 'Header' (including the single quotes), then you'll need to enclose it in quotes, i.e. "'Header'" or '\'Header\'', so that the expression includes the literal constant 'Header', including the single quotes. In my example, the text value was obtained from an item in a string array, asName[nField], then prepended and appended with the single quote charater stored in the SQ global constant, and so the quotes are included in the expression to make it a literal text value.
Hope this helps,
Terry Phythian
Reprise Consulting
Reprise Consulting
Re: Create QRP
Hi Terry.
It worked fine
. See:
In my opinion the ActiveX should have a function to create a background text but this "workaround" works fine.
Count on me.
Thank you.
It worked fine

Count on me.
Thank you.
You do not have the required permissions to view the files attached to this post.
Re: Create QRP
Hi Ivano,
Yes I agree with you, it would make it more obvious and easier to use!
I suppose you can always write your own wrapper class/function to synthesize one, but why should you have to for something equivalent to the facilities provided in the Report Builder UI ?
Cheers,
Yes I agree with you, it would make it more obvious and easier to use!
I suppose you can always write your own wrapper class/function to synthesize one, but why should you have to for something equivalent to the facilities provided in the Report Builder UI ?
Cheers,
Terry Phythian
Reprise Consulting
Reprise Consulting
Who is online
Users browsing this forum: [Ccbot] and 1 guest