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

Hanging indent

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

    Hanging indent

    Does anyone know of a way to produce a hanging indent in the report generator?

    To jog your memory, a hanging indent produces a paragraph with the first line flush left and subsequent lines indented. It is used in bibliographic entries among other places.

    My current workaround is to merge my list to a word processor all of which provide the hanging indent as an option for paragraph formatting.

    Thanks,
    Bill
    Bill Hanigsberg

    #2
    RE: Hanging indent

    Bill,

    What are you trying to indent? Are you trying to format a detail section, rich text object, what?

    I was able to "hanging indent" a detail section by using a conditional object with mrecno()=1 and mrecno()>1 conditions, placing the selected fields for the detail section in different positions within the object.

    Pfobably not what you wanted.

    Stan
    There can be only one.

    Comment


      #3
      RE: Hanging indent

      Hi Stan,

      This is a bit of a stumper.

      I am using a rich text object for various gritty issues relating to formatting. I want the text to wrap to a second and third line as necessary. Lines after the first are supposed to be indented.

      What I am working on is the MLA bibliographic format for a list of references. It really requires a bit of string manipulation. I am printing out of an intermediate table to simplify them and speed up printing.

      The APA format indents the first line.

      Any bright ideas gratefully accepted.

      Bill
      Bill Hanigsberg

      Comment


        #4
        RE: Hanging indent

        Bill, would a brute force approach help? I'm wondering if it would be possible to cut your memo field into discrete sequential chunks, storing the resulting pieces in a series of child records. Include a field to record the position of each child record in the sequence. In your report if the sequential number is 1, use a conditional object positioning the text to the left margin, otherwise use a conditional object to position the text indented from the LM. If it would work it would be incredibly messy... but...

        -- tom

        Comment


          #5
          RE: Hanging indent

          Tom.

          My thought as well. Use string functions to collect the first, say 10 words or seventy characters, then the rest. Justify with conditional objects. Print the pieces.

          I think we're talking a very esoteric printing formulation here. Not something that should occur often.


          Stan
          There can be only one.

          Comment


            #6
            RE: Hanging indent

            Hi Tom,

            >>If it would work it would be incredibly messy... but...

            Perhaps it's one of those cures which generates nostalgia for the disease.

            Actually, I am not using a memo field execept for free text notes on a reference (a book review, perhaps) and in any case I am not printing the memo field.

            The temp table from which the report prints has a grand total of three fields. These are simply strung together in a rich text object which is the detail section of the report.

            As I mentioned at the outset, I can get what I want by merging to a word processor. I just wondered whether I could do the same thing in A5.

            I am working on the legal format as well as I have lots of legal talent in the immediate family. I will want your comments on that part of the project.

            The complexity of the task makes it easier to understand why professional bibliographic software is so expensive.

            All the best,
            Bill
            Bill Hanigsberg

            Comment


              #7
              RE: Hanging indent

              Hi Bill....

              I have used [OCCURS] & [AT]functions in a memo field, I know that xbasic help says
              that occurs will not work in a memo field but I used it to locate the number of
              times the string "Authors:" occured in a memo field. I used it to generate the
              "Best of Archive" message posts by author pages. You might try using something
              similar to locate where the ascii chr()for word wrap is in your rich text memo
              field.

              I would think that if the memo field was the same width on the entry form as it is
              in the report that it would wrap in the exact same place. So if this worked you
              could put a script in a button for the entry form that would find where the text
              wraps & write some chr(32) "spaces" after the wrap for the indent, then locate the next wrap. What chr() is the ascii value for word wrap ..... would it be just a
              line feed only?

              Below is how I used the occurs & at functions to locate the string, don't know if
              this will help, but might be worth a few minutes?

              tbl=table.current()
              tbl.fetch_first()

              while .not. tbl.fetch_eof()

              ' find the number of times the word "author:" occurs in the memo
              num = occurs("Author:", tbl.contents)
              trace.writeln("value found "+LTRIM(STR(num))+" times.")

              for i= 1 to num


              pos=AT("Author:",tbl.contents, i)

              a_name=ltrim(left(substr(tbl.contents,pos+7,60),50))
              pos2= AT(CHR(10),a_name,1)
              name2=alltrim(substr(a_name,1,pos2-1))
              trace.writeln("position ="+ str(pos)+" Occurance "+str(i))
              trace.writeln(name2)
              tbl2.enter_begin()
              tbl2.thread_id=tbl.thread_id
              tbl2.name=name2
              tbl2.headline=tbl.headline
              tbl2.enter_end(.t.)


              next i

              tbl.fetch_next()
              end while
              tbl2.close()
              end

              Comment


                #8
                RE: Hanging indent

                Hi Doug,

                Thanks for looking at this. I will go through your code in detail later today even though I doubt its relevance to the issue at hand. Who cares. It is useful for something, and once it is in my head I will recognize the something when I encounter it.

                Meanwhile, you wrote "I would think that if the memo field was the same width on the entry form as it is in the report that it would wrap in the exact same place."

                There is a tiny confusing here. The Rich text object in in the report only. It contains three fields from the temp table on which the report is based. The data entry form contains no rich text fields, only lots and lots of fields many of which are unused for most entries. They are needed because some entries require them. For example, a few books require a volume number although must do not.

                Consequently the entries to be printed vary greatly in length and the formatting must adjust.

                The print process is a script which creates the contents of the three fields and writes them to the temp table. The report is based on that.

                The style reference I am using sets out a typology of formats depending on the type of reference. It horrifies me to have to tell you that there are 55 types each of requires at least some difference in format.

                For the moment I am content to deal with the most common types, perhaps 10-20.

                Thanks again,
                Bill
                Bill Hanigsberg

                Comment


                  #9
                  RE: Hanging indent

                  Bill,

                  I have a better idea of what your up against now, I didn't fully understand
                  the situation & still may not.... but here goes.

                  Have you tried working with num=LEN(trim(field)) to determine the length of the
                  charactor string before you write it to the temp table? If you know how many
                  charactors the rich text obj. will hold before it wraps and none of the 3 fields
                  used in the RTO are longer than 1 line ..... Could you use PADR() for the first
                  line & PADL(PADR(fieldname)) for the indented lines?

                  so if the RTO wraps at say 40 charactors & you have the integer 'num' you could
                  do some simple math to determine the PADL() & PADR() values.

                  dim pl as n
                  dim pr as n
                  dim num as n
                  dim wrap as n

                  wrap=40
                  pl=10
                  pr=wrap-num-pl

                  set pl=0 for the field that represents the first line in RTO & 10(or what ever)
                  for the indented lines there after. The field lengths for the temp table should
                  be equal to the wrap length of the RTO. Then fetch through the entry table &
                  write to the temp table with the left & right padding necessary for the desired
                  output in the report.

                  On the other hand, I may still be in the dark here! So if I am missing something,
                  let me know. I don't know how you could get the formating into the RTO as the report is being generated. That leads me to think that the answer is in writing the desired format into the fields in the temp table.


                  Good luck Bill!




                  Comment


                    #10
                    RE: Hanging indent

                    Ok Doug, I give up. You're the pit bull of formatting.

                    Seriously, that is an interesting approach which I had not considered. Now here's a question. Given that we are using a proportional font, can we know how many characters will fit on a line before it wraps? Does it remain constant?

                    I'll have to work with this and see. For the moment I am struggling to just get the correct text into the temp table which is proving to be challenging enough, thank you very much.

                    Just a note on why having to merge output to a word processor is not tragic. In many cases, the reference list is destined to become part of a research paper which of course is contained in a word processing file so it is going there anyway. It could be appended to the text of the paper or the word processor's master document feature could be employed to manage a paper split among several files (chapters, biblio, appendix, for example).

                    Thanks again for helping me to think about this problem. I know your technique is a solution, either for this or for some other issue.

                    All the best,
                    Bill
                    Bill Hanigsberg

                    Comment


                      #11
                      RE: Hanging indent

                      Bill,

                      I think that you are the pit bull, for tackling things like this!
                      Merging the output to a word processor may be your best choice,
                      no formatting problems, & the end result is that both a report
                      & the word processor file gets printed.... Unless there is a reason
                      that you want to keep everything in the database, that is the way I would
                      handle it. I would like to see your script for merging the data to a word
                      processor.

                      I would think that the proportional font might be a problem, but previewing
                      the report with some sample data would give you the answers you are looking for.

                      I have an idea that you are the type that likes to explore all your options
                      before you decide which direction you take for a solution. There is a wise
                      saying (paraphrased) "You can't judge the value of a thing until you have a
                      complete understanding of what it is." So which ever way you go Bill, I am
                      sure that it will be the best option for the particular situation.

                      As for my suggestion, it was a quick responce with few details, there may be
                      something there you can use, & if there is I know that you will dig until you
                      find it.

                      Good luck Bill...

                      Comment

                      Working...
                      X