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

Layout report - function to return multiple lines

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

    Layout report - function to return multiple lines

    OK, with no success at getting the linked report I needed - which only has two columns - into a Layout report, I thought I'd make my own function to return the values. That works fine but all the lines show up as one continuous string. The result just isn't presentable or readable.

    I've tried separating the lines with a "<br>" as well as a "crlf()" but no success. Anyone know how I might do this? I can't tell you how much I need some solution here to produce a lousy two columns of data.

    My pertinent function code is like this:

    Code:
    while flag
    	txt = txt + rs.data(1) + space(5) + rs.data(2) + crlf()
    	flag = rs.nextRow()
    end while
    -Steve
    sigpic

    #2
    Re: Layout report - function to return multiple lines

    How about a grid or a dialog in a popup window formatted the way you want with a print button using window.print()?
    I use this in the master template of a grid to print the window and hide the print button.
    Code:
    	<td style="vertical-align:top;">
    	      <input type="button" value="PRINT" onclick="JavaScript:this.style.visibility='hidden';window.print();">	
    	</td>
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

    Comment


      #3
      Re: Layout report - function to return multiple lines

      Thanks Frank. As I said a couple days ago, I should have just coded all this by hand. But I have every bit of a fairly extensive report already done -- I just can't get this part. If only I could get these two columns into a report. Doing as you suggest means dumping what I nearly have and starting all over again - again. Besides, there should be some way to construct a function that returns multiple and formatted lines of text to a report -- shouldn't there?
      -Steve
      sigpic

      Comment


        #4
        Re: Layout report - function to return multiple lines

        Does printhtml() help?
        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: Layout report - function to return multiple lines

          Well Al, I was using my custom function:

          Rpt_Session_Food(s_id)

          So I tried:

          PrintHTML(Rpt_Session_Food(s_id))

          Now no matter what I do, I can't get anything to print - again - in that cell. Yes, I've deleted the cell, done everything I can dream of. I am withholding my true feelings here - mostly.
          -Steve
          sigpic

          Comment


            #6
            Re: Layout report - function to return multiple lines

            Well, another day, another failure to print 2 columns in a layout report. Didn't even find anyone to take up my offer of $100 to help.

            So, if anyone has any ideas, I will certainly welcome them.

            I either need to be able to link a report that contains the 2 columns, or find a way to produce the data with a UDF. Tried both -- a lot -- to no avail.
            -Steve
            sigpic

            Comment


              #7
              Re: Layout report - function to return multiple lines

              Steve -

              Reading this thread made me want to take a look at Layout Reports and give it a go to see if I could come up with one. Seems as though I have, if I am understanding correctly

              - There are two MySQL tables, Customers and Items that are linked Customer:ID -> Items:Seller_ID
              - Created the two reports with the QR genie.
              - Then on the Customer report, added a new row under the existing row of fields in the Detail section.
              - Used the New Linked Report link to bring up the Edit Linked Report Dialog
              - Clicked Pick report, selected the Items report from the list
              - Clicked the Define link button and selected SELLER_ID from the left drop down and {id} from the right drop down
              - OK, OK and Preview
              - Voila! the screen shot seen here (well OK, I fiddled around with the positioning and justification a bit)

              Seems to work just fine :)

              linked_report1.JPG

              Cheers!
              Lyle
              Cheers!
              Lyle Chamney
              http://www.2ninerniner2.com/
              Websites rebuilt with WordPress
              http://goodcheapfastwebsites.com/
              Complete, ready to install WordPress websites
              http://snifflevalve.com
              WordPress training and tutorials

              Comment


                #8
                Re: Layout report - function to return multiple lines

                Yup yup, should be that simple. And it is/was for one of the two child links I need (actually I need three but have only attempted the two so far). One of my links goes very nicely, and is as easy to implement as you suggest. The other does not does not does not work.

                One thing I think I'm doing differently from most is putting both of my linked reports into the group footer section of the parent report. Trying to put them side-by-side in one row. But even when I try the one that doesn't work all by itself, nothing shows.

                And it also seems that I should be able to write a function that returns data on separate lines, yet both <BR> and CRLF() are completely ignored in the output.
                -Steve
                sigpic

                Comment


                  #9
                  Re: Layout report - function to return multiple lines

                  Well it's heartening to hear that I am on the right track with Layout Reports and Linked Reports However, once you start talking roll-your-own functions, that's over my head ... for now :)

                  The only other thing that this noob can suggest, and I am sure you have done so, it to right click in the offending linked report and select Refresh linked reports. This got me the first time after I made some changes and then all of a sudden, there was nothing in the linked report.
                  Cheers!
                  Lyle Chamney
                  http://www.2ninerniner2.com/
                  Websites rebuilt with WordPress
                  http://goodcheapfastwebsites.com/
                  Complete, ready to install WordPress websites
                  http://snifflevalve.com
                  WordPress training and tutorials

                  Comment


                    #10
                    Re: Layout report - function to return multiple lines

                    Lyle - a UDF in effect is little different than an expression.

                    Make a layout report, and find or make a blank cell.

                    Edit that cell and specify that it's an Expression.

                    Then enter this expression:
                    Code:
                    "Alpha" + crlf() + "Software"
                    or this:

                    Code:
                    "Alpha <br> Software"
                    and preview your report.

                    At least one of these should (IMHO) have put the "Software" part of this on the second line. But neither does and I don't know what will.
                    -Steve
                    sigpic

                    Comment


                      #11
                      Re: Layout report - function to return multiple lines

                      Originally posted by Steve Workings View Post
                      One thing I think I'm doing differently from most is putting both of my linked reports into the group footer section of the parent report.
                      Maybe that's the problem? Try putting the link in the detail section and see if that works.
                      Peter
                      AlphaBase Solutions, LLC

                      [email protected]
                      https://www.alphabasesolutions.com


                      Comment


                        #12
                        Re: Layout report - function to return multiple lines

                        One of the two linked reports works fine in the group footer - just what I want. And putting the linked reports into the detail section does not fit my report design needs at all.
                        -Steve
                        sigpic

                        Comment


                          #13
                          Re: Layout report - function to return multiple lines

                          I just gotta ask.. are you sure the link query is returning data?
                          Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                          Comment


                            #14
                            Re: Layout report - function to return multiple lines

                            Yes. I can preview the child linked table with data as I expect. I've included the linking key field in the preview so I can be sure I'm getting what I need.

                            Then, when I use my UDF I also get the right data - just can't format it properly as described here.
                            -Steve
                            sigpic

                            Comment


                              #15
                              Re: Layout report - function to return multiple lines

                              Every time I try linked reports I fail. Tried one again this morning and it was working fine in Preview, but then I added a border to the fields in the child layout and the linked report won't show up on parent report anymore. It's narrower than the parent report, etc., etc. So I went and removed the borders and it still won't work. It all seems way too touchy. IMPORTANT NOTE: I have NOT been saving my parent report after testing it with a linked report. Each time I open the parent report and insert the linked report, reselect the joins, and do the preview. Then I close the parent without saving (for now, so that I don't have to refresh the linked report etc while making changes to it).
                              Carol King
                              Developer of Custom Homebuilders' Solutions (CHS)
                              http://www.CHSBuilderSoftware.com

                              Comment

                              Working...
                              X