Delphi 10.1 Berlin Fast Report - Show Multiple Records in One Page - delphi

Below is the design of my report.
When clicking the preview button, it shows one record every page.
How to make it display multiple records until the page is fully occupied, and then the next record will be on the next page? I want something like the image below.

Looks like you have set the StartNewPage property flag on your MasterData1.
Click that band with the righ button and uncheck the Start New Page of its Menu.

Instead of defining Report DataSet, define MasterData1 DataSet.
Right click on MasterData1, Edit... select the your DataSet and set the value of Number of Records to 0. Probably this property is set with 1.

Related

Delphi 10 TMS FireMonkey grid - problem with SelectRows() and RowSelectionCount

I am using TMS FireMonkey Grid in my app and currently trying to implement the ability to select a range of rows by double-clicking on the first row and then double-clicking on the last row of the range. I use the SelectRows(StartRow,EndRow) method in the OnCellDblClick event handler. It seems to work, except for one thing: the RowSelectionCount does not get set properly (equals 1, regardless how many rows I select) until I call ShowMessage() with something random, like 'Hi!' - after that it gets set to a correct number of selected rows. I figured it has something to do with focus, so I tried to use the SetFocus to change focus to another component of the form and then back to the grid, but that didn't help. Any ideas on how to get RowSelectionCount to carry a correct value right away?
The grid's SelectionMode property is set to smDisjunctRow - according to an email I received from TMS Support, this setting should allow me to use RowSelectionCount.
Thanks in advance!

SSRS on screen preview vs on print preview

I have SSRS report with many rows
When I print it, it looks nice, rows are split into multiple pages, each page has its number, that's what I want.
but when I click "View Report" button the report show up on screen with all rows in the same page and i have only one page.
Is there anyway I can make it looks like exactly how it will be printed when user click on "View Report" button
in another words I want the on screen preview to be A4 width and size
I changed the Interactive Size and Page Size, still getting all records in 1 page on the screen.
I am using SSRS 2008 R2
To display a fixed number of rows per page for an SSRS report, follow these steps:
Add a new Parent Group to the existing top level group row.
Type =CEILING(RowNumber(Nothing)/50) in the Group by expression.
50 is the number of rows you want to show up on each page.
Click OK to create the Parent Group.
Right click on the Parent Group that you have just created and select Group Properties.
On the Page Breaks tab, select Between each instance of a group
On the Sorting tab, delete all the sorting options shown.
Click OK to confirm the changes to the Parent Group.
Lastly, right click on the Parent Group and select Delete Columns only.
Please click here: for more detailed instructions with screenshots.

Is there a way navigate directly to a section in an Orbeon form?

This would save loads of time when testing a specfic section which is far down the form and the form is configured in a Wizard View.
I just wondered whether there is a querystring parameter or xpath setting to put in xforms-inspector which will save us endless clicks on the Next button! So far the best way I have found is to disable the Wizard View so that the form shows vertically.
This isn't currently supported, but it sounds like a worthwhile feature to have, and I've created an RFE for this feature.
I don't understand why you have to click next all the time, you should be able to just click on the section name in the table of contents.

Need to Update a file after a DBGrid Double-Click

I seem to have a mental block with this one.
I need to save recent changes to a Record. I am doing it OK with buttons for "New" "Edit" "Post" "Next" etc but when a user double-clicks a DBGrid, it is now too late to make changes as the DBGrid selection has moved the database cursor to the selected record.
I can't use AutoUpdate as the data that may have been changed is not something the user would have directly entered, it is a value that is changing all the time.
I'll try to describe it better: While the user is reading a Test-page, a timer is counting down or up. When they click the "Next" or "Prior" buttons I can save the timer setting. But, if they Double-Click the DBGrid I have no way of first changing the current Record before the selection moves to the clicked-Record.
I tried using the
Procedure TForm1.tblTestOnBeforeScroll(...
begin
tblTest.Edit;
tblTest.FieldByName('TimerCt').AsInteger:=ClockCtr;
tblTest.Post;
end;
But, that crashed the database, not surprisingly, but I thought I would give it a try before asking here.
How do I deal with the current record? I do not want to disallow the double-click if possible as it seems nice and intuitive for the user.
I'm afraid that what you do on DBGrid is a wrong in concept action.
Key point is DBGrid is a data aware control. So everything you do on it must based on it's datasource then it's dataset.
There is a DblClick event on TDBgrid. But still you have to check it's dataset to see what record is active.
The code you shown above clearly lead you to an endless loop.
When you doing a scroll, the dbgrid will call OnBeforeScroll event, moving the active record
and call OnAfterScroll. Your OnBeforeScroll code does an data update. Then dbgrid abort its operation cause of data change. Then after data update, it try to scroll again, and the data change happen again. Endless loop happen here.
best regard
Apologies in advance if I'm misunderstanding you, but it seems to me that either the premise of your question is wrong or there is something relevant you haven't told us about what you're doing. Please try the following:
If you don't have one already, please temporarily add a DBNavigator to your form and connect it to the same DataSource as your DBGrid. The point of doing this is so that you can more clearly see what's going on.
Then, in your DBGrid's Options, set dgEditing to True.
Finally, comment out or disable your BeforeScroll handler, save and run your program.
Now, click once in some cell in your DBGrid that contains a value which it's ok to change. Click it a second time so that it selects the value in the cell rather than the cell per se.
Make some change to the cell value, but do nothing else for the time being. You should notice that a) the current record indicator of the DBGrid has changed from a black triangle to an I-Beam graphic, like ][ and b) that the tick and cross buttons of the DBNavigator are now enabled.
Now, without doing anything else on the form, click in another row of the DBGrid. You should find that a) the change to what was the current record in step 5 has been saved and b) the current row indicator reverts to the black triangle and the DBNav's tick and cross buttons are disabled.
(If you don't get the behaviour I've just described, create a minimal new project and try that instead, as some other change you've made in your existing project may be interfering with it).
What I've described in 5 & 6 is the default behaviour of a DBGrid and insofar as I understand your q, that seems to be the behaviour you're trying to achieve. If that's not the behaviour you want, please explain exactly how what you do want differs. It's not clear to me where the user double-clicking on the grid comes into your q, except that that action may move the dataset's cursor (if the dbl-click is on a different row than the current one), but as the default DBGrid behaviour will save changes to the current row before it moves the dataset's cursor, it will do what you seem to want automatically.
Btw, what "AutoUpdate" do you mean? Did you mean TDataSource's AutoEdit property?

How to a TFilterComboBox (drop down box) larger?

By default, when I click a Delphi TFilterComboBox it will display only 8 items. To access the rest of them, the user has to scroll down which is such a wast of time. Can I make it display more items (or even all of them)?
I have found an answer that says: "If you click the combobox in the resource template editor, you can drag its "opened" frame size to fit more items".
But I don't know what is this "resource template editor".
Normally one would like to use its DropDownCount property to set the maximum number of items visible in the dropdown window. But that seems to be hidden here (i.e. it is protected). I guess one can send it a message directly:
SendMessage(FilterComboBox1.Handle, CB_SETMINVISIBLE,
WPARAM(YourDropDownCount), 0);

Resources