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

Report: Repeat Data on Every Page - Use String?

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

    Report: Repeat Data on Every Page - Use String?

    I have so many variations of this report but am close to getting it perfect...

    I was able to create a group break in the detail section for the tag subreport so I could limit how many tags are listed on a page using

    int((mrecno()-2)/lotsize)
    It turns out using -2 instead of -1 works because of the placement of the 1:N table in the set (which I had to change). That is why the subreport for the Yarn now appears at the end of the Tags instead of at the top like the form shows because the count of the yarn records changes.

    However to get the group to break and start a new page, I had to add a page break to the group footer which now causes a blank page before the next Schno group starts. And there doesn't seem to be any way to prevent that.

    So what I would like to do is get the variable yarn records into a string and print that string in the header of the report like the form shows. I could add the string into a field in the table so it would be dynamic for the report, but need some help on how to do that.

    schedata.jpgschedrep.jpg
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    #2
    Re: Report: Repeat Data on Every Page - Use String?

    So what I would like to do is get the variable yarn records into a string and print that string in the header of the report like the form shows.
    Probably table.external_record_content_get() with the filter based on the group break expression or something unique in that expression. Possibly *collect().

    It wouldn't need to be a variable, just a calculated field as far as I can see.
    Last edited by Stan Mathews; 04-03-2017, 01:08 PM.
    There can be only one.

    Comment


      #3
      Re: Report: Repeat Data on Every Page - Use String?

      Hi Stan,
      You suggested *collect() before but that function will only give me a one line string as far as I can tell. (Which means I don't know how to use it)

      Right now the Yarn_Split table is part of the set because it links the primary to the Yarn_Item, thus the browse is showing fields from 2 linked tables. So since 2 tables are involved, could you be more specific on how to go about building the data string from each table into one string?

      When I built this test form, I imported the form into the report which added some layout report features to build the browses - in the footer of each of the sub-reports. I've tried to move the data from the Yarn table into other sections of the report but it won't display anywhere except in the detail - and only once per Sch_No group.

      btw - what I meant by 'variable yarn records' is that the number of yarns varies which changes the mrecno() if put before tags.
      Robin

      Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

      Comment


        #4
        Re: Report: Repeat Data on Every Page - Use String?

        The result of *collect() is a CR-LF delimited list. The example in the documentation shows how to turn that into a comma delimited list if desired but the crlf() list would look like your red outlined area.

        If you need data from more than one table in the list the you would use (alternative to *collect())

        SET.EXTERNAL_RECORD_CONTENT_GET() .
        Last edited by Stan Mathews; 04-04-2017, 08:35 AM.
        There can be only one.

        Comment


          #5
          Re: Report: Repeat Data on Every Page - Use String?

          This calc worked in the IW with the report open in design mode and actually worked once or twice in report preview even after I added the '.and.' section to the filter. But when I put in the substr() to help line up the fields - no go - the report won't run. Both SPLIT and SCH_NO are numeric. Can you tell me what my syntax ought to be? I would rather not have Sch_no (primary field) appear in the string - do I need it?

          yarnstr = remove_blank_lines(set.external_record_content_get("lotctrlrep","Sch_No+' '+str(yarn_split->split,3)+'% '+ substr(yarn_item->yarndesc,1,30)+' '+substr(yarn_item->lotno,1,10)+' '+yarn_item->vendid ","sch_no","yarn_split->split>0 .and. sch_no=ctrl_hdr->sch_no") )
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #6
            Re: Report: Repeat Data on Every Page - Use String?

            This seems to work in AlphaSports. (in the interactive, will try in a report and let you know.)

            Code:
            tst = set.external_record_content_get("invoice.set","invoice_number+' '+sales_rep+' '+substr(customer->lastname,1,12)+' '+str(invoice_items->price,12,2)+' '+str(invoice_items->quantity,4)","","invoice_number = '000021' ")
            The docs don't specify but the examples do include the .set extension.

            Seems to work in a report as well. BTW, the only way I can find to set a calculated field width more than 80 characters is via the object explorer. You would also probably need word wrap as well.
            Last edited by Stan Mathews; 04-04-2017, 01:33 PM.
            There can be only one.

            Comment


              #7
              Re: Report: Repeat Data on Every Page - Use String?

              If you continue to have trouble try the filter as

              "yarn_split->split>0 .and. sch_no= "+s_quote(sch_no)

              If I am reading correctly you have a group on sch_no so only records in the set with matching sch_no are considered for the group.
              There can be only one.

              Comment


                #8
                Re: Report: Repeat Data on Every Page - Use String?

                Apparently my string is now too long for a calc field, so I tried to put the field content into a variable defined in the report as CONTENT, I set the size of the calc field to 1094 in the object explorer and added the '.set' extension as you suggested. Word wrap didn't seem to make a difference, but now the string does not hold the spacing so the fields don't line up. And somehow my group break expression is now off...


                content = "str(yarn_split->split,3)+'% '+substr(yarn_item->yarndesc,1,30)+' '+substr(yarn_item->lotno,1,10)+' '+yarn_item->vendid "

                yarnstr = remove_blank_lines(set.external_record_content_get("lotctrlrep.set",VAR->content,"sch_no","yarn_split->split>0 .and. sch_no = "+ctrl_hdr->sch_no))

                I noticed you did not use remove_blank_lines(), I will upload my files... the report is named 'test schedule' and was done in v11 with test data although the live data is v12. The report is filtered for the record that has 3 yarns.

                lotctrl.zip
                Last edited by MoGrace; 04-05-2017, 11:30 AM.
                Robin

                Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                Comment


                  #9
                  Re: Report: Repeat Data on Every Page - Use String?

                  Use an html object - build the html code to display as you want - assign the value in the report event OnPrintInit or section events for detail/groups as needed.

                  Code:
                  topparent:Html1.Value =<<%html%
                  <yourhtmlcode>
                  %html%
                  or

                  use an UDF for building the proper html

                  Code:
                  topparent:Html1.Value = buildmyhtml("<arguments if needed>")
                  set Growable/Shrinkable as desired.
                  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


                    #10
                    Re: Report: Repeat Data on Every Page - Use String?

                    Hi Al,
                    I don't know anything about html other than using it for bubble help. I'll look into it...
                    Robin

                    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                    Comment


                      #11
                      Re: Report: Repeat Data on Every Page - Use String?

                      See if this does anything for you.

                      aLotCtrl.zip
                      There can be only one.

                      Comment


                        #12
                        Re: Report: Repeat Data on Every Page - Use String?

                        Except for changing the hyphen to an underscore and enlarging the font somewhat - not bad! Thanks Stan.

                        @Al - I tried a static html control using my calc which looked exactly the same - i'll try it with Stan's version and see if that works. Although I think I will still need a mono spaced font...
                        Robin

                        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                        Comment


                          #13
                          Re: Report: Repeat Data on Every Page - Use String?

                          Originally posted by MoGrace View Post
                          Except for changing the hyphen to an underscore and enlarging the font somewhat - not bad! Thanks Stan.

                          @Al - I tried a static html control using my calc which looked exactly the same - i'll try it with Stan's version and see if that works. Although I think I will still need a mono spaced font...
                          You need to build html code with the data in an html table or using other html formatiing features.

                          An html table looks something like and allow for rows and columns for positioning...

                          htmlExample.png
                          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


                            #14
                            Re: Report: Repeat Data on Every Page - Use String?

                            Sorry Al but your html table example appears to assume a fixed number of records (?) Would you like to play with my file and maybe you can help me make sense of this feature? I tried to use the drag and drop for the table in the wysiwyg view and that was about as far as I got...
                            Robin

                            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                            Comment


                              #15
                              Re: Report: Repeat Data on Every Page - Use String?

                              Originally posted by MoGrace View Post
                              Sorry Al but your html table example appears to assume a fixed number of records (?) Would you like to play with my file and maybe you can help me make sense of this feature? I tried to use the drag and drop for the table in the wysiwyg view and that was about as far as I got...
                              No that was just a sample of the concept.

                              I'll have a working model in a few minutes. cue Jeopardy song..

                              Ok here is an example... It's the report name ending in HTML

                              Note the HTML object is filled with a function call from a report event (report - section events - Lot Break - OnRecord) shown in this image.SectionEventsLotBreakOnRecord.png
                              Attached Files
                              Last edited by Al Buchholz; 04-06-2017, 09:09 PM.
                              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

                              Working...
                              X