How do I increase query page size of widget from the default of 100 - widget

I am using a suggest box to pull up and select records from a database, but it appears to limit suggestions to the first 100 records in the database. To be specific, the 101st record will not appear as a suggestion. I have read that "query page size" defaults to 100 records. Is this what's going on, and if so, is there a workaround?

SOLVED: I found "default page size" under the datasource properties under the datasourses tab of the datasource. Changed it from the default, '100' to an ample value.

You can try changing the number to 0, that means all records would be in one page.

Related

How to incrementally number report details and set 0 if no records, Access Reports

I have an Access report with details (see image below). I have incremental numbering for the report details. I achieved this by creating a TextBox and setting it's Control Source: '=1' and Running Sum: 'Over Group'. This works well, but if I have no records the number shows up as 1 (I want this number to show up as 0). If I try to check if detail is NULL in VBA, it returns false if I have at least one Detail record in the entire report.
(Try 3)
OK, so the red section does show up on a left join, because the query is returning Null for the missing records.
So, your real fix is to:
Select a detail field that that is always non-Null (I'll assume it is called ID)
Set the control source of your counter control to:
=IIf(IsNull([ID]),0,1)
That way the running sum will show zero for emply detail groups.

MySQL sometimes decrease field value

I have the field named hits in my table which records user interaction with objects on my website. For example: if user views object preview field hits would be updated and increased by 1, if user enters object's page it would be increased by 3 and etc.
Everything works like a charm on my local development server. But on production server (online > 50) sometimes field hits increases by right value and then within several seconds it could be decreased by some random small value (1,2). This bug doesn't always occur. I think the solution can be related with MyISAM engine I'm currently using for this table.
Below is a code implementing table update query (codeigniter)
$this->db->set('hits', 'hits+' . (int) $count, FALSE);
$this->db->where('id', $id);
$this->db->update('gallery');
So I have 2 questions:
How to fix this bug?
How can I perform multiple queries to my table to duplicate this situation on my local development server?
Thanks to all for responses. Anyway I got useful information from your answers. The problem was at the crontask. I had a function running every minute every third month. It cutted these hits. I fixed that crontask and everything works now.
Check your crontask twice. Thanks you all for your help.

MySQL query performance for paginating

Ok, so what is the best practice when it comes down to paginating in mysql. Let me make it more clear, let's say that a given time I have 2000 records and there are more being inserted. And I am displaying 25 at a time, I know I have to use limit to paginate through the records. But what am I supposed to do for the total count of my records? Do I count the records every time users click to request the next 25 records. Please, don't tell me the answer straight up but rather point me in the right direction. Thanks!
The simplest solution would be to just continue working with the result set normally as new records are inserted. Presumably, each page you display will use a query looking something like the following:
SELECT *
FROM yourTable
ORDER BY someCol
LIMIT 25
OFFSET 100
As the user pages back and forth, if new data were to come in it is possible that a page could change from what it was previously. From a logical point of view, this isn't so bad. For example, if you had an alphabetical list of products and a new product appeared, then the user would receive this information in a fairly nice way.
As for counting, your code can allow moving to the next page so long as data is there to support a new page being added. Having new records added might mean more pages required to cover the entire table, but it should not affect your logic used to determine when to stop allowing pages.
If your table has a date or timestamp column representing when a record was added, then you might actually be able to restrict the entire result set to a snapshot in time. In this case, you could prevent new data from entering over a given session.
3 sugggestions
1. Only refreshing the data grid, while clicking the next button via ajax (or) storing the count in session for the search parameters opted .
2. Using memcache which is advanced, can be shared across all the users. Generate a unique key based on the filter parameters and keep the count. So you won't hit the data base. When a new record, gets added then you need to clear the existing memcache key. This requires a memache to be running.
3. Create a indexing and if you hit the db for getting the count alone. There won't be much any impact on performance.

SSRS 2005 - Sorting with page groups in SSRS 2005

One of our SSRS 2005 reports would time out when executed at the "All" level (was returning upwards of 80K records), so I added a group to the table whose sole purpose was to force a page break after every 500 records. I found the grouping in another post. It looks like this:
=IIF(Fields!ShowPageBreaks.Value = 1, Floor((RowNumber(Nothing) - 1) / 500), Nothing)
The problem is that the user sort no longer works correctly. E.g., "A"s show up at the top of multiple pages. I haven't been able to find any pattern in how SSRS decides to perform the sort. I've tried playing around with the Sort Scope and the Sort Target, like setting one to the Table and one the other to the Group, both to the Table, one or the other to nothing, etc and nothing seems to work.
Has anyone found a solution to a problem like this?
The sorting is happening within each group, aka, "working as intended." You're creating a somewhat arbitrary and random set of record groups based on row position in an un-ordered set.
You need to find a way to sort properly (in the SQL?) prior to applying any sort of grouping, or use a less random means of paging.

2 Page Report per record

I am having issues recreating an old report with SSRS. The original report would pull about 5-6 records from SQL, and then have a corresponding 2 page report for each record. This would be easy if I could just create an individual report for each record, which is possible, but is not what is being asked of me.
I need to be able to have 2 pages for each record I return. For example:
Page 1 will have a different table than page 2 for the same record and will be view-able as:
record 1:
page 1,2
record 2:
page 3,4
record 3:
page 5,6
No grouping is necessary for records. They just need multiple pages to repeat.
Someone I work with suggested a sub-report, but I'm not sure how that would work.
I use the report builder to create reports.
Thanks for any help. I will gladly clarify if necessary.
The nature of SSRS is that it grows based on whatever data is available when it is run. In order to force it to take up two pages per record, you'll need to set a placeholder. One way to do that is to have a table that spans two pages. Make sure the "CanShrink" property is set to False for the cells in at least one of the columns. You can remove the borders to make the column invisible if the length of the report varies.
Next, you can add columns as needed for your other report data. It doesn't really matter if you want to use a subreport or not, either way will work.