ERW Capture Version Name

  • Thread starter Adrian_Chimirel
  • Start date
Adrian_Chimirel

Adrian_Chimirel

Legendary Poster
Hi Listers,
I'm looking for 2 things, now:
1 - a way to get the UBE's Version Name, into the Page Header, close to the UBE's Name.
2 - how do we right_justify the set "Page x of xx"
We did our homework by trying to concatenate the run-time variables "x" and "xx" but .... :(
IT DID NOT WORK! It seems as if we cant guess the DD item they are (Integer/Math ...)
Thank you very much!
PS We are working in Xe!

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
I've had success by creating an RV VERSION NAME
and assigned it to be equal to SL VERSION NAME.

I do the assignment in the INITIALIZE section of the driver.

I don't know if there is a (non-xe) way of doing this automatically.

I hope this helps.

Gene



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
 
Hello Adrian,

Hey, do you really want that we do your homework in Denver Report Writer class instead of you? Is it right? Is your teachers watching the Forum? ;-)

In response to your issues:

1.) Put an Alpha Variable onto the Page Header. You can assign the Version Name (punctually the Version ID) to it using the "SL VersionName" system value as right operand in an appropriate event of your report. If you want to display the Version Description too then you can FetchSingle it from F983051 table using "SL ReportName" and "SL VersionName" for filtering on the primary key of the table.

2.) It is just an idea, I have never tried it still now.
* put the "Page n of Total" runtime variable onto the header. Although you can not change the name of them but you can guess which "RV Variable 0000xx" are they in the ER Designer (It seems to me they are numerics, not MATH but Numeric RV).

If the Right justification radio button realy has no affect on the Display tab of on the Properties window of these RVs then let's continue:

* Install and deploy a newer Service Pack (just kidding ;-)
* hide yor "Page n of Total" RVs.
* Create RV or ER string variable
* convert page numbers to string into the string variables
* Now you are free to compose any display style, justification using string functions (concat, trim, rtim, pad, lpad, substr, etc.) and the Justification RV settings.

If it will work then do not tell it in the class that you have got a little help from your friends but let us know your results.

Jope, could help,
Zoltán
P.S.: How long will be there in Denver? What about the weather there?





B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Hi Zoltán,
I was sure the List will help. The Version Name stuff was accomplished.
Now, what s/b function do you use in order to convert the page number to string?

The weather is fine (it's SPRING here - that is 15-17 deg C), and I'll be leaving on Saturday.
Bye now, the teacher started another topic ....

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Thank you Gene!

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
I've had luck w/bsfn B0800001 Convert Math Numeric to String.
This allows you to specify number before/after decimal,
include sign, and include decimal.

There is also B0000045 Math Numeric to String, Convert but
it is less flexible than the B0800001.



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
 
Hi Adrian,

Hey, are you watching the Forum while you are sitting in the class room? I hope, your teacher do not see your screen.

Let's see: Numeric to String:

1.) Without Sys/Bus Func: Try to assign the numeric value to the string variable. Are you surprised at it? Try to do it not as a simple assignment but using the experession manager. In this case you will see square brakets surrond the numeric variable on the right sign of the assignment statement. I suppose it will work for you.

2.) If the previous doesn't work: Of course, generally we use on of our our good old home made (hand made) custom BSFNs (e.g. N55xxyyy: Convert aaa To bbb Flexible). If you do not find it there then you can use the "Math Numeric to String, Convert" BSFN ( C name: "ConvertNumericToString") from the B0000045 source module. First parameter: input numeric value, the second: the output string (max. 10 char length).
There are some others that I have never used, please examine the functions in B7400320 and B0000083 source moduls.

Hope, could help.
Zoltán
P.S.: Do not forget to switch your screen back when your teacher is on to walking behind you! ;-)
(... and let us know your resuults)

