iterating through a list of records in a second (html) page, where the first page orders the results - iteration

I'm building this site using jsp / servlets on the backend.
The first page (or "search" page) allows one to search for records from a table, and also allows the user to sort the records. The sorting mechanism is quite complicated, and is not just a matter of appending an "order by" to an sql query.
The first page then also fills in the results after the user hit's "search". Basically, it's just a list of the items in "short" format, where each item also contains a link to display the item in the second page. The sorting mechanism is run in the first page, while the list is being created. The mechanism uses java code to sort, not sql (for reasons I won't get into, but they are definitely needed).
When the second page (or "details" page) loads, it grabs the id of the record from the url, then displays the details for that record.
Problem is that we now want to put "back" / "next" type iteration features in the details page, so that the users don't have to return to the search or list page to then navigate to the next item in the list.
I'm looking for some ideas on how to implement this as something tells me I'm missing the obvious here. Basically, the problem is that the details page has no concept of the sorting used in the search page, and so has no idea of what the next or previous record in the list should be. There are a few ideas running around but they all suffer from one problem or the next.

Related

Microsoft Access Report - How to cycle through all pages of a report in print view?

I have a report that lists business names and the details of that business.
Each business is typically on one page of the report in print preview.
I've managed to create some code that grabs all of the business names and the current page number that they are on and then adds them to a table(BusinessPage). I have placed this code in the 'On Print' section of the report.
Once I cycle through the report, all of the business names and their pages are added to the table (BusinessPage).
The index page then displays the corresponding page numbers for those particular businesses.
Now this works reasonably well, the only problem is: I have to cycle through each page of the report before the index page displays anything (This is because the table is only populated when the page 'On Print' code is activated. Page has to be viewed first before any information is added to the table).
My question is, is there a piece of VBA code that I can use to cycle through all of the pages of a report and then back again? If I can achieve this, it means it will return you to the start of the report and display all of the pages on the index page correctly because the report has already been cycled through.
The solution was to move the code from On Print to On Format.
On Print is only executed when a page is actually printed or previewed.
On Format is executed when the pages are prepared, e.g. by going to the last page in print preview. Or if the page footer contains [Pages]: to calculate the total number of pages, all pages must be prepared, so the code is executed too.

Randomize form order on click only in Microsoft Access 2010

In Microsoft Access 2010, I have a table called Items, a query of that table called Items Extended that adds a randomized number based on the ID, which looks like this
RandomID: Rnd([ID])
I then have that query open in a Split Form, called Item List, and I have made a Randomize button that just has
SortOrderBy RandomID
and that seems to work just fine.
The problem I'm running into is that it doesn't stop updating and re-sorting by the random value.
Each item in the table has an Open link that opens a Single Form called Item Details for that record with its details more easily visible and editable. But when I close it, the order re-randomizes in the Item List Split Form.
I would like to make it so that when I press the randomize button, it sorts the table in a random order, and leaves it like that until I change it to otherwise, or re-randomize it myself.
I have tried setting the split form to not Order On Load, as well as the Query. I have tried various solutions that I've seen online that involve using macros and the VGA, but I'm having trouble wrapping my head around it and applying it to this particular situation. I have no trouble getting a random list- I just need it to stay in the order it becomes without changing every time. I don't need it to be randomized every time I load it, just every time I hit the Randomize button.
Try seeding your Rnd call with something that doesn't change, such as the currently signed-in user's id. You need to seed Rnd before you use it.
I don't have any experience with Access, but a quick read through the documentation suggests that the Rnd function is seeded by the Randomize function. So you woul need to supply the current user's session as an argument to Randomize. See the documentation for details of Rnd.

How do i find the location of a page break in SSRS in RDL source?

I have a report with a page break in it that I want to remove, but I don't know where the break is being added. It could be on a table, a group, or I don't know where else.
I checked the tablix properties and group properties for each portion of the report to see if "add a page break before" or "add a page break after" were checked, but didn't find anything.
Is there something i can search for in the RDL source code that will help?
I usually find this occurs when the item (tablix, chart etc) will fit entirely on a new page but not entirely on the page where the control starts. For example if you have a header on page 1 but not on page 2 or you have a chart before your tablix and the tablix will not fit entirely on Page 1 but will fit entirely on Page 2 it chooses to put the tablix on Page 2 instead of half on Page 1 and half on Page 2.
If this is your issue try placing all elements inside another element (such as a rectangle, list or another tablix).
We would need more information to give a more specific answer. Can you post screens of the pages either side of the elusive page break?
I was exporting to report type Web Archive (MHTML) and the page break was coming from the interactive height of the report. Once I set it to zero I no longer got the page breaks.

How are URLs mapped to Domino forms?

I have an URL that points to a Lotus Domino database, for example:
http://domino853.example.com/db.nsf/wcms/BEC4D26AD7A56823C1257B4B003427A8?OpenDocument
How is that URL mapped to the Domino form?
My first thought was the UNID is looked up in the database, and that the rest depends on the Form item of that document. But that's not the case. The actual form that gets resolved is neither wcms (like in the URL), nor document (like in document.Form), but it is wcms_createdoc. So where could that come from?
After some research, I found it:
wcms is an alias for another view.
That view has #Text(#DocumentUniqueID) as its first sorted column.
And, to select the proper form, it has a Form Formula set.
So this is how it all happens:
The view wcms is resolved. Since the URL continues after the view name, the rest of the URL is the key into that view.
The first document of the view that matches the key is selected. Obviously, for the DocumentUniqueID there can be only one document.
Since the view has the Form Formula set, it is evaluated and maps to the form wcms_createdoc.
This form is rendered.
References:
http://www.ibm.com/developerworks/lotus/library/ls-Domino_URL_cheat_sheet/

Report studio: keep list in one page in pdf

I have this list on a report that exceeds one page because it has a lot of rows. Instead of having it split into two pages I want the second part of the list to appear next to the first part, all in the same page. Both in html and pdf.
Disabled break and horizontal pagination in the list properties but did not work. Also put page break in report properties. It did improve the amount of rows that fit now but I still need to put one half of the list next to each other because I do not want it to split in many pages. Maybe there is another solution you know of.
Thanks for your help!
I'll post this from what I got to contribute if someone is looking for something similar.
If you know the amount of rows you can use a "newspaper" style report. Look it up, you'll find it simple.
Another option is to use repeater tables. I went for this one because my amount of rows was dinamic.
Hope this helps.
Regards