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

HTML Reports for web applications - How?

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

    #16
    Re: HTML Reports for web applications - How?

    It is a bug, but here is a simple work around that I got from Selwyn:

    1. add code similar to this at the start of the page:

    dim cs as c
    cs = _A5_AlphaDAO_ConnectionStrings.get("mysql_alphasports_v11_2")


    2. and change the 'source' line like this:

    dim htmlReportDef as c
    htmlReportDef = <<%html%
    <!--A5Report::Report
    source=SQL:__cs__
    select=SELECT CUSTOMER_ID, FIRSTNAME, LASTNAME, BILL_CITY FROM customer-->
    <style>
    <!--

    3. then add this code just before the rg.load() command:

    htmlReportDef = stritran(htmlReportDef,"__cs__",cs)
    rg.Load(htmlReportDef)

    I tried it and it works.
    - Dan Hooley
    - Custom Desktop or Web database development -

    Comment


      #17
      Re: HTML Reports for web applications - How?

      That's strange. I wonder why it works for me. I use the following connection string:

      source=SQL:::Name::SQL Server 2008

      Maybe its because I am running in Live Preview and not in Published mode.

      Comment


        #18
        Re: HTML Reports for web applications - How?

        Don't know, but I was running into it in published mode.

        Next question:
        I'm opening this report (now in an a5w page) in a popup ajax window. Any ideas how to print the report from that popup window?
        - Dan Hooley
        - Custom Desktop or Web database development -

        Comment


          #19
          Re: HTML Reports for web applications - How?

          If you're using the Action Javascript routine to open the window, you can add custom buttons at the bottom of the window. I think you can use “window.print()” to print the contents of the window.

          Comment


            #20
            Re: HTML Reports for web applications - How?

            That works great, except that it prints the WHOLE page, not just the contents of the popup window. Tried "this.print();", but didn't do anything.
            - Dan Hooley
            - Custom Desktop or Web database development -

            Comment


              #21
              Re: HTML Reports for web applications - How?

              Sorry, but I think that's about as far as I had got too. I remember making progress by adding a "Print" button and getting it to print something, but I was still was not happy with the results. Let me know if you get any further.

              Comment


                #22
                Re: HTML Reports for web applications - How?

                This is the best solution I could find. The only thing I don’t like is that a temporary browser window displays. It closes automatically after you close the Print Dialog. Create a Print button and add the following code in the Button Definition:

                var iFrame = document.getElementById('A5dlg0.BODY');
                var iFrameBody;
                if (iFrame.contentDocument)
                { // FireFox
                iFrameBody = iFrame.contentDocument.getElementsByTagName('html')[0];
                }
                else if (iFrame.contentWindow)
                { // IE
                iFrameBody = iFrame.contentWindow.document.getElementsByTagName('html')[0];
                }

                var wnd = window.open('', '', 'width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes');
                wnd .document.writeln(iFrameBody.innerHTML);
                wnd .document.close();
                wnd .focus();
                wnd .print();
                wnd .close();

                Please let me know if you come up with something better.

                Thanks

                Comment


                  #23
                  Re: HTML Reports for web applications - How?

                  That's a nice step forward! I hadn't worked on it anymore - been busy with other things.

                  Is it possible to hide the window as part of the specs? Like: display:none

                  I'll see what else I can find and post it here.

                  Thanks for sharing that.
                  - Dan Hooley
                  - Custom Desktop or Web database development -

                  Comment


                    #24
                    Re: HTML Reports for web applications - How?

                    In my first attempt, I was able to print just the IFrame without a new browser window popping up, but it only printed the visible part and also printed the scroll bars and frame outline. I looked everywhere for an example of hiding the browser window and tried many different things, but could not figure out a way to make it hidden. There is nothing special about the browser window attributes I used in the window.open function above. I tried setting the window position and dimensions so it would display off the visible screen, but the print dialog appeared in the lower right hand corner. When I clicked the button to Print, I think FF re-displayed the new window back in the visible area for a second and then it disappeared when window.close was called.

                    Comment


                      #25
                      Re: HTML Reports for web applications - How?

                      Found a simple solution!

                      If you use action javascript to open the a5w page and define a window button to print the report, like we discussed previously, this code in the button will print the contents of the window:
                      Code:
                      var id = this.getWindowId('body');
                      $(id).contentWindow.print();
                      This works for me in firefox, haven't tried it in other browsers.
                      - Dan Hooley
                      - Custom Desktop or Web database development -

                      Comment


                        #26
                        Re: HTML Reports for web applications - How?

                        Thanks. This works much better with FF, Chrome and Safari, but IE and Opera are printing the entire page.

                        Comment


                          #27
                          Re: HTML Reports for web applications - How?

                          Had a javascript buddy look into this and here's what he found that works in ie:

                          Code:
                          var id = this.getWindowId('body');
                          if(jQuery.browser.msie) {
                          	$(id).contentWindow.document.execCommand('print',false,null);
                          } else {
                          	$(id).contentWindow.print();
                          }
                          Not sure about Opera...
                          - Dan Hooley
                          - Custom Desktop or Web database development -

                          Comment


                            #28
                            Re: HTML Reports for web applications - How?

                            Thanks. Works for all browsers except Opera. I tried the following to see what would happen:

                            Code:
                            if(jQuery.browser.msie || jQuery.browser.opera)
                            I didn't get any errors, but nothing printed out.

                            Comment

                            Working...
                            X