Hope, could help.

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Yes Zoltán, and EVERYBODY is happy!
Well ... they didn't work; any of your two suggestions.
The first one gives me the "Parameter #1 should be a String" error and
The second is unusable; the RunTime PageNumber variable is not visible into the BSFN's window.
It can't be entered into the Input Numeric parameter!
Guess I'll have to give up (just a wild idea!), somehow,
it seems the RunTime variable is not able to be captured by ANY BSFN!
Thanks anyway!



Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Were you able to enter the actual RunTime variable PageNumber or TotalPageNumber?
Can you send me a screen shot?
Thx,

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Adrian,

Please, do not give up!

2.) Create a MATHNUMERIC ER Variable, pass the value of the Runtime RV to it via a simple assignment, pass the MATHNUMERIC ER Variable to the BSFN. Hopefully will work.

Good luck & Never give up,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
OK, I won't give up ...
But I tried the
Integer
MathNumeric
...
And, even some Sequence Number (I noticed it is a 6 digits size number), ...
THE SAME ERROR; Parameter#1 should be a ... NUMBER!
Did you have some time to make it work?
Thanks everybody for your precious time,

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Hi Adrian,

BF N94NM16A “Get Page Number” in B733.2 will give to you actual page number as INT. I don’t know about Xe but it should be a BF providing current page number and total number of pages (maybe the same as in B733.2). Search for “B*” or “N*” as name and “*page* as description.

Hope this will help.

Regards,

Bojan.
 
Hello Bojan,
I just tried the N94NM16A UBEReportGetPageNumber; it has
-two strings (an Input and an Output) and
-a number (nnmuberpage)
One reasonable way to use it seems to extract the szOutputString
(I guess this is the PageNumber in String format)into an Alpha variable;
what about the other two parameters? I've ignored them and ... no result at all!
My alpha variable shows nothing! How did you use it (if you used it)?
Boy, isn't that something?
Thank you,

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Adrian,

I am very sorry.
I have also made experiments to identify the type of these runtime RVs for you but without succes. I tried the ID type too.
I made a reverse assignment. This time the RV was on the left operand and the error message was:
Parameter#1 should be Data Type: UKNKNOWN!
That's all.
Currently I have any further idea but I won't give up also.

Good luck & Succesfull investigating
Zoltán
P.S.: Next week, I won't be able to listen the List/Forum. I will be on a not really holiday, have to arrange a lot of to do.


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Hello Adrian,

Do not assign anything to “szOutputString” and “szInputString”. Create a variable DD type “INT01 “ and assign to “nnumberPage”. After that you need to convert integer to “MathNumeric” and convert “MathNumeric” to string (I can’t find any conversion from integer to string). Example:

0002 Get Page Number
UNDEFINED <- szOutputString
UNDEFINED -> szInputString
VA rpt_IntegerPgNo <> nnumberPage
0003 Convert Integer To Math Numeric
VA rpt_IntegerPgNo -> nInteger01
VA rpt_MathNoPgNo <- mnMathNumeric01
0004 Math Numeric to String, Convert
VA rpt_MathNoPgNo -> mnMathNumeric01
VA rpt_StringPageNo <- szVideoConstant30A


rpt_IntegerPgNo is INT01
rpt_MathNoPgNo is MATH01
rpt_StringPageNo is TOPG.

This is working on my B733.2, NT4.0, and SQL7 and hopefully it will work on your system also.

Good luck,

Bojan.
 
Hi Bojan, that was a nice one! Now, the last thing missing; where do I find the TotalPageNum BSFN? Anybody has any idea? Thank you, everybody,


Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Hi List,

Checkout this doc id (OFN-99-0052) in KG. It gives u info about printing version id on report header.

Tushar
 
Wow! This is the ... most "Complete(ed) References about VersionName & Title" post I've ever seen!
Thank you Tushar, thank you very much! Keep the good things rock and rolling.

Adrian Chimirel
Programmer Analyst
LIVE: B732.1 SP12.2, Oracle 806
SANDBOX: XE SP13, 8i
RS/6000, Citrix, 200+ clients
 
Back
Top