I'm thinking if there's a way (a component or reference) to breakdown an adodb.recordlist (e.g. records selected in sql database) consist of huge number of records.
Then a textbox can be used to jump by the user to jump into the page he wants to view.
Just wanna acquire an idea on how can i write this in codes.
You can set the page size with the .PageSize property and jump to a specific page by setting the .AbsolutePage property.
Here is an example.
Related
I have a merchant application form that I want to split up into multiple regions so that the user only has to see one section of the application at a time. Each region is tied to the same table therefore:
Each region would have to share the same primary key
I only want one submission of the form items at the end of the form
I read this post Create an Apex form with multiple pages
which makes it seem like an easy to do process by using the Hide and Show Region template and manually separate the form into multiple regions. The problem I'm running into is that Apex requires a primary key to be tied to each form region, but you also can not have duplicate items on the same page. Any ideas?
-- attaching the PNG of the error message here Primary Key ERR
To me, it looks like a single page with several regions. Doing so, you'd have only one primary key item.
Logically, you'd separate items into different regions. Each of them should use its "Server side condition" which would decide whether to render (i.e. display) that region at certain time or not. It means that it doesn't have to be a hide and show region (besides, it is always here and visible, user just decides whether to reveal its contents or not). You'd create any region type (even an ordinary HTML region).
For example:
the first region displays customer ID, name and address. Other regions are "hidden" because e.g. P1_ID IS NULL is met as no data has been submitted yet. Once user enters ID, name and address and submits the page, P1_ID gets its value which enables other region(s) to be displayed
the second region contains items about some other customer's data; it is now visible because P1_ID is no longer NULL, but 3rd region is still hidden as you didn't enter some required data in the 2nd region which would let the 3rd region to be displayed.
and so forth
Note that the post you are referring to is 6 years old. That is like medieval in apex terms - so much has changed since then.
This is a way to do it if you want multiple pages. Just create multiple pages with the same form (using the create form functionality) and depending on the functionality needed on a specific page you delete the page items you don't want to show. If a database column is not included in the form it will not be touched by the dml process. This should be relatively simple to create.
Note: if you want to get up to speed on forms, read this blog
Is there a difference in performance (speed, memory used, etc.) when using the Access UI and setting a property to add a value to a textbox (or other control) as opposed to using VBA to do the same thing when object variables are correctly used?
For example, let's say that I want to select an item from a listbox and add values from the selected record to 2 textbox controls. I can do this by using the following VBA code in the AfterUpdate event procedure of the listbox:
Private Sub lstTest_AfterUpdate()
Dim lstA As Control
Set lstA = Me.lstTest
Me.txtTest1 = lstA.Column(0)
Me.txtTest2 = lstA.Column(1)
Set lstA = Nothing
End Sub
I can also set the ControlSource property using the MS Access UI via the Properties window in the txtTest1 and txtTest2 controls to the following to achieve the same result.
txtTest1 ControlSource: =[lstTest].[Column](0)
txtTest2 ControlSource: =[lstTest].[Column](1)
Is there any difference between these 2 approaches as far as performance is concerned? Any documentation on this would be greatly appreciated.
There is a “bit” of difference, but not really anything that going to make or break the application performance wise.
The first example could be considered better, since the values are “stuffed” into the other controls. The problem of course is next time you load the form, if txtTest1/2 are UNBOUND then next time the form loads, you would presumably have to run some code to re-load up the values again. (so this makes the first example worse)
Thus in your first case, the values will NOT persist and next time you load the form (or navigate to a different record), then such values will not update since your first example ONLY updates the values WHEN the after update event fires. That after update event ONLY fires WHEN you change the combo box, not on a general form load or navigate.
So the issue likely not performance, but simply that of your first example will NOT work nor display the data next time the form loads (unless of course the textboxes were bound to underlying columns).
Since the code is required to always run when the form loads, or record navigation occurs, you likely best use the control source approach since in BOTH cases you likely want these values to display correctly and thus in both cases you have to reference the .column() property anyway.
BIRT 3.71v20110905
One of my data fields is a CLOB with html tags. I'm using the Dynamic Text Control in my report. This specifically happens when:
The Dynamic Text Control content type is to HTML or Automatic
in my case since I have html tags in the data. (Problem does not occur if I set the content type to Plain, but then the HTML tags show up in the report output as text.)
and
The total amount of data to be displayed by the control is more than one full page on its own
(without taking into account spacing used by other controls). If the
total amount of data to be displayed by the control is less than one
full page but can't all fit on the current page, it works as expected (meaning it displays what it
can on the current page and wraps the rest correctly onto the next
page.)
Is this a bug in the calculation for the DTC pagination?
Additional notes - I encountered this while trying to use a sample report that inserts a page break as needed between groups for duplex printing. It works great under most circumstances, but not when this DTC pagination issue rears up. ( GroupAlwaysStartsOnOddPage.rptdesign )
Sorry to disappoint, but this is a known issue and has not yet been resolved. At least not in the version of BIRT that Maximo is using.
What I tend to do is break the dynamic text where possible, experiment until I get the largest possible part on one page and put the rest into another dynamic text field.
This is obviously only a work around, but as far as I know there is not much else that you can do.
We ran into this problem with a dynamic text field containing HTML content coming from IBM Maximo long description fields. The report was designed in BIRT 3.7.1 Designer.
We were able to work around the duplication bug by changing the layout from Fixed to Auto. With Auto layout, it is also not necessary to change the Display setting of the field to "inline" (which we previously had to do to allow it to flow between pages without creating an initial page break).
In our case, changing the layout to Auto did not have negative effects on the appearance or geometry of our report.
Looking for an example of a usercontrol in a datagridview row using Windows forms.
The Usercontrol would have multipe controls based on the business logic which depends on the the index of the row.
Thanks
You cannot insert a user control directly into a row in the way you would like. Your only possiblity is to add a new column type. Your custom column implementation would act like the other columns in that when it enters Edit mode it can create a control (in your case an appropriate one for the index number) and then have it work inside the cell until the Edit mode is exited. The issue would be drawing the cell when not in Edit mode.
You can see the source code of the builtin columns by using the .NET Reflector tool or search the web for custom DataGridView columns as there are many implementations that give sample code you could use as a starting point.
This is my first time building a UI in Access (using Access 2007), and I'm wondering what is the Right Way (TM) of going about this.
Essentially, I have several different queries that I'd like to display as pivot charts, pivot tables, tables, and reports. Eventually I'm also going to have to build forms to manipulate the data as well, but the application's primary function is to display data.
I'm thinking of having a button for each different display down the left side of the main window, and having the rest of the window display each button's corresponding contents (e.g. a pivot chart).
I have an idea that this can be accomplished using a single subform in the main form, and setting the subform's Source Object property within a function such as this one:
Public Function SetSubformSourceObject(newSourceObject) As Variant
subform.SourceObject = newSourceObject
End Function
Then, for each button I'd set its OnClick property to call this function with the name of the query I'd like to run.
Now, I have no idea if this is the best way of going about things, and would really appreciate some input :)
The principle seems fair to me. You have to give it a try. You do not even need a form-subform structure. You can set your sourceObject at the form level, and have your buttons in a commandBar instead of having them as controls on the form, so you do not have any 'form specific' code (like "onCLick") and controls. action/command controls on a form are space, code and maintenance consuming, while commandbars are more generic and are THE object that can hold all your action controls.