View Full Version : Please help me with my template!
Stanley
October 21st, 2003, 12:07 PM
:confused: I am trying to pick up a field from a report as a footer to my detail line. The field contains, in 95% of cases a customer number in the format 'MTI-1234567' BUT there are a few that are in the format MT-ABCD.
Basically, all I need to do is use a hyphen as my trap (this works OK for 95% of the records) - but the hyphen is in either at position 3, or 4.
Is it possible to write this in a trap? I have had no luck creating two different templates for this purpose. Please help if you can!
Let me know if there is any further info you need in order to answer this question.
Many thanks
Stanley
:rolleyes:
[ October 21, 2003, 11:14 AM: Message edited by: Stanley ]
Grant Perkins
October 21st, 2003, 12:21 PM
Stanley,
Which version of Monarch?
Are you sure you have to use the hyphen trap? Is there no other way available at all? (EG. the MT characters or MT with some other check characters would not be enough?)
Do you have to make the template a footer?
Happy to have a go at this for you if you can post a sample of the format, preferably a complete section of the report with any confidential data masked or altered.
Grant
Originally posted by Stanley:
:confused: I am trying to pick up a field from a report as a footer. The field contains, in 95% of cases a customer number in the format 'MTI-1234567' BUT there are a few that are in the format MT-ABCD.
Basically, all I need to do is use hyphen trap - but the position is either at character 4, or 3.
Is it possible to write such a trap? I have had no luck creating two different templates for this purpose. Please help if you can!
Let me know if there is any further info you need in order to answer this question.
Many thanks
Stanley
:rolleyes:
Stanley
October 21st, 2003, 12:28 PM
Grant,
Many thanks for the offer - only problem is the report extract won't display properly within the message window - I could email it to you, if you are allowed to post email addresses on the forum?
Oh, and it's Monarch V6.00
Thanks
Stanley
Grant Perkins
October 21st, 2003, 12:52 PM
Stanley,
It might display if you use the "Code" facility.
However the best option is email so I will send you a private message with my email address.
Is V 6 the Standard or Pro version?
Grant
Originally posted by Stanley:
Grant,
Many thanks for the offer - only problem is the report extract won't display properly within the message window - I could email it to you, if you are allowed to post email addresses on the forum?
Oh, and it's Monarch V6.00
Thanks
Stanley
Stanley
October 21st, 2003, 12:55 PM
Grant - have extracted a small portion of the report - here you can see the problem. An alpha trap at position 1 and then a hyphen over the 4th character gets most of the customer numbers. The detail line is the one with the value on it. I am using footer rather than append since the append function leaves all data one line out of sync(?). My solution works fine, if it weren't for the lines where the customer number has only 2 characters ahead of the hyphen. Extract as follows:
Outstanding
Customer Amount
------------------ ----------------------
XXX 259.00
MIS-898
LONDON
Account Customer Balance:
Nxxxxx Mxxxx (GB) 706.00 Ltd
FS-NXX
Denxxm Wxx, Mx
T. Parkhouse
09999 899 888
Account Customer Balance:
Many thanks again - didn't expect a response so quickly!
Cheers
Stan
smile.gif
Stanley
October 21st, 2003, 12:58 PM
and try again...
Outstanding
Customer Amount
------------------ ----------------------
XXX 259.00
MIS-898
LONDON
Account Customer Balance:
Nxxxxx Mxxxx (GB) 706.00
Ltd
FS-NXX
Denxxm Wxx, Mx
T. Parkhouse
09999 899 888
Account Customer Balance:
Stanley
October 21st, 2003, 01:05 PM
I have access to version 6.00 Std, and Pro, if this makes a difference. I just use the Standard version. I'm not a regular user (as you may have gathered!)
Rgds
Stan
Grant Perkins
October 21st, 2003, 01:35 PM
Stan,
Looks like a slightly weird report format - has it lost anything in the posting?
As you have access to 6 Pro you could use the hyphen as a FLOATING trap BUT;
a. It would not work for v6 Standard users.
b. Your Customer number will be split into 2 parts by the hyphen. Not difficult to reconstruct but a little bit more work to do.
The rest of the format needs carefully checking at my end to see if there are any other options. (My rough 'cut and paste' has ended up looking a little different to the on-screen format. Does the "coded" on screen look correct to you?)
I'll have a play to see if I can come up with another option.
Grant
Originally posted by Stanley:
I have access to version 6.00 Std, and Pro, if this makes a difference. I just use the Standard version. I'm not a regular user (as you may have gathered!)
Rgds
Stan
[ October 21, 2003, 01:36 PM: Message edited by: Grant Perkins ]
Powered by vBulletin™ Version 4.1.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.