Alpha Video Training
Results 1 to 5 of 5

Thread: Selecting individual records to print

  1. #1
    Member
    Real Name
    Mary Anne Colucci
    Join Date
    Mar 2006
    Posts
    52

    Default Selecting individual records to print

    I am using a web page to select and print a pdf report. I am trying to select and print individual delivery tickets. I select the delivery ticket, but all of them come up to print. How can I limit the printing to only the records I have selected? I have followed the directions in the "Printing Reports" section, but I still end up with all the records ready to print.

    Thank you

    Mary Anne

  2. #2
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,630

    Default

    Quote Originally Posted by mcolucci
    I am using a web page to select and print a pdf report. I am trying to select and print individual delivery tickets. I select the delivery ticket, but all of them come up to print. How can I limit the printing to only the records I have selected? I have followed the directions in the "Printing Reports" section, but I still end up with all the records ready to print.

    Thank you

    Mary Anne
    How are you "selecting" the records? Are you changing a field value, then submitting the changes? And, how about showing us the Xbasic you're using to apply the filter?

    Finally, you should post web questions in the appropriate forum. You'll get more and faster responses.
    -Steve


  3. #3
    Member
    Real Name
    Mary Anne Colucci
    Join Date
    Mar 2006
    Posts
    52

    Default Selecting records to print

    Thank you Steve

    I am a newbie and working my way through this.

    I inserted this code into the after validate line on Form properties

    If eval_valid("sold") = .f. Then
    goto skipreport
    end if

    dim filter as C
    dim order as C
    dim ticket as C
    dim filename as C

    'since sold is a multi-select DropDownBox, it is actually an array that contains the selected values.
    ticket = sold.dump(ticket)
    ticket = remove_blank_lines(ticket)
    ticket = *for_each(x,"Delivery_Ticket_Number =" + quote(x),ticket)
    filter = stritran(alltrim(ticket), crlf()".or.")
    Order = ""

    filename = session.session_folder + chr(92) + "tempreport.pdf"
    filename = report.saveas("Delivery Tickets@[PathAlias.ADB_Path]\Delivery Tickets link set.set","pdf",filter,order,filename,.f.)

    if file.exists(filename)
    currentform.RedirectTarget=session.session_url + "tempreport.pdf?" + rand_string(5)
    end if
    skipreport:

    I am using the drop down box to select records and print them.

    Thank you for your help.

    Mary Anne

  4. #4
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,630

    Default

    Filters need to be logical expressions, and I don't think you have one. For example, if your variable is vTicket and your field vaue is Ticket, then a logical expression would be something like

    Code:
    filter = "Ticket = '" + vTicket + "'"
    -Steve


  5. #5
    Member
    Real Name
    Mary Anne Colucci
    Join Date
    Mar 2006
    Posts
    52

    Default Selecting records to print

    Hello Steve,

    My Variable in the database is Delivery_Ticket_Number and I am putting the value into ticket. From there I am selecting a new ticket. I am not sure how to write the expression. I followed what Aplha Five recommended in their printing reports section. Can you help me?

    Thanks

    Mary Anne

Similar Threads

  1. Is it possible to filter individual records in a report?
    By Rich Hartnett in forum Alpha Five Version 7
    Replies: 5
    Last Post: 04-01-2006, 05:29 PM
  2. Selecting Records to Print
    By Charles Hoens in forum Alpha Five Version 6
    Replies: 9
    Last Post: 12-30-2005, 12:52 PM
  3. Selecting records for Print
    By Rick Hamilton in forum Alpha Five Version 4
    Replies: 3
    Last Post: 06-23-2002, 10:55 AM
  4. SELECTING RECORDS TO PRINT
    By Mark Donnison in forum Alpha Five Version 4
    Replies: 2
    Last Post: 10-30-2001, 09:16 PM
  5. Selecting Primary Index at Report Print TIme
    By Jimmy Johnson in forum Alpha Five Version 4
    Replies: 3
    Last Post: 07-27-2000, 01:22 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
  •