Hook at print time. Hook #1

I have a hook running a print time.  The problem I am having is my hook needs 
to have the transaction saved first before the hook runs and the only time I 
can see that happening before printing is the before print hook #1.  The 
problem I am having is the hook is supposed to update the transaction just 
updated and then print and the XML receipt file is supposed to use some of 
the information just saved.  It seems that even though this hook is supposed 
to be before print time that it is actually formulating the XML file and 
getting the receipt ready before the hook is ran.  

Does anyone know exactly how this hook works (the hook #1) ?  The actual 
process flow like is the XML receipt file actually getting started before the 
hook runs, even thought the hook is supposed to be before any printing 
starts?  Ideas?

Thanks,
Nick
0
8/9/2005 9:21:02 PM
pos 14173 articles. 0 followers. Follow

4 Replies
716 Views

Similar Articles

[PageSpeed] 14

Are you updating the transaction  by writing to the database directly, or 
are you setting properties in the Session object as well?  The Receipt is 
being printed from information in the Session, not the database.

-- 
Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the 
newsgroup so that all can share the information



"ClothingStore" <ClothingStore@discussions.microsoft.com> wrote in message 
news:6BFC2607-6C48-439D-945B-745F31342CC0@microsoft.com...
>I have a hook running a print time.  The problem I am having is my hook 
>needs
> to have the transaction saved first before the hook runs and the only time 
> I
> can see that happening before printing is the before print hook #1.  The
> problem I am having is the hook is supposed to update the transaction just
> updated and then print and the XML receipt file is supposed to use some of
> the information just saved.  It seems that even though this hook is 
> supposed
> to be before print time that it is actually formulating the XML file and
> getting the receipt ready before the hook is ran.
>
> Does anyone know exactly how this hook works (the hook #1) ?  The actual
> process flow like is the XML receipt file actually getting started before 
> the
> hook runs, even thought the hook is supposed to be before any printing
> starts?  Ideas?
>
> Thanks,
> Nick 


0
glenn1806 (721)
8/9/2005 9:36:06 PM
I am updating the database transaction directly.  Is that my problem?  The 
XML receipt file is getting data from the session and not the database?  Is 
there a way for me to get around this?

"Glenn Adams [MVP - Retail Mgmt]" wrote:

> Are you updating the transaction  by writing to the database directly, or 
> are you setting properties in the Session object as well?  The Receipt is 
> being printed from information in the Session, not the database.
> 
> -- 
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the 
> newsgroup so that all can share the information
> 
> 
> 
> "ClothingStore" <ClothingStore@discussions.microsoft.com> wrote in message 
> news:6BFC2607-6C48-439D-945B-745F31342CC0@microsoft.com...
> >I have a hook running a print time.  The problem I am having is my hook 
> >needs
> > to have the transaction saved first before the hook runs and the only time 
> > I
> > can see that happening before printing is the before print hook #1.  The
> > problem I am having is the hook is supposed to update the transaction just
> > updated and then print and the XML receipt file is supposed to use some of
> > the information just saved.  It seems that even though this hook is 
> > supposed
> > to be before print time that it is actually formulating the XML file and
> > getting the receipt ready before the hook is ran.
> >
> > Does anyone know exactly how this hook works (the hook #1) ?  The actual
> > process flow like is the XML receipt file actually getting started before 
> > the
> > hook runs, even thought the hook is supposed to be before any printing
> > starts?  Ideas?
> >
> > Thanks,
> > Nick 
> 
> 
> 
0
8/9/2005 10:00:10 PM
There are 10 Session Variables that you can use to store your information. 
These are accessible to the Receipt engine.

In your add-in:
mySession.Variable(1) = "My String Value"

In your Receipt Template
<ROW> "My Label: |" Session.Variable1 </ROW>

Also, if you are changing existing values rather than inserting values that 
do not otherwise exist in RMS, you can change the values in the properties 
of the Session object.  These changes should persist to the receipt. 
Really, this would be the preferred method for getting values into the 
database - you should only write directly to the database during a 
transaction if you are adding extended fields.

Hope that helps...

-- 
Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the 
newsgroup so that all can share the information



"ClothingStore" <ClothingStore@discussions.microsoft.com> wrote in message 
news:9FA5179B-89B1-4A0E-9165-872C805FE9B7@microsoft.com...
>I am updating the database transaction directly.  Is that my problem?  The
> XML receipt file is getting data from the session and not the database? 
> Is
> there a way for me to get around this?
>
> "Glenn Adams [MVP - Retail Mgmt]" wrote:
>
>> Are you updating the transaction  by writing to the database directly, or
>> are you setting properties in the Session object as well?  The Receipt is
>> being printed from information in the Session, not the database.
>>
>> -- 
>> Glenn Adams
>> Tiber Creek Consulting
>> http://www.tibercreek.com
>> glenn@tibercreek.com
>> ----------------------------------------------
>> Please DO NOT respond to me directly but post all responses here in the
>> newsgroup so that all can share the information
>>
>>
>>
>> "ClothingStore" <ClothingStore@discussions.microsoft.com> wrote in 
>> message
>> news:6BFC2607-6C48-439D-945B-745F31342CC0@microsoft.com...
>> >I have a hook running a print time.  The problem I am having is my hook
>> >needs
>> > to have the transaction saved first before the hook runs and the only 
>> > time
>> > I
>> > can see that happening before printing is the before print hook #1. 
>> > The
>> > problem I am having is the hook is supposed to update the transaction 
>> > just
>> > updated and then print and the XML receipt file is supposed to use some 
>> > of
>> > the information just saved.  It seems that even though this hook is
>> > supposed
>> > to be before print time that it is actually formulating the XML file 
>> > and
>> > getting the receipt ready before the hook is ran.
>> >
>> > Does anyone know exactly how this hook works (the hook #1) ?  The 
>> > actual
>> > process flow like is the XML receipt file actually getting started 
>> > before
>> > the
>> > hook runs, even thought the hook is supposed to be before any printing
>> > starts?  Ideas?
>> >
>> > Thanks,
>> > Nick
>>
>>
>> 


0
glenn1806 (721)
8/10/2005 1:21:02 PM
Thanks Glenn, you are great.

"Glenn Adams [MVP - Retail Mgmt]" wrote:

> There are 10 Session Variables that you can use to store your information. 
> These are accessible to the Receipt engine.
> 
> In your add-in:
> mySession.Variable(1) = "My String Value"
> 
> In your Receipt Template
> <ROW> "My Label: |" Session.Variable1 </ROW>
> 
> Also, if you are changing existing values rather than inserting values that 
> do not otherwise exist in RMS, you can change the values in the properties 
> of the Session object.  These changes should persist to the receipt. 
> Really, this would be the preferred method for getting values into the 
> database - you should only write directly to the database during a 
> transaction if you are adding extended fields.
> 
> Hope that helps...
> 
> -- 
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the 
> newsgroup so that all can share the information
> 
> 
> 
> "ClothingStore" <ClothingStore@discussions.microsoft.com> wrote in message 
> news:9FA5179B-89B1-4A0E-9165-872C805FE9B7@microsoft.com...
> >I am updating the database transaction directly.  Is that my problem?  The
> > XML receipt file is getting data from the session and not the database? 
> > Is
> > there a way for me to get around this?
> >
> > "Glenn Adams [MVP - Retail Mgmt]" wrote:
> >
> >> Are you updating the transaction  by writing to the database directly, or
> >> are you setting properties in the Session object as well?  The Receipt is
> >> being printed from information in the Session, not the database.
> >>
> >> -- 
> >> Glenn Adams
> >> Tiber Creek Consulting
> >> http://www.tibercreek.com
> >> glenn@tibercreek.com
> >> ----------------------------------------------
> >> Please DO NOT respond to me directly but post all responses here in the
> >> newsgroup so that all can share the information
> >>
> >>
> >>
> >> "ClothingStore" <ClothingStore@discussions.microsoft.com> wrote in 
> >> message
> >> news:6BFC2607-6C48-439D-945B-745F31342CC0@microsoft.com...
> >> >I have a hook running a print time.  The problem I am having is my hook
> >> >needs
> >> > to have the transaction saved first before the hook runs and the only 
> >> > time
> >> > I
> >> > can see that happening before printing is the before print hook #1. 
> >> > The
> >> > problem I am having is the hook is supposed to update the transaction 
> >> > just
> >> > updated and then print and the XML receipt file is supposed to use some 
> >> > of
> >> > the information just saved.  It seems that even though this hook is
> >> > supposed
> >> > to be before print time that it is actually formulating the XML file 
> >> > and
> >> > getting the receipt ready before the hook is ran.
> >> >
> >> > Does anyone know exactly how this hook works (the hook #1) ?  The 
> >> > actual
> >> > process flow like is the XML receipt file actually getting started 
> >> > before
> >> > the
> >> > hook runs, even thought the hook is supposed to be before any printing
> >> > starts?  Ideas?
> >> >
> >> > Thanks,
> >> > Nick
> >>
> >>
> >> 
> 
> 
> 
0
8/10/2005 1:59:04 PM
Reply:

Similar Artilces:

Calculate the amount of time over a permitted amount (12 hours)
Hi I would like to calcualte the time over a permitted amount and display it in a cell. Column C is the start time dd/mm/yy hh:mm and Column L is the finish time dd/mm/yy hh:mm. The alloted time is 12 hours for the job and and need column M to show the amount of time used over the 12 hours. Many Thanks. =MAX(L2-C2-"12:00",0) and format as time,[h]:mm -- HTH Bob "Steve M" <SteveM@discussions.microsoft.com> wrote in message news:909E493A-ED55-40A3-9406-6588A333F281@microsoft.com... > Hi > I would like to calcualte the time over ...

Time between two dates
I want to be sure how long has been since 1/18/88 to 9/30/05. If I substract the numbers it says 9/12/17. Can I interpret that as 17 years, nine month and 17 days? It just that it looks as the answer should be 8 months and not nine. Please help. Thank you! Hi! >Can I interpret that as 17 years, nine month and 17 days? Actually, NO! The result you see is due to Excel being "helpful" and using the DATE format from the source cells and applying it to the formula cell. The true result of the formula is 6465 days. When formatted as DATE, 6465 is equivalent to the date of...

hooks
hi can anyone tell me were i can find info on creating hooks would like to try my hand at it thanks in advance Your RMS Partner will have this information. Rob "hozay" <hozay@discussions.microsoft.com> wrote in message news:0D20AB67-E1CE-4C5D-862E-915F018D9F09@microsoft.com... > hi can anyone tell me were i can find info on creating hooks > would like to try my hand at it > > thanks in advance ...

Office installed too many times
I recently purchased an airport and I am networking a Power mac G4 with a desktop G4. All of the sudden my version of Office OSX does not work on the laptop claiming that I have exceeded the number of times I can install Office. Am I not allowed to install my version of Office on both my desktop and my laptop? If so, is my version of Office detecting the other version of Office installed on the desktop? If so, how can I fix this? GW Download and install the latest Office X updates, which are 10.1.2, 10.1.4, and 10.1.5 (10.1.3 is unnecessary) onto each of the computers. They�re av...

Windows hook and control hook
Hello, I am a little puzzled here. I know, when hooking up to Windows, the application has to unhook before termination. My code does it as below: 'Hook lpPrevWndProc = SetWindowLong(gHwnd, GWL_WNDPROC, AddressOf WindowProc) 'UnHook SetWindowLong(gHwnd, GWL_WNDPROC, lpPrevWndProc) What about when hooking to the control? I use this code to align caption on the command button : ================== oldStyle = GetWindowLong(Command1.hwnd, GWL_STYLE) oldStyle = oldStyle And (Not BS_ALLSTYLES) rtn = SetWindowLong(Command1.hwnd, GWL_STYLE, newStyle Or...

Printing annual Budget
When I print the annual budget, the collum "Budgeted Amount" does not print on the same page as the "Actual Amount" for some months. How can I adjust the collum widths to print the months Actual and Budgeted on the same page? Need help. In microsoft.public.money, <anonymous@discussions.microsoft.com> wrote: >When I print the annual budget, the collum "Budgeted >Amount" does not print on the same page as the "Actual >Amount" for some months. How can I adjust the collum >widths to print the months Actual and Budgeted on the &...

How to hook the On Screen Keyboard
Hello all. Just for fun I am working on a small project where I would like to hook the keys selected by the user from On Screen Keyboard (that comes with XP) in which they use their mouse to select keys and which gets sent to the target application like Firefox or IE. Can this be done using device driver code ? I prefer to keep my existing filter driver code and add this new feature to it if its possible. Hoping I am being clear and if not please feel free to ask questions. Thanks in advance Victor no, this is an entirely user mode concept and a driver will not help --...

Money Activation after re-install a few times
Most of you will never need to reactivate your Money Plus Deluxe, but for those odd ducks like myself that sometimes reload everything several times on a new computer or rebuild a home computer several times a year you may encounter the Money "out of product key" error when trying to activate. I finally hit the brick wall today and it was painful to do an activation over the phone. First, there is no phone number that comes up so you have to guess where to call. Turns out that product support didn't help, technical support couldn't help, so I ended up being transfer...

Printing four copies on one sheet
Hi, I have a document in A4. I would like to print out four copies of this document, their size reduced four times, on one A4 sheet of paper. My Canon iP4200 offers this option but will only print out one reduced copy, whatever option I choose. I cannot find Publisher to do the job. Selecting everything and manually reducing the document will not reduce the fonts, which remain at their original size. I would then have to enter each text box and manually choose a smaller font size, which is a real pain. Any idea? Thanks. Sam The font issue can be overcome by selecting AutoFit Text in t...

print preview #10
in excel 2003 when you ask for fit to one page in print preview it will still print it on two pages if the wording is longer than the cell it occupies. If you come out of this option and go back in it is ok but it will reset ifself when you come out of the print preview altogether ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based News...

Is it possible to print transparent fills when using
When I create a fill while using a gradient shading color, then select for it to be transparent, it will show it as transparent on the screen, but will not print (nor print preview) the color as being transparent. Is there something I can do so it will print transparent? Thanks! Els513 <Els513@discussions.microsoft.com> was very recently heard to utter: > When I create a fill while using a gradient shading color, then > select for it to be transparent, it will show it as transparent on > the screen, but will not print (nor print preview) the color as being > transparen...

how do I remove many hyperlinks from a spreadsheet at one time?
Select all the cells (ctrl-A (twice in xl2003)) hit alt-f11 (to get to the VBE, where macros live) hit ctrl-g (to see the immediate window) type this and hit enter: selection.hyperlinks.delete Close the VBE and back to excel to see if it worked. === You could even just select a smaller range and just clean that since the command uses the current selection. davey wrote: -- Dave Peterson It is considered bad manners to ask your question in the subject line. Perhaps Delete all hyperlinks then ask the question in the BODY of the message A macro will do this for you activesheet.hyperli...

time #14
is their a way to get excell to display a running clock. something like the = now function put which updats all the time and not just when saving I have posted an example spreadsheet at http://cjoint.com/?mrkRLDddVZ that you can take a look at -- HTH RP (remove nothere from the email address if mailing direct) "Rich" <r.mcc@ntlworld.com> wrote in message news:6D853B86-516D-43F8-90F2-D76BBA26A984@microsoft.com... > is their a way to get excell to display a running clock. > > something like the = now function put which updats all the time and not just > when ...

HELP! NDR a feature, but not this time!
I'm running exchange 2003 on 2k3 standard. One user (my boss!) is getting inundated with System Administrator NDR's. I know that these are coming back as a result of a spoofed email address. 300 + a day! We have anti spam and anti virus in our enterprise so I know they are propigating from outside. Anyway, Outlook 2003 will not allow a rule to be created to move all of these Sys Admin messages out of her Inbox, and I don't want to disable the NDRs all together. How can I keep the benefits of NDR's and yet allow my user to have a "clean" mailbox. I'm o...

calculate negative or positve difference in time
I make two manual entries of average times to compare last year with this year. I need to calculate the difference between the two times (it could be an increase or decrease), and show both the difference (+ or -) in hours and minutes, and the % of change (+ or -) from last year to this year. Example: 2:03 average talk time last year, 3:50 average talk time this year = increase of 1:47 (1 min. 47 sec.). or 86.99 % increase in talk time. As a time view =IF(A1>B1,"-","")&TEXT(ABS(A1-B1),"hh:mm:ss") percentage =IF(A1>B1,"-","&qu...

Print screen??
VC++ 6.0: Anyone know how to perform a print screen capture, then save the captured image? Ta keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0); and to save data in a file use COleDataObject class of MFC COleDataObject oClipboard; oClipboard.AttachClipboard(); -------------------------------------------- Manish Agarwal <manish.k.agarwal@gmail.com> http://personal.vsnl.com/mkag "Gareth Tuckwell" <ContactGT@NoSpam_hotmail.com> wrote in message news:fRU1d.64$fg4.51@newsfe1-win.ntli.net... > VC++ 6.0: > > Anyone know how to perform a print screen c...

Sheet printing order
HELP. When I try to print my work book... the sheets do not print in order. How do I set sheet printing order? how are you printing your workbook Are you selecting the tabs by holding control? shift In my experience it prints them from left to right of the selected tabs. You might try rearranging the tabs so they'll print in the order you like. Otherwise I'd give us the attachment to figure it out Dave My tabs are already in the order I want... but it is not printing in that order If I try to re-arange by ctrl + shift this just makes a copy of that sheet ----- dave wrot...

I can not get the text to print
I have a floor plan that I ahve created with text describing structure and such. The problem I am having is that when I go to print preivew it shows the document as I intend it. When I print the page the shapes and structures are there but no text. What am I doing wrong? "J Hendriks" <J Hendriks@discussions.microsoft.com> wrote in message news:B3E8F0B2-4252-46EB-8B84-F7FBED77FD61@microsoft.com... >I have a floor plan that I ahve created with text describing structure and > such. The problem I am having is that when I go to print preivew it shows > the > docume...

excel printing #11
hi all i am using excel 2002 and windows xp. i have a spreadsheet with 2 seperate worksheets. sheet 1 has data inputted into it from a software package called winwedge. it is purely numerical data. the data is inputted into excel one number at a time. an example of a number would be 50.123. this would occur approximately 50-75 times a day and this data needs to be kept for statistical analysis. sheet 2 is purely for printing out the individual data once it has been imported into worksheet 1. i need sheet 2 to print out the data automatically when it is entered in sheet 1. i have solved th...

Pivot Tables & not printing blank rows (revisited)
I have an excel file that updates a pivot table when I run a macro. The size of the re-generated pivot table (in the # of rows) can vary depending on the source data. When I print the pivot table, I don't want to print pages and pages of blank rows underneath. I also don't want to have to resize my print area each time. In the past I have avoided this problem by clearing the print area instead of setting a print area. However, if I try to format a large # of rows [background color, text alignment etc] to accomodate a wide ranging pivot table size, excel then assumes that you want ALL o...

Thai collation in SQL for MS CRM 1.2
A number of our Partners have been requesting for double-byte characters such as Chinese, Japanese and Thai languages to be recognized by MS CRM 1.2. Most of their clients have this included in their business requirement. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane....

How to Print Current Page in MS Word 2003?
From File menu, I select Print, then Print Current Page -- instead of printing the page where insertion point is located and blinking which should work, the page before it or the page after it randomly prints out unpredictably (out of control) -- have tried workarounds such as printing page ranges but they are too slow; has anyone seen, and does anyone know how to fix this bizarre twist to a once perfect, marvelous Word feature? -- would value any thoughts? Thank you! ...

Printing attachments
Hi, I'm using outlook 2002, and when printing a sent email message the attachments are not shown. I don't actually need to print the files themselves, I just need the names to appear on the hard copy. We have another pc running office 2000, and it seems to happen automatically. Any suggestions appreciated! Many thanks, Mark ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ...

In Excel Print preview freezes up PC
I have Office 2000 Professional. Whenever I use print pre- view in Excel my system freezes up. What could be causing this? I THINK that last year I had a simular problem and fixed it by somehow deleting a corrupted Office Toolbar file, then rebooting so that the file has to be regenerated. Could that be the solution? If so, what is the name of the file? Thanks. ...

Hook
Hello all i am making a application in which there is a button and a window related to it. if i click on button , window gets shown. if i click any where rather than on window it should gets diappear ..i know that it can be done by HOOK ..but i need some example ..so any one can help me ....thanks in advance. You need to handle the deactivate event for the window and cleanup and destry it ...... why hooks .... "yogi" <yogesh.kalwar@gmail.com> wrote in message news:1160476437.435974.257720@m7g2000cwm.googlegroups.com... > Hello all > i am making a applicat...