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

Rich Text in Report

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

    Rich Text in Report

    Afternoon all

    I'm using data from 1 table, concantenating 3 fields, inserting it into another table, and then making a report from the latter.

    The data is being displayed on the report in rich text fields so they grow as required, center justified.

    Using:

    tbl2.K04name = alltrim(tbl.F_name)+" "+alltrim(tbl.L_name)+iif(tbl.clienttype = "student"," Gr"+tbl.grade,"")

    works just fine. The report rtf's have all the required info properly centered.

    We wanted to put the Gr from the above code on the next line of the rich text field instead of it moving to the next line automatically if the name was longer than the rtf. So I put in:

    tbl2.K04name = alltrim(tbl.F_name)+" "+alltrim(tbl.L_name)+iif(tbl.clienttype = "student",crlf()+"Gr"+tbl.grade,"")

    That worked fine, it put the Gr on the next line of the rtf, But now it isn't centered anymore. The rtf text is left justified.

    What can I use instead of crlf() to allow the rtf on the report to keep it's text centering?


    Thanks
    Duane

    #2
    RE: Rich Text in Report

    Try adding chr(10) or chr(13) instead of crlf() and see what happens.

    Comment


      #3
      RE: Rich Text in Report

      Thanks Ed

      The chr(10) didn't put the Gr data on the next line of the rtf in the report, it left it on the same line as the name data.
      The chr(13) did put the Gr data to the next line in the report rtf but both lines of text were left justified - the same reaction the crlf() had.

      Didn't find any ideas in the help info, so it looks like I will need to add a 'Gr' field to the table, populate that and use both fields in the rtf with a soft line-break.

      Thanks for your suggestion

      Duane

      Comment


        #4
        RE: Rich Text in Report

        Duane

        Have you tried using the rich text field and putting the separate fields together inside the rich text instead of using the already combined field?

        Seems to me that the rich text field's formatting tools is designed to work when you use separate fields.

        Then you can put hard enters, soft enters, different fonts, justifications, etc in where ever you want.

        It is usually best to keep data in its elementary form since it is easier to combine multiple fields into one field, then to split from one field back into multiple fields.
        Al Buchholz
        Bookwood Systems, LTD
        Weekly QReportBuilder Webinars Thursday 1 pm CST

        Occam's Razor - KISS
        Normalize till it hurts - De-normalize till it works.
        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
        When we triage a problem it is much easier to read sample systems than to read a mind.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #5
          RE: Rich Text in Report

          Morning Al

          Yes, it looks like that's what I will need to do.

          The 'Gr' section of the code was an afterthought to the already developed code. I have about 100 records in table 1 I'm transfering to fields in flat table 2 at a time.
          It just seemed easier at the moment to try the crlf() than to add a field to the destination table and add 100 more lines of code to populate that field.

          Thanks
          Duane

          Comment


            #6
            RE: Rich Text in Report

            Duane

            I'm not sure why you would have to add 100 lines of code to accomplish your task.

            Something's not right in how you are doing this.

            Can you zip the database and post it to a message?
            Or email it directly to me, if security is a problem.
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              RE: Rich Text in Report

              Al

              I have a table of school names, student names, grades, Img Ref fields, camera & shooting data, etc that we shot kids to all fall. 1 record for each kid.
              I am making a report showing classrooms: principal & teachers in a header with a school pic background, rows of kid pictures with names under each pic, sorted horizontally in kid last name order.
              Some of the smaller schools we shoot want a whole school collage; hence 100 name & Img Ref fields.
              So I select a school from the main table and then populate another table that has 1 record / classroom or in this case 1 record / whole school collage. At design time this past summer I couldn't get another way of getting the report to give me horizontal sorting automatically without assigning report positions to each kid. Unfortunately I had to do up about 30 different reports to deal with all the variations. I want to sit down soon and figure out how this can be done from 1 report dynamically.

              So the 100 lines of code is just 1 line repeated 100 times. Once for each kid to be transferred from the main table to the report table.
              I'll just have to add it to each of the sections as below:
              (I had tried to work on a function for this but I didn't know how to change fields in the destination table - tbl2 - will probably figure it out someday)

              IF tbl.fetch_eof() = .t. THEN
              x="00"
              goto last_kid
              END IF
              tbl2.K01name = alltrim(tbl.F_name)+" "+alltrim(tbl.L_name)+iif(tbl.clienttype = "student"," Gr"+tbl.grade,"")
              tbl2.k01img = tbl.prefered
              tbl2.k01imgname = tbl.pref_name

              tbl.fetch_next()
              IF tbl.fetch_eof() = .t. THEN
              x="01"
              goto last_kid
              END IF
              tbl2.K02name = alltrim(tbl.F_name)+" "+alltrim(tbl.L_name)+iif(tbl.clienttype = "student"," Gr"+tbl.grade,"")
              tbl2.k02img = tbl.prefered
              tbl2.k02imgname = tbl.pref_name

              tbl.fetch_next()
              IF tbl.fetch_eof() = .t. THEN
              x="02"
              goto last_kid
              END IF
              tbl2.K03name = alltrim(tbl.F_name)+" "+alltrim(tbl.L_name)+iif(tbl.clienttype = "student"," Gr"+tbl.grade,"")
              tbl2.k03img = tbl.prefered
              tbl2.k03imgname = tbl.pref_name

              tbl.fetch_next()
              IF tbl.fetch_eof() = .t. THEN
              x="03"
              goto last_kid
              END IF
              etc.......

              x is just a variable to show me how many kids in the class

              Yeah, it's very clunky, and by all standards it's a real mess, but I was under the gun for a usable solution. We had to use it this past fall.



              Thanks
              Duane

              Comment

              Working...
              X