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

A12 Report problems

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

    A12 Report problems

    Hi everyone

    we have a project written in a5 v11, that loads reports on web pages, this is done so the reports can by dynamic as opposed to being off a button

    We are testing this app in v12 and have a problem when doing the above.

    Our xbasic code opens up a sql table and gets a path to the report that is in the database , so in a11 for example we have

    invoice_email_wtm_man@c:\a5webroot\l...ravelcloud.alb

    When we try to run the some code in V12, we receive an error saying path not found ..., how can I reference the v12 project reports

    thanks in advance

    john

    #2
    Re: A12 Report problems

    If you are using projectreports then the reports are not in the alb anymore but are separate files.

    hth

    Pieter

    Comment


      #3
      Re: A12 Report problems

      Hi Pieter

      Thanks for the reply, I understand that the reports are all now separate and in the example above, I have a report called
      invoice_email_wtm_man.a5prt

      We have tried to use that filename along with a host of others but just do not seem to be able to get it right, in my example would you know what we should be looking for ?

      thanks

      john

      Comment


        #4
        Re: A12 Report problems

        I guess I don't understand what you are trying to do? You can have code with branching and decision making and print whatever report you want. Not sure why you need a path to the report?
        Peter
        AlphaBase Solutions, LLC

        [email protected]
        https://www.alphabasesolutions.com


        Comment


          #5
          Re: A12 Report problems

          Hi Peter
          We need to do it this way because there are separate report layouts depending on what department the user is connected to...

          So we have to get the path to the report dynamically when we run the code.., the working in a11 is this, with the variable layout set as the path above...


          dim pdfopts as p

          dim source as c

          Dim filename as c = Request.GetRequestTempFileName("pdf")

          filename = report.saveas(layout,"pdf","","",Source,.f.,"",NULL_VALUE(),opts)

          ' filename = report.saveas(layout,"pdf",filter,order,filename,.f.,opts)

          if file.exists(filename)
          Session.SaveDataAsFile("tempreport.pdf",file.to_blob(filename))
          Response.Redirect( Session.FormatFileDataURL("tempreport.pdf") )
          end if

          cn.close(connection)

          So i think we just need to figure out the v12 syntax ?

          thanks

          john

          Comment


            #6
            Re: A12 Report problems

            I think your first step needs to be placing a debug(1) at the beginning of your function then stepping through it. When you get to the point of failure you'll get an error message. You can also explore the different elements of your function while in debug.

            Alternatively you can import your reports from the workspace dictionary. In V12 reports can be individual components, if you will, and published separately. You can then just use action javascript to run reports however you need.

            Ashampoo_Snap_Friday, May 18, 2018_09h45m07s_009_.png

            Ashampoo_Snap_Friday, May 18, 2018_09h45m40s_010_.png
            Mike Brown - Contact Me
            Programmatic Technologies, LLC
            Programmatic-Technologies.com
            Independent Developer & Consultant​​

            Comment


              #7
              Re: A12 Report problems

              I am hoping that this is the right place for my problem of running an Alpha Five v.10.5 web application on Alpha Anywhere.


              My problem is in the web components (dialog) with the following xbasic code in the AfterValidate event. I have tried creating new dialog component from the legacy dialog component with limited success. I am also aware that session.session_folder function is not available in Alpha Anywhere. I have tried solutions offered by both Richard and others on this forum but so far with no success.

              I would appreciate it if someone can help in converting the below five lines of code so that it would give the desired result in Alpha Anywhere.

              filename = session.session_folder + chr(92) + "r6.pdf"
              filename = report.saveas("by30daysmortality@<adb_path>\amputee.set", "pdf", filter, order, filename,.f.)
              if file.exists(filename)
              currentform.RedirectTarget = session.session_url + "r6.pdf?" + rand_string(5)
              end if

              Comment


                #8
                Re: A12 Report problems

                Raj, this is the version 12 part of the forum.

                Here is the version 10 section: https://www.alphasoftware.com/alphaf...r-Applications
                Mike Brown - Contact Me
                Programmatic Technologies, LLC
                Programmatic-Technologies.com
                Independent Developer & Consultant​​

                Comment


                  #9
                  Re: A12 Report problems

                  Hi Mike

                  Yes, I am aware this is V12 thread. My question was regarding porting across a web component written in V10.5 into V12.

                  Comment


                    #10
                    Re: A12 Report problems

                    If your reports are "Project Reports" defined in the Web Projects Control Panel, the reports are published to the webroot. I note from an example I have in one of my apps that you need to pass the fully qualified filename as the "Layout_Name" argument. This appears to be undocumented so I'm not sure how I figured it out...

                    Based on your example, this would be as follows:

                    Code:
                    dim pdfopts as p
                    
                    dim source as c
                    
                    dim layout as c
                    
                    Dim filename as c = Request.GetRequestTempFileName("pdf")
                    
                    layout = "C:\A5Webroot\invoice_email_wtm_man.a5rpt"
                    
                    filename = report.saveas(layout,"pdf","","",Source,.f.,"",NULL_VALUE(),opts)
                    However review of the current documentation identifies that there is now web specific functions available that do mention that the layoutname needs to be fully qualified.

                    Suggest using a5w_report_saveas() function moving forward though the above technique is still working for my application with the current release.
                    https://www.alphasoftware.com/docume...20Function.xml

                    Comment


                      #11
                      Re: A12 Report problems

                      Thank you Jason for your reply.

                      My reports are not project reports. My web application is based on a dbf and not sql database. In Alpha V12, I can open my reports from the Control Panel but not with xbasic code from within a web component.

                      Essentially what I am looking for is to replace the following xbasic code which works in my Alpha Five v10.5 web application but not in Alpha V12.

                      filename = session.session_folder + chr(92) + "r6.pdf"
                      filename = report.saveas("by30daysmortality@<adb_path>\amputee.set", "pdf", filter, order, filename,.f.)
                      if file.exists(filename)
                      currentform.RedirectTarget = session.session_url + "r6.pdf?" + rand_string(5)
                      end if

                      Any help will be much appreciated.

                      Regards and thanks

                      Raj

                      Comment

                      Working...
                      X