Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

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

How to email a report directly from grid

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

    #16
    Re: How to email a report directly from grid

    Originally posted by CharlesParker View Post
    hmm, now I am really stumped and will go back over the process again. I cannot see where I am doing something different than you. I do have the latest build. Are you working in 11?
    I did reply to your pm and showed how I do it.
    have you had any chance to look at it?
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


      #17
      Re: How to email a report directly from grid

      Ok, so now I am sending an email now and the report name and path show up. I get the email with no attachment. The onchange event fires confirmed by the path and I have {session.fileName} as the attachment as per the function.
      So in short I am getting somewhere - I am sending an email (thank you for your help)
      thoughts on the attachment of the session variable not working?
      NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

      Comment


        #18
        Re: How to email a report directly from grid

        Yes I did Ghandi,
        Thank you - I am so close to getting this done as per Jinx method I didnt want to try and wrap my mind around understanding your variables and method. I was going to call you to discuss it but I have been swamped with work/phonecalls this morning as I am quietly modifying my app in the background while on the phone with customers, lol! Wow where does the time go in a day? So far I have skipped breakfast and lunch!
        NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

        Comment


          #19
          Re: How to email a report directly from grid

          All I can figure is it is a path alias issue.
          if the temp fields path contains a path starting with C:
          shouldn't it be https://www.mywebsite.com/folderwith...mp/report.pdf?
          NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

          Comment


            #20
            Re: How to email a report directly from grid

            Originally posted by CharlesParker View Post
            All I can figure is it is a path alias issue.
            if the temp fields path contains a path starting with C:
            shouldn't it be https://www.mywebsite.com/folderwith...mp/report.pdf?
            Yup, but during the debugging process it's going to show as being on your C: because you're running it locally.

            Comment


              #21
              Re: How to email a report directly from grid

              no its returning that value live on the server (the C: path) which is a valid path but again it seems like it should start out as a web address right?
              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

              Comment


                #22
                Re: How to email a report directly from grid

                Jinx,
                in your code
                dim reportName as C
                why do we dim this? I see no use...
                is reportName supposed to be the actual name of the report?

                Like I said earlier
                I can send the email and the path shows up in the field (as a c: path) and the div shows the working message.
                Only problem is I receive the email and no attachment
                I also have watched the temp folder and the report shows up and disappears.
                NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                Comment


                  #23
                  Re: How to email a report directly from grid

                  Hi Charles,

                  I'll admit up front that I skimmed over most of this post.
                  I've run into a problem similar to this, and the bottom line was simply that
                  the server needed a little extra time to prepare the report.

                  Have you tried watching the c:path to confirm the file you want to attach is there before the email is sent ?
                  Gregg
                  https://paiza.io is a great site to test and share sql code

                  Comment


                    #24
                    Re: How to email a report directly from grid

                    Yes, the c path is a temp folder on the server. When I click the button, I watched it and used jing to record it happening (it occurs quickly) the pdf and 2 temp files appear and then disappear! It is a solid 2 seconds before I see a message on my webpage that says the message was sent. When I check my email, the message is indeed sent, including the body of the email that says dear {username} (well my actual username is in it's place) so I know that the email is being sent from the record indeed. The only thing missing is the attachment. so I have been looking at the function to try and figure out what I am doing wrong.
                    I may just revert to the same build as jinx to see if it works in that build as is...
                    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                    Comment


                      #25
                      Re: How to email a report directly from grid

                      I upgraded to the latest build yesterday and everything still works so far. I haven't republished the component though.

                      Yeah, you shouldn't have a problem with the file not existing with this method because the OnChange event in the field in the grid is fired by the xbasic (returned javascript) that created the report.

                      Charles. Can you upload a sample of your component? Possibly using the northwind db? Then we can really see what the problem is maybe.

                      P.S. What type of grid are you trying to do this from and are you using a detail view or not?

                      Comment


                        #26
                        Re: How to email a report directly from grid

                        Originally posted by CharlesParker View Post
                        Jinx,
                        in your code
                        dim reportName as C
                        why do we dim this? I see no use...
                        is reportName supposed to be the actual name of the report?
                        That might have been some orphaned code. I don't remember. It's been a while since I wrote it. These days I've pretty much given up on Alpha being a supposedly "nearly no custom code required solution" and I use a crap load of custom code to do just about everything. Including sending emails. I'll admit though that things have been getting a little better and more powerful with the latest versions.

                        Comment


                          #27
                          Re: How to email a report directly from grid

                          Update. It's the new(er) build I think. It's screwing up adding attachments. My stuff isn't working anymore.

                          It does as you described for me as well. I didn't notice it because it wasn't throwing an error. However, in another area I'm using custom code and that IS throwing an error. The report isn't in the file folder long enough for it to be attached to anything. It goes away before the email can pick it up.

                          I get an error in my custom coded attempt to add an attachment:
                          Fatal error executing ajax callback:.....Type 'Atachment' could not be created. Could not find file.... blah blah blah.

                          Ugh!

                          Comment


                            #28
                            Re: How to email a report directly from grid

                            Just an update, Ghandi was kind enough to take a first hand look at my setup. At this point we have everything working except one thing. The attachment of the file is still not working. The path seems to be an issue as it is a temporary file folder on my server outside of the webroot that shows up in the field for reportname.
                            I found this in some prevoious release notes:(located here: http://downloads.alphasoftware.com/A...easenotes.html)


                            Web Applications - Downloading Files - Temp Folder - Web Project Properties - The Web Project Properties dialog allows you to specify a list of folders from which files can be downloaded. Because support for session folders will be dropped in V12, we have started changing internal code in Alpha Five (such as the Export Chart feature in the Dialog component) to use the Windows temp folder for temporary files that are generated for download, rather than the session folder. As a result of this change, attempting to export a Chart would fail if you had specified a list of allowed download folders in your Project Properties. This was because the list of authorized folders did not include the Windows temp folder. Now, files in the Windows temp folder are authorized for download.


                            so in his V11 his path references a session folder but in mine it is a temp folder.

                            I also created a new report, tried it and that gives me the same response.
                            Not sure whats wrong...especially if it is working for the rest of you.

                            What can I put in the attachment area to test that this functions and it's a report issue? Can I just put a path to an image there and test that?
                            NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                            Comment


                              #29
                              Re: How to email a report directly from grid

                              lol we posted at about the same time
                              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                              Comment


                                #30
                                Re: How to email a report directly from grid

                                I wonder if I should just delete the list of specified allowed folders...I actually added in the temp folder and that didnt work, nor did allowing access to that folder on the server
                                NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                                Comment

                                Working...
                                X