Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Script help.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script help.

    Al and other still having two problems with my script.
    1) report comes back with a pop-up and asks do I want to refresh "Yes" or "NO" .
    2) The report populates the email all looks good , however, the email is waiting for me to hit the send button can this be automated?

    Here she is.

    'Refresh data in Passive-Link table(s)

    DIM tableList as c
    tableList = <<%txt%
    item
    iteminventory%txt%
    dim count as n
    count = line_count(tableList)
    dim i as n
    dim pr as p
    dim table_i as c
    for i = 1 to (count)
    table_i = word(tableList,i,crlf())
    pr =a5_RefreshPassiveLinkTable(table_i,.f.,.f.)
    if pr.error = .t. then
    ui_msg_box("Error","Table data was not refreshed: '" + table_i + "'." + crlf(3) + "Error reported was: " + crlf()+pr.errorText,UI_STOP_SYMBOL)
    end if
    next i

    'Send a report, label, letter, form or browse layout as an attachment to an e-mail message. You can specify which records to send.

    query.filter = ""
    query.order = ""

    to_param = a5_eval_expression("jmucci@rochemintl.com",local_variables())
    cc_param = a5_eval_expression("zlingner@rochemintl.com",local_variables())
    bcc_param = a5_eval_expression("",local_variables())
    subject_param = a5_eval_expression("File from Night time",local_variables())
    message_param = a5_eval_expression("worked",local_variables())


    :Report.Send("JoAnn 2","PDF",query.filter,query.order,"default",to_param,subject_param,message_param,cc_param,bcc_param)

    Thanks John

  • #2
    Re: Script help.

    <object>.send()
    http://support.alphasoftware.com/alp...SEND%28%29.htm

    Note : This method requires that the user press the Send key to complete the transmission. as a result <OBJECT>.SEND()is not appropriate for use in web applications. To send a report as an attachment without user interaction, create the attachment with REPORT.SAVEAS() and send it with EMAIL_SEND() or EMAIL_SEND2().
    Andrew

    Comment


    • #3
      Re: Script help.

      Thank you for the quick reply
      However do I just replace the line to read this way;

      :Report.Send("JoAnn 2","PDF",query.filter,query.order,"default",to_param,subject_param,message_param,cc_param,bcc_param)

      <object>.send("JoAnn 2","PDF",query.filter,query.order,"default",to_param,subject_param,message_param,cc_param,bcc_param)


      Thanks
      John

      Comment


      • #4
        Re: Script help.

        Create the attachment with REPORT.SAVEAS() and send it with EMAIL_SEND() or EMAIL_SEND2().
        Andrew

        Comment


        • #5
          Re: Script help.

          Thanks I'm given it a shot again
          Here is the code and the error.

          'Date Created: 25-Jan-2011 02:29:22 PM
          'Last Updated: 25-Jan-2011 02:29:22 PM
          'Created By : jmucci
          'Updated By : jmucci
          'Save a report, label, letter, form or browse to an Acrobat, Rich Text, HTML or Plain Text file. You can specify which records to save.

          query.filter = ""
          query.order = ""



          :Report.SaveAs("JoAnn 2","PDF",query.filter,query.order,"C:\Documents and Settings\jmucci\My Documents\Joann2",.F.)

          'Send files via e-mail.
          param_to = "Jmucci@rochemintl.com"
          param_subject = "Inventory Report"
          param_cc = ""
          param_bcc = ""
          attachment_list = <<%a%
          C:\Documents and Settings\jmucci\My Documents\Joann2.pdf
          %a%

          param_message = "See attached files: "+crlf()+attachment_list
          param_attachments = attachment_list
          'Send the e-mail message directly - do not open the Alpha Five e-mail client
          send_result = email_send(parm_to,param_subject,param_message,param_attachments,param_cc,param_bcc)
          if send_result <> 1 then
          ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
          end if

          This is the error.

          Script:Joann 2 New Line:26
          send_result = email_send(parm_to, param_attachments)
          Variable "parm_to" not found

          Comment


          • #6
            Re: Script help.

            John

            Looks like a small error in action scripting..

            Code:
            param_to = "Jmucci@rochemintl.com"
            
            Script:Joann 2 New Line:26
            send_result = email_send(parm_to, param_attachments)
            Variable "parm_to" not found
            Notice the missing 'a' in param_to vs parm_to

            Right click the action script - convert to xbasic and then edit parm_to to param_to

            In the meantime, we'll get the tech team to fix that....
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.

            Comment


            • #7
              Re: Script help.

              Al that was me not the tech team.

              Here is the new srcipt same problem though.

              'Save a report, label, letter, form or browse to an Acrobat, Rich Text, HTML or Plain Text file. You can specify which records to save.

              query.filter = ""
              query.order = ""



              :Report.SaveAs("JoAnn 2","PDF",query.filter,query.order,"C:\Documents and Settings\jmucci\My Documents\Joann2",.F.)

              'Send files via e-mail.
              param__to = "Jmucci@rochemintl.com"
              param_subject = "Inventory Report"
              param_cc = ""
              param_bcc = ""
              attachment_list = <<%a%
              C:\Documents and Settings\jmucci\My Documents\Joann2.pdf
              %a%

              param_message = "See attached files: "+crlf()+attachment_list
              param_attachments = attachment_list
              'Send the e-mail message directly - do not open the Alpha Five e-mail client
              send_result = email_send(param_to,param_subject,param_message,param_attachments,param_cc,param_bcc)
              if send_result <> 1 then
              ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
              end if
              Last edited by jtm311; 01-25-2011, 04:01 PM.

              Comment


              • #8
                Re: Script help.

                Al

                I got it. You will have to talk with the tech team.. It is adding an extra space in this line param__to See it :)

                John

                Comment


                • #9
                  Re: Script help.

                  BTW Al or others do you see anyway to remove the second refresh. The first one runs silent, however, I'm getting a second pop up asking me to refresh the data.

                  Thanks
                  John

                  Comment


                  • #10
                    Re: Script help.

                    Al,

                    Great Webinar today, however, I may have missed a step. Below is the standard Script, did I have to add anything additional to the script because she still asked to refresh the table, even though we changed it from a passive link table.

                    'Date Created: 31-Jan-2011 10:34:14 AM
                    'Last Updated: 03-Feb-2011 04:15:36 PM
                    'Created By : jmucci
                    'Updated By : jmucci
                    '

                    query.filter = ""
                    query.order = ""

                    :Report.SaveAs("Inventory On Hand","PDF",query.filter,query.order,"C:\Documents and Settings\jmucci\My Documents\InventoryOnHand.pdf",.F.)

                    'Send files via e-mail.
                    param_to = "salesdoc@f01.ihostsharepoint.com"
                    param_subject = "Inventory"
                    param_cc = ""
                    param_bcc = ""
                    attachment_list = <<%a%
                    C:\Documents and Settings\jmucci\My Documents\InventoryOnHand.pdf
                    %a%

                    param_message = "See attached files: "+crlf()+attachment_list
                    param_attachments = attachment_list
                    'Send the e-mail message directly - do not open the Alpha Five e-mail client
                    send_result = email_send(param_to,param_subject,param_message,param_attachments,param_cc,param_bcc)
                    if send_result <> 1 then
                    ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
                    end if

                    a5.Close()

                    Comment


                    • #11
                      Re: Script help.

                      I don't see a call to the import operation...

                      Does that get called from somewhere else?

                      Check the icon on the table to see if it shows a passive link or not..
                      Al Buchholz
                      Bookwood Systems, LTD
                      Weekly QReportBuilder Webinars Thursday 1 pm CST

                      Occam's Razor - KISS
                      Normalize till it hurts - De-normalize till it works.
                      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                      When we triage a problem it is much easier to read sample systems than to read a mind.

                      Comment


                      • #12
                        Re: Script help.

                        Sorry All did not get notified that I had an answer.

                        Here is the correct code. It does refresh and import the records, however, stops at the same point and asks me to refresh before sending. Yes the link is not red.

                        'Date Created: 31-Jan-2011 10:34:14 AM
                        'Last Updated: 08-Feb-2011 11:49:25 AM
                        'Created By : jmucci
                        'Updated By : jmucci
                        '
                        'Run a saved 'Import' operation: 'ImpItemInventory'.
                        query.filter = ".t."
                        query.order = ""

                        DIM operation_name as c
                        operation_name = "ImpItemInventory"
                        If operation_name <> "" then
                        import.run_silent(operation_name)
                        End if


                        :Report.SaveAs("Inventory On Hand","PDF",query.filter,query.order,"C:\Documents and Settings\jmucci\My Documents\InventoryOnHand.pdf",.F.)

                        'Send files via e-mail.
                        param_to = "salesdoc@f01.ihostsharepoint.com"
                        param_subject = "Inventory"
                        param_cc = ""
                        param_bcc = ""
                        attachment_list = <<%a%
                        C:\Documents and Settings\jmucci\My Documents\InventoryOnHand.pdf
                        %a%

                        param_message = "See attached files: "+crlf()+attachment_list
                        param_attachments = attachment_list
                        'Send the e-mail message directly - do not open the Alpha Five e-mail client
                        send_result = email_send(param_to,param_subject,param_message,param_attachments,param_cc,param_bcc)
                        if send_result <> 1 then
                        ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
                        end if

                        a5.Close()

                        Comment


                        • #13
                          Re: Script help.

                          Sorry All did not get notified that I had an answer.

                          Here is the correct code. It does refresh and import the records, however, stops at the same point and asks me to refresh before savinf the file. Yes the link is not red.

                          'Date Created: 31-Jan-2011 10:34:14 AM
                          'Last Updated: 08-Feb-2011 11:49:25 AM
                          'Created By : jmucci
                          'Updated By : jmucci
                          '
                          'Run a saved 'Import' operation: 'ImpItemInventory'.
                          query.filter = ".t."
                          query.order = ""

                          DIM operation_name as c
                          operation_name = "ImpItemInventory"
                          If operation_name <> "" then
                          import.run_silent(operation_name)
                          End if


                          :Report.SaveAs("Inventory On Hand","PDF",query.filter,query.order,"C:\Documents and Settings\jmucci\My Documents\InventoryOnHand.pdf",.F.)

                          'Send files via e-mail.
                          param_to = "salesdoc@f01.ihostsharepoint.com"
                          param_subject = "Inventory"
                          param_cc = ""
                          param_bcc = ""
                          attachment_list = <<%a%
                          C:\Documents and Settings\jmucci\My Documents\InventoryOnHand.pdf
                          %a%

                          param_message = "See attached files: "+crlf()+attachment_list
                          param_attachments = attachment_list
                          'Send the e-mail message directly - do not open the Alpha Five e-mail client
                          send_result = email_send(param_to,param_subject,param_message,param_attachments,param_cc,param_bcc)
                          if send_result <> 1 then
                          ui_msg_box("Error","E-mail message was not sent.",UI_STOP_SYMBOL)
                          end if

                          a5.Close()

                          Comment


                          • #14
                            Re: Script help.

                            John

                            Are there any other tables in the set that the report is built on?

                            If so, are they still passive linked tables?
                            Al Buchholz
                            Bookwood Systems, LTD
                            Weekly QReportBuilder Webinars Thursday 1 pm CST

                            Occam's Razor - KISS
                            Normalize till it hurts - De-normalize till it works.
                            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                            When we triage a problem it is much easier to read sample systems than to read a mind.

                            Comment


                            • #15
                              Re: Script help.

                              All I thought you had for a minute there was a second table I added it to the operation we wrote, however still the same result. Both tables show no link.
                              John

                              Comment

                              Working...
                              X