CAPITAL Office Business Software
CAPITAL Support Forum
FAQSearchMembersGroupsRegisterProfilePM'sLogin/Out
VB print job set-up question

 
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation
View previous topic :: View next topic  
Author Message
Rob
Guest





PostPosted: Fri Oct 02, 2015 7:29 pm    Post subject: VB print job set-up question Reply with quote

Hoping you can give me a quick answer. I am using R-ITOTEN.MAC and at the end of the script need to Create a print job form a cardfile.
I have at the end of the script
Declare MyScript Type Character
MyScript := ""
MyScript := cCustomer
CreatePrintJob("gascol", Myscript, 1)
cCustomer is returning the customer account code.
What I am struggling with is Passing the result of cCustomer to the VB report so I can generate a the report. The report will be like and invoice listing address and details from the customer account then have Body1 being the items for the account in cardfile GASEMPTY.
Have attached my starting point for the report.
Back to top
COBS Tech Support



Joined: 09 Sep 2005
Posts: 651

PostPosted: Fri Oct 02, 2015 7:31 pm    Post subject: Reply with quote

You can't pass raw data, i.e., just the account code, because at the other end (VB) it will execute what you pass as a script. Image if you wrote a script:

"ACME"

(You just pass cAccount to the script parameter)

What does this do? Well, nothing. You'd just get an error.

So you need to pass some script statements; the statements need to set-up some variable(s) and assign them a value.

So your script needs to be:

Code:
cScript := "Declare MyAccount Type Character" + CHR(13) + CHR(10)
cScript := cScript + "MyAccount := '" + cCustomer + "'"


At the other end, VB will see and then execute these lines:

Declare MyAccount Type Character
MyAccount := 'ACME'

Then you can just query the value of MyAccount (variable) inside the VB report.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

phpBB Template by Vereor
Protected by Anti-Spam ACP