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 "keep together on page" challenge!!!

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

    #16
    Re: Report "keep together on page" challenge!!!

    Cornelius,
    Since you are able to duplicate this issue, summit a bug report to Alpha team and they can take a look at it and fix it if it is really a bug or a setting you may be missing.
    Edhy Rijo
    Progytech
    (Computer Consultants)
    The makers of CardTracking.Net
    www.progytech.com

    Comment


      #17
      Re: Report "keep together on page" challenge!!!

      Originally posted by Progytech View Post
      Cornelius,
      Since you are able to duplicate this issue, summit a bug report to Alpha team and they can take a look at it and fix it if it is really a bug or a setting you may be missing.
      Hi,

      I have received the following feedback relating to this issue. It does seem to be a known issue with at least 3 people requesting it.

      I have not done anything on the HTML keep implementation as there are other more immediate concerns I am looking into (first supporting services, then internationalization issues by switching from DBF to BSON - as BSON supports UTF8 encoding).

      What should come for free with the internalization changes, is a BSON representation of the data - which should make it possible to do real subreports (with keep/ continuation headers and footers) - because BSON is an object database format, it can be used to represent nested rows, which is perfect for subreports.

      In the DBF world, we had SET based subreports, and you could point at a one-to-many child table to source a child report, since the subreport data context was know to the parent report, it was possible to generate the supreports incrementally (page-by-page) rather than pre-render as we do with HTML.

      So far, there are three people who have asked for pagination features (others have asked for continuation headers in subreports, but that is the same problem - knowledge of page layout), so this will be addressed, but only after I switch to BSON as the datasource for reports.

      I will send you an email once I have something working, though it will likely require a redesign of your reports, as linked reports save an HTML template, this will require an actually nested report definition instead.

      Comment


        #18
        Re: Report "keep together on page" challenge!!!

        Ok, sounds promising - cheers for posting the response!

        Comment


          #19
          Re: Report "keep together on page" challenge!!!

          Hi,

          I have actually tested this to more depth and found that the "linked report" does in actual fact not render most of its formatting settings/features once displayed in the main report.

          Because of this my linked report does not pull in continuation headers which also could have provided a workaround for my problem. The linked report template as displayed in the main report does NOT even mention ANY code of the continuation headers/footers even though they are in the original table layout report.

          Bummer!!! Cian, we really need you.....................................

          Comment


            #20
            Re: Report "keep together on page" challenge!!!

            Yes, I found the same thing :-(

            I tried quite a few workarounds - adding soft and hard page breaks into page headers, rtf fields with conditional page breaks, html fields with hard breaks, all to no avail as they get stripped out when embedded, as you've found.

            The closest I came to a vaguely working solution was adding a running total calculation using each record's content (text length, whether an image is present) to estimate whether it might cause a page spillover - if so, it inserts enough <br>'s before the record to create a manual 'spacer' to push it onto the next page. It's very kludgy though, and only works for a couple of pages before becoming misaligned.

            Waiting with bated breath for a proper solution!

            Comment


              #21
              Re: Report &quot;keep together on page&quot; challenge!!!

              No feedback as yet Rohan.

              It seems that orders higher up in the chain of command would not allow for a "quick fix" but rather a comprehensive solution [which I understand], however, "time" is my enemy and the fact that this issue is actually a BUG not to be fixed vs. the time required to develop the comprehensive solution, is delaying progress to my client solutions. It is frustrating for there seems to be NO alternative and/or solution throughout Alpha 5 for this issue.

              Sub reports vs linked reports - wow, both valid choices with issues on both sides.
              Sub reports - issues with multiple one to many tables
              Linked reports - HTML pre-rendering of report structure and formatting when linked.

              I'm not clever enough for this and haven't felt this hopeless in a very long time.

              Comment


                #22
                Re: Report &quot;keep together on page&quot; challenge!!!

                There is another way, I think. It can be kind of a pain to implement, but powerful. This assumes you are using SQL - though you might be able to do it in DBF too - I don't know.

                Instead of using a subreport, just put all of the data you want into a memo type field.

                You will build the field from a function that takes the multiple records you need and builds them into an HTML table.

                So the value of the field is something like:

                <table (table definition)>
                <tr><td>my datat</td><td>more data</td></tr>
                all the related rows that would be in the subreport
                </table>

                Then you use printhtml(fieldname) in alpha to put the field into the report.

                That will give you complete control of the "subreport" field.

                Maybe that will help?

                Comment


                  #23
                  Re: Report &quot;keep together on page&quot; challenge!!!

                  Originally posted by lgrupido View Post
                  though you might be able to do it in DBF too - I don't know.
                  Pretty much the same way in .dbf

                  Been doing that for a long time.
                  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


                    #24
                    Re: Report &quot;keep together on page&quot; challenge!!!

                    Originally posted by lgrupido View Post
                    There is another way, I think. It can be kind of a pain to implement, but powerful. This assumes you are using SQL - though you might be able to do it in DBF too - I don't know.

                    Instead of using a subreport, just put all of the data you want into a memo type field.

                    You will build the field from a function that takes the multiple records you need and builds them into an HTML table.


                    So the value of the field is something like:

                    <table (table definition)>
                    <tr><td>my datat</td><td>more data</td></tr>
                    all the related rows that would be in the subreport
                    </table>

                    Then you use printhtml(fieldname) in alpha to put the field into the report.

                    That will give you complete control of the "subreport" field.

                    Maybe that will help?
                    Pain is my only way out Ha Ha.

                    Kindly point me to where to create this function as it is SQL [fortunately] As specified earlier, this is way beyond my experience. Example of the function I could perhaps adapt.

                    Comment


                      #25
                      Re: Report &quot;keep together on page&quot; challenge!!!

                      What version of SQL? My Sql, MS Sql or something else?

                      Comment


                        #26
                        Re: Report &quot;keep together on page&quot; challenge!!!

                        SQL 2014 Express

                        Comment


                          #27
                          Re: Report &quot;keep together on page&quot; challenge!!!

                          OK. Take the code below and run it in a query window in the database of your choice. it will construct an example table and function that creates an HTML table of the data. My next post will contain information on how to use it:

                          Code:
                          CREATE TABLE [dbo].[FocusGroups](
                          	[TestID] [int] IDENTITY(1,1) NOT NULL,
                          	[FocusGroup] [varchar](15) NOT NULL,
                          	[FullName] [varchar](50) NOT NULL,
                          	[FullAddress] [varchar](50) NOT NULL,
                           CONSTRAINT [PK_FocusGroups] PRIMARY KEY CLUSTERED 
                          (
                          	[TestID] ASC
                          )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
                          ) ON [PRIMARY]
                          
                          GO
                          SET ANSI_PADDING OFF
                          GO
                          SET IDENTITY_INSERT [dbo].[FocusGroups] ON 
                          
                          GO
                          INSERT [dbo].[FocusGroups] ([TestID], [FocusGroup], [FullName], [FullAddress]) VALUES (1, N'Group 1', N'Test Subject A', N'900 Downy street, testville, MD 34567')
                          GO
                          INSERT [dbo].[FocusGroups] ([TestID], [FocusGroup], [FullName], [FullAddress]) VALUES (2, N'Group 1', N'Test Subject B', N'123 anywhere lane, Detroit, MI')
                          GO
                          INSERT [dbo].[FocusGroups] ([TestID], [FocusGroup], [FullName], [FullAddress]) VALUES (3, N'Group 1', N'Test Subject C', N'456 Picup sticks, Chicago, IL')
                          GO
                          INSERT [dbo].[FocusGroups] ([TestID], [FocusGroup], [FullName], [FullAddress]) VALUES (4, N'Group 2', N'Test Subject D', N'789 Brandywine, Toledo, OH')
                          GO
                          INSERT [dbo].[FocusGroups] ([TestID], [FocusGroup], [FullName], [FullAddress]) VALUES (5, N'Group 2', N'Test Subject E', N'101 Sunnyville, Chicago, IL')
                          GO
                          SET IDENTITY_INSERT [dbo].[FocusGroups] OFF
                          GO
                          
                          CREATE FUNCTION [dbo].[FocusGroupTable] 
                          (
                               -- Add the parameters for the function here
                               @Group varchar(15)
                          )
                          RETURNS varchar(max)
                          AS
                          BEGIN
                               -- Declare the return variable here
                          DECLARE @XYList AS varchar(MAX) -- Leave as NULL
                          declare @Current_Row as varchar(999)
                          declare @fullname as varchar(50) 
                          declare @fulladdress  as varchar(50) 
                          declare @count as int
                          
                          DECLARE XY_Cursor CURSOR FOR 
                          select FullName, FullAddress
                          from FocusGroups as fg
                          where fg.FocusGroup = @Group
                          order by FullName
                          
                          -- create the start of the table
                          set @XYList = '<TABLE border="1" bordercolor="#000000" cellpadding="3" cellspacing="0" width="100%"><TBODY>'
                          -- create the header row
                          set @XYList = @XYList + '<TR><TD width="50%"><B>Name</B></TD><TD width="50%"><B>Address</B></TD></TR>'
                          
                          OPEN XY_Cursor
                          
                          set @Count = 0
                          
                          FETCH NEXT FROM XY_Cursor INTO @fullname, @fullAddress
                          
                          WHILE @@FETCH_STATUS = 0
                          BEGIN
                          
                          set @XYlist = @XYList + '<tr><td valign="Top">' + @FullName + '</td><td>' + @fulladdress + '</td></tr>'
                          
                          set @count = @count + 1
                          
                          FETCH NEXT FROM XY_Cursor INTO @fullname, @fullAddress
                          
                          END  -- while
                          
                          CLOSE XY_Cursor
                          DEALLOCATE XY_Cursor 
                          
                          if @Count = 0
                          set @XYList =  null 
                          else
                          begin
                          set @XYlist = @XYList + '<tr><td valign="Top">Total Count</td><td>' + str(@Count) + '</td></tr>'
                          
                          set @XYList = @XYList + '</TBODY></TABLE>'
                          end
                          
                          RETURN @xylist
                          
                          END
                          
                          
                          GO
                          /****** Object:  Table [dbo].[FocusGroups]    Script Date: 3/10/2015 2:07:10 PM ******/
                          SET ANSI_NULLS ON
                          GO

                          Comment


                            #28
                            Re: Report &quot;keep together on page&quot; challenge!!!

                            So, once you have successfully run the script, you can open a new query window and run this statement:

                            Code:
                            select focusgroup, dbo.FocusGroupTable(FocusGroup) as htmltable
                            from FocusGroups
                            group by FocusGroup
                            You could take the above select statement and use it to create a report.

                            In the report, create a calculated field as such:

                            mytable = printhtml(htmltable)

                            And use the calculated field in the report. Make sure it "can grow"!

                            See if you can make it work a little easier that way.

                            Comment


                              #29
                              Re: Report &quot;keep together on page&quot; challenge!!!

                              Originally posted by lgrupido View Post
                              So, once you have successfully run the script, you can open a new query window and run this statement:

                              Code:
                              select focusgroup, dbo.FocusGroupTable(FocusGroup) as htmltable
                              from FocusGroups
                              group by FocusGroup
                              You could take the above select statement and use it to create a report.

                              In the report, create a calculated field as such:

                              mytable = printhtml(htmltable)

                              And use the calculated field in the report. Make sure it "can grow"!

                              See if you can make it work a little easier that way.
                              Hi Larry,

                              It actually worked but hugly complex.

                              I reviewed my setup and changed it as such;
                              Structure [Old];
                              Main Report [Freeform]
                              Linked Report 1 = "Specifications" [One to Many]
                              Linked Report 2 = "Analysis" [One to Many]

                              Changes
                              Linked Report 1 has many fields so I changed the main report to include this sql table "Specifications" on an inner join. I then grouped each of the "many" subsections individually in the main report. This works and does not "creep" or overflow anymore in the main freeform report.

                              Linked Report 2 DOES link correctly as it is the only linked report now, BUT, it creeps over the pages.

                              I have only 3 fields in this sql table called Analysis;
                              SpecificationLinkID [Foreign link key for table specification]
                              Imagefield [varchar(100), image reference field]
                              ImageInfo [sql text, alpha textarea field]

                              The whole report displays fine except that the linked report 2 "creeps" or overflow and does not start a new record on a new page [keep together]. It prints half on one page and half on the next page. I need to keep the records together and not overflow to the next page partially. [Remember, it is a linked report]

                              How do I structure your code to ONLY include this "Analysis" table with the 3 fields WITHIN THE CURRENT main freeform report.

                              Goodness me, I think I confused myself now........ Does it actually make sense?

                              Comment


                                #30
                                Re: Report &quot;keep together on page&quot; challenge!!!

                                For a deeper analysis I would much rather help you in person, over the phone or maybe via remote control.

                                Message me your email or phone and we'll get it done. Then we can post the final solution here. Otherwise I fear it will take a lot of time.

                                Otherwise, please post your current select statement for your main report and I can show how I would add what you need to it.

                                I assume you are showing the image in the report and not just the filename, which will make the structure of the function a bit different since we need to add an image tag.

                                Comment

                                Working...
                                X