Alpha Video Training
Results 1 to 17 of 17

Thread: Printing contents of List Control

  1. #1
    Member
    Real Name
    Anita Headley
    Join Date
    Jul 2013
    Location
    Olympia, WA
    Posts
    183

    Default Printing contents of List Control

    I can't seem to find a way to print the contents of a List Control. Is this just me not knowing how or is it not possible? (And I don't mean a report with the same query).

  2. #2
    "Certified" Alphaholic TheSmitchell's Avatar
    Real Name
    Sarah
    Join Date
    Apr 2012
    Posts
    1,334

    Default Re: Printing contents of List Control

    Printing to a document? You could generate an HTML report. HTML report is created from the HTML on the page. I've done this with some lists. I wrapped them inside a Container and gave the Container ID to the Action JavaScript to create an HTML report.
    Alpha Anywhere latest pre-release

  3. #3
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,840

    Default Re: Printing contents of List Control

    I don't believe that list controls were meant for printing. (Any more than a grid is meant for printing.) You could certainly print the screen that the list control is on, but that would not print any list items that were off the screen.

    If you want to print, create a report.

  4. #4
    Member
    Real Name
    Anita Headley
    Join Date
    Jul 2013
    Location
    Olympia, WA
    Posts
    183

    Default Re: Printing contents of List Control

    Quote Originally Posted by lgrupido View Post
    I don't believe that list controls were meant for printing. (Any more than a grid is meant for printing.) You could certainly print the screen that the list control is on, but that would not print any list items that were off the screen.

    If you want to print, create a report.
    Actually, it would mean creating 96 reports because I do not know how (if it is even possible) to modify the query and structure of a report on the fly. From my recent research, it appears that I could do this with a List control using a json array (which I CAN modify on the fly).

  5. #5
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,840

    Default Re: Printing contents of List Control

    You'd have to get a lot more specific as to what you are trying to do.

    for instance, you could create a generic table with enough fields to fulfill your needs. Then, you could fill the table on the fly with the report data that you want, using the fields however they were needed.

    Then you wouldn't have to modify the query - you'd always be choosing field1, field2, etc...

    but it really depends on the range of reporting and the differences in the data.

    Perhaps you could get by with only 5 reports instead of 96 in a manner like that.

  6. #6
    Member
    Real Name
    Anita Headley
    Join Date
    Jul 2013
    Location
    Olympia, WA
    Posts
    183

    Default Re: Printing contents of List Control

    Scenario:
    User is allowed to select 1 to 8 text fields and 1 to 6 numeric fields. The text fields become break fields for subtotals if the user selects the "Totals" checkbox. A report must then be constructed that does or does not have breaks with totals and subtotals (according to user choice) and does not have blank columns. I currently put the data in a generic table with 14 fields, but in order to fill the requirement for NO BLANK COLUMNS, I must build a report for every combination of 8 (break fields) x 6 (value fields) x 2 (totals vs no totals). The results must then be saveable to Excel and perhaps printed. I asked about printing because if that was solved, sometimes it seems to be associated with saving to Excel in Alpha.

    This report generator is a major part of my first project which is already behind schedule due to learning new software (Alpha), new languages (JavaScript and Xbasic) and a whole new paradigm (web vs client/server). Any suggestions on alternatives to handle this would be much appreciated; else I will just have to buckle down and build 96 reports and the javascript to call them.

  7. #7
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,840

    Default Re: Printing contents of List Control

    I think if you put everything into a layout table report, and just exported all the data for all the fields each time, that would work for an excel export. Yes, you would have some columns with no data in them but those would be easy for the user to make disappear. And, if you pushed all the data to the left (as in, if they select field 1 and field 8, put all the data for field 8 into field 2) then all the filled fields will be to the left and all the blank columns to the right.

    Ideal? Probably not - but useable until you come up with a better solution.

    As for doing a report, I would turn each row into an html table row, like this:

    select '<tr>' + case when field1 is null then '' else '<td>' + field1 + '</td>' + case when field2 is null then '' else '<td>' + field2 + '</td>' etc. as MyRowData

    That would put your data into a formatted HTML table row structure. (Which is, really, all that Alpha is doing in the list.)

    If you can then import that data into excel, all the better!

    I've done similar things, but not for what you are describing (which sounds like a horrific pain in the ass, BTW.)

  8. #8
    Member
    Real Name
    Leif Erik Buroe
    Join Date
    Dec 2009
    Location
    Norway
    Posts
    45

    Default Re: Printing contents of List Control

    Hi
    Anita Headley
    Have a look at this video “UX_V12—127” do search in the video finder.
    Not sure, it is what you want, but have a look.
    “Printing a report using same filter/ order as a List control”

  9. #9
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,840

    Default Re: Printing contents of List Control

    Though he does need to sort/filter. He actually wants to modify the columns of the report.

  10. #10
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Printing contents of List Control

    Hi Leif,

    I cannot find "UX_V12—127" or “Printing a report using same filter/ order as a List control”. Please can you tell me exactly where to find this video.

    My video library is uptodate.

    TIA.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  11. #11
    Member
    Real Name
    Leif Erik Buroe
    Join Date
    Dec 2009
    Location
    Norway
    Posts
    45

    Default Re: Printing contents of List Control

    Hi
    it look like the video is not there longer but here is a link
    http://www.ajaxvideotutorials.com/V1...ist_filter.swf

  12. #12
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: Printing contents of List Control

    The link is there.
    I found it after using "Printing" as filter.
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  13. #13
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Printing contents of List Control

    Thanks Leif, will study it closely.

    Hi Joe, is this the same as printing from a List in a UX?
    Last edited by Keith Hubert; 06-28-2015 at 07:55 AM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  14. #14
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: Printing contents of List Control

    Keith,

    I don't know, I was merely trying to point out how I found video "UX_V12—127".
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  15. #15
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Printing contents of List Control

    Jo,

    Thanks for the pointer but I don't think this is the same, or is it?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  16. #16
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: Printing contents of List Control

    Keith,

    It is exactly as Leif described in his post #8.
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  17. #17
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Printing contents of List Control

    Jo,

    I must learn to pay better attention. This is exactly the correct video that Anita needed.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

Similar Threads

  1. Filterin a list control on a field in the list control
    By Anis in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 04-29-2015, 05:43 PM
  2. padding around static text defined control for list control recordcount
    By kingcarol in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-16-2014, 08:37 PM
  3. Is there a way to List Folder Contents?
    By coleresources in forum Application Server Version 11 - Web/Browser Applications
    Replies: 13
    Last Post: 10-25-2013, 06:22 PM
  4. List directory contents
    By dfricke10 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 01-02-2012, 04:51 PM
  5. Disabling the contents of TEXT AREA CONTROL which is having HTML options
    By robert brown in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 10-20-2008, 07:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •