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

Adding blank rows to report

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

    Adding blank rows to report

    First let me say that I DO try to search the forum before posting the question.

    Second, everybody here is awesome.

    I am trying to clone a paper form. Actually, my organization frowns on cloning forms, but I get away with it because usually I can make such a good copy. WordPerfect works extremely well. However, WordPerfect's relational database capabilities are nil.

    I need to have 14 rows per page. If I don't have enough records, I need to "pad" the report to make the total rows equal 14. With WordPerfect, I simply added blank records to the data table, to make the total records a multiple of 14.

    The problem with the whole WordPerfect approach was that I was handling batches of records that were in separate tables. With Alpha5 I want to have a true database, containing all the records together.

    I know that I could create a temporary table that contains my desired records and add blank records to create a multiple of 14. But this is essentially the same as the old WordPerfect approach. Is there a better way that doesn't involve creating a temporary table?

    #2
    RE: Adding blank rows to report

    Hi Mark,

    First off, I confess I am not awesome but I will still try and help if I can.

    Are you trying to merge two tables and you want to make sure there is always 14 records in the second table? Or is it that you want to have 14 rows because that is your paper size? Please let me know.

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


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

    Comment


      #3
      RE: Adding blank rows to report

      Hi,

      The form must have fourteen rows on each page. Even if the last ones are blank. Basically think of filling out a paper form, but I want Alpha to print out the form. Essentially it's just one table.

      Another clunky idea I thought of is that I can scan the table part of the form and print on top of the image, but the image file would occupy a lot of memory and slow printing. I am hoping for a programming solution without generating any additional tables.

      Thanks,

      Mark

      Comment


        #4
        RE: Adding blank rows to report

        I seem to remember this coming up on the Alpha Five Version 4 forum. Try searching in that forum on:
        report blank row

        Comment


          #5
          RE: Adding blank rows to report

          Mark,

          What do you maen by:

          >>The form must have fourteen rows on each page. Even if the last ones are blank.
          TYVM :) kenn

          Knowing what you can achieve will not become reality until you imagine and explore.

          Comment


            #6
            RE: Adding blank rows to report

            Yes, it has been discussed on this board. I searched using 'report and lines' and found this thread. Haven't read it but it may lend a suggestion or 2.

            RE: Fixed length detailed reports
            TYVM :) kenn

            Knowing what you can achieve will not become reality until you imagine and explore.

            Comment


              #7
              RE: Adding blank rows to report

              Mark,

              What happens if you have *more* than 14 records. Do you print two reports the first with 14 and the second with the rest?

              Anyway, I would reconsider the temp table route. It would not have to be like Word Perfect. That is, the whole thing could be invisible to the user who would specify the print range in your data table and press a button.

              The button would run code to
              -empty the temp table;
              -append the records to print;
              -add enough blank records to total 14
              -print a report which you have previously defined for the temp table.

              The only drawback is you have this temp table hanging around which is used only for printing but which users never see. In other words, no big deal.

              Sometimes printing from an intermediate table can be a big help as you can efficiently preprocess the data before the report sees it.

              Bill
              Bill Hanigsberg

              Comment


                #8
                RE: Adding blank rows to report

                Mr Hanigsberg, you are a smart cookie. the stuff you see and comment on is fantastic to say the least. Thanks for all you 'STUFF'

                Comment


                  #9
                  RE: Adding blank rows to report



                  William Hanigsberg wrote:
                  -------------------------------
                  Mark,

                  What happens if you have *more* than 14 records. Do you print two reports the first with 14 and the second with the rest?

                  *YES


                  Anyway, I would reconsider the temp table route. It would not have to be like Word Perfect. That is, the whole thing could be invisible to the user who would specify the print range in your data table and press a button.

                  *SIGH, I was afraid I would have to do this. I thought maybe there might be a function or something.

                  The button would run code to
                  -empty the temp table;
                  -append the records to print;
                  -add enough blank records to total 14
                  -print a report which you have previously defined for the temp table.


                  *YES, I thought of that approach, but was trying to avoid that route. I do this already with an import from a spreadsheet file.

                  The only drawback is you have this temp table hanging around which is used only for printing but which users never see. In other words, no big deal.

                  Sometimes printing from an intermediate table can be a big help as you can efficiently preprocess the data before the report sees it.

                  Bill

                  Comment


                    #10
                    RE: Adding blank rows to report

                    Thanks. I was dumb and went to the Version 4 board before realizing that YOU were talking about this board.

                    The user in the previous post (as usual) thought of a third approach.

                    He printed a blank form with Alpha 5 and then reprinted on top of that form. Kinda like printing on top of the bitmap image, but would use less memory. Inconvenient, however.

                    Well, at least I am not the only one who wants this functionality. pad_row(total rows). Looks like the old WordPerfect approach wins (temp table).

                    Comment


                      #11
                      RE: Adding blank rows to report

                      Mark:
                      I do this with my timesheets and purchase order apps.
                      I do it thru Xbasic code.
                      for Po's I need my records to print 1 Po per page or 2 pages if the linecount is more than 14.
                      It takes a about 10 seconds longer because it runs the xbasic code but it does fill up the page.
                      If the PO has 5 lines, then it pints 5 lines filled in and 9 blank lines.
                      see code below
                      charlie crimmel

                      when the user selects print

                      ''XBasic
                      ' Check for 14 records in printdetail
                      ' --------------------------------------------------------
                      dim global linenumber as n
                      dim global ponumber1 AS C
                      var->linnumber = 0

                      message.text = "Check 14 Print Detail"
                      tbl = table.open("podetail.dbf")
                      tbl.fetch_last()
                      record = tbl.recno()
                      var->ponumber1 = tbl.ponumber
                      var->linenumber = tbl.recno()+1

                      while record linenumber,2)
                      tbl.ponumber = trim(var->ponumber)
                      tbl.enter_end(.T.)
                      record = record + 1
                      var->linenumber = var->linenumber +1
                      end while
                      tbl.close()

                      Comment


                        #12
                        RE: Adding blank rows to report

                        That's a good idea. I have a question, though. What happens to all the blank records you accumulate each time you run a print job? Do you have a routine to purge them?

                        Bill

                        I always figured someone would show us a way to do the report without an extra table!
                        Bill Hanigsberg

                        Comment


                          #13
                          RE: Adding blank rows to report

                          I recently did a report that needed to pad up to a certain number of lines, and did not find a solution. but reading this thread gives me an idea that I have not tried.

                          Subreports is the way to go. In the detail section, one subreport prints the actual lines that exist in the data. Make the height of the subreport "field" in the main report small. It will expand at print time. A calculated field calculates the number of lines printed.

                          Add a second subreport directly below the first one. This has a rich text field containing 14 conditional objects, to allow for 14 blank lines, as follows
                          IF cLineCount

                          Comment


                            #14
                            RE: Adding blank rows to report

                            As I was writing the last sentence of the previous (almost) brilliant idea, I had a better one.

                            Instead of subreports, use a group break. Print the detail as you normally would in the detail section. Calculate the number of lines in the group. In the group footer place the rich text field mentioned in message above. Again, make it height small. It should then expand to the correct number of lines.

                            To handle situations of more than 1 detail page, the conditional expression could be
                            IF mod(cLineCount,14)>0.or.cLineCount=0 _____ Else End If
                            IF mod(cLineCount,14)>1.or.cLineCount=0 _____ Else End If
                            ...
                            IF mod(cLineCount,14)>12.or.cLineCount=0 _____ Else End If
                            IF cLineCount=0 _____ Else End If

                            Bill.

                            Comment


                              #15
                              RE: Adding blank rows to report

                              YEAH! This was what I was looking for. Do need the purge routine though.

                              Thanks Charlie!

                              Mark

                              Note that each row is part of a table with cell borders. I can't use expanding white space like a rich text field. I needed actual blank records, which Charlie's method produces.

                              Comment

                              Working...
                              X