NetTalk Central

Author Topic: c8/nt6.14 Using New Radio as buttons  (Read 2996 times)

hilton

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
c8/nt6.14 Using New Radio as buttons
« on: January 15, 2012, 07:00:45 PM »
Hi folks,

I have used the new looking Radio control along with an initially hidden drop down, to allow the user to choose a radio button option and on selection make the drop down visible with an appropriate question.  The drop down has OK?|Yes|No as it's options(acting as a confirmation) and as soon as the choice is made the drop down and it's prompt disappear.  The combination works very well and is pleasing to the eye(mine at least).  To the user it looks like clicking a button,  a confirmation question appears, confirmation is given or denied and the confirmation disappears.  It works fine, however, one of the options is to print(in this case a GOODS INWARDS COUNTING SHEET).  What I do not know how to do is to open a new _blank tab and have the print preview appear therein.  I can run the report ok but the print preview appears on the webserver.

Could someone tell me how I can get the result I desire, please? 

Using the normal BUTTON is ok because the effect is all wrapped up in the template.  If push comes to shove, I will remove the print option from the Radio Button and set up a BUTTON to do the print - but I really do not want to.

Thanks in advance,
Hilton.

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: c8/nt6.14 Using New Radio as buttons
« Reply #1 on: January 15, 2012, 07:34:15 PM »
Hi Hilton,

You really need to create a PDF or HTML report. I use HTML as my "Preview format" as it tends to run a lot quicker and can display in a blank tab without going via the browser download page (although you might be able to by pass this with the right browser settings). I use a report engine that allows me to do both so it is no effort on my part creating PDF or HTML.

You can probably figure this out looking at the examples. I don't think your probs are to do with the radio button.

Let me know if you get stuck.

Cheers,

Kevin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: c8/nt6.14 Using New Radio as buttons
« Reply #2 on: January 15, 2012, 09:12:32 PM »
I agree with Kevin.

Hilton, note the _preview_ can't appear in the browser. what can appear in the browser is only the PDF or HTML etc.
So your report needs to skip over the preview, and go straight to generating the correct output.

See the docs, and especially the examples, on reports.

cheers
Bruce

hilton

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: c8/nt6.14 Using New Radio as buttons
« Reply #3 on: January 16, 2012, 04:38:33 AM »
Hi Kevin and Bruce,

Many thanks for your replies, however, I probably did not describe the situation clearly.

1. I have added a button to the form that contains the RadioButtons/Drop Down and when clicking the new button the report pdf is created fine and appears in it's own browser tab - no problems.

2. I really like the new Radio buttons and I have used them just like normal buttons to initiate various actions.  When one of the Radio Options are chosen an initailly hidden drop down appears and it's prompt contains the text for the user and in the drop down is OK?|Yes|NO which gives the YES/NO confirmation.  This is really great and I think it looks good!

3. What I want to do in the code below is:
     if loc:ActionConfirmation = 1 then                    !Yes has been chosen from the drop down
        case p_web.gsv('loc:ReqAction')    !these are the radio selections
        of 'Update'
           PoGinWorkUpd(p_web,p_web.gsv('loc:ginSelectedPo'))
        of 'Clear'
           PoGinWorkClear(p_web.gsv('loc:ginSelectedPo'))
        of 'CreateGi'
           PoGinCreate(p_web.gsv('loc:ginSelectedPo'))
        of 'PrintGis'
--------------------------------------->in here put code that will run the print procedure PoGinPrintGis
---------------------------------------> and produce the PDF just like the button does in
--------------------------------------->it's own browser tab.
        end
     end

My desire is to be able to get rid of the BUTTON which works fine (because the template wraps everything up fine) and replace it with some code above.  It would be ok to hide the button and somehow send it an event to emulate the click.

I hope that is clearer.  If what I am asking cannot be done, so be it.

Thank you for your time.

Bye,
Hilton.