When recording a new record, how to stop the user adding items into the DBGrid, until the record ID has been created?
What ID of "Basic" or "Stock used"?
"Stock used" is dependent on "Basic"?
*
What recording?
mail tickbox, I think I got the code code right for the placement of the input field, but how to make the field visible, if a record exists?
What recording?
How to print on record with the articles used as one A4 page?
with report
Can one record with articles be exported into one Excel file?
What recording?
And why do you use comboboxes as single zones?
Last edit: neuts-jl 2021-01-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ckRequireReport... One line of code in a different location... argh
Merci Beaucoup!
Form Basic > new entry > data is lost in DBGrid, when form data is saved. How to prevent data entry in DBGrid, before a new Form entry is saved?
Btn Save > how to code correctly to prevent error (...Operation not allowed...)?
Report "stock for one" (your sample Factures.nsb helped!), but how to display/print the column headers in item RGridPanel? Is it only possible the way I have done? With additional rLabel outside of container RGridPanel?
I noticed this in the sample Factures.nsb too, in edit mode of the Report, the column headers are shown, but when printing the report, only data is shown, but not the column headers. Is that intentional?
txtRequireReport:Rtext how to print boolean value 'True' as "Yes" and 'False' as "No"?
ckRequireReport is bound to a field in the database, so you need to put the function call, where the data changes
Basic form> new entry> You must block the article as long as the record does not exist, so in insert mode
btnSave, that saves what, if that's all, you have to put code knowing what is the main and / or the articles presented
In the example invoice, the headers are not displayed even in edit mode, they are data fields.
To put a header you have to put labels above / before the RGridPanel, like you did
txtRequireReport: Rtext: you need to put code for each change, or do it in the request of your choice, I did it here in the view
On the reports, where or what formula would I need to apply to hide RLabel - labEmail - if there is no data in the field Email and RequireReport is 'No'?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to hide items on reports? Where or what formula would I need to apply to hide RLabel - labEmail - if there is no data in the field Email and RequireReport is 'No'?
frmBasic, there is something confusing happening, when saving a new event. I can enter the data in all fields and select data with xcb Dropdown fields. When saving a new data entry, for example id '5', the form then displays the previous id '4', displaying part of the data from id 5 and blank fields on cbx fields. When clicking 'Refresh', the correct data is displayed.
Hello surfvite, I've made a DBGrid form and want to list events or stock used between two dates via interactive search function. How to make query for a date range?
-
DBGrid clColour highlight, this is difficult to explain. I want to highlight a cell without data (the user never stored data in that field), if I use
[tbl.field]=" " clRed 0
it does not work on empty cells if no data was stored. It will only work if you have stored [space] or 0 . I believe these empty cells show as [Null] in a sql editor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) Must compare your date with 2 parameters (date>: min and date <: max)
2) This is a restriction of the current version which will be removed in the next version, the syntax is : if field="" then clRed clRed 0
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Conditional formatting is not a programming language and does not support expressions
you can compare one field with another or just a constant. according to the following operators "=, <,>, <>, Contains, NotContain"
You can test a field(visible or invisible) to condition another field
if field1="xxxxx" then clRed clRed 0 field2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm really struggling with this expression, but I'm sure the solution is to create another invisible field in the view?
field Basic.RequireReport is boolean, yes/no (customer requires report or not)
field Basic.ReportSent is a date field
These are the 4 states:
1 = RequireReport 'Y' and ReportSent "Null" = display 'Yes' in RRSDate
2 = RequireReport 'N' and ReportSent "Null" = display 'No' in RRSDate
3 = RequireReport 'Y' and ReportSent "anyDate" = display 'No' in RRSDate
4 = RequireReport 'N' and ReportSent "anyDate" = display 'No' in RRSDate
The formula below does not produce the desired result
Conditional formatting:
I want to use 'Yes' in field RRSDate for conditional formatting clRed on the date field ReportSent - this is working, thank you for the previous reply.
ifRRSDate="Yes"thenclRedclRed0ReportSent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just checking on the expression - this seems to work, to display a different column name, is that correct? I'm not sure about the use of the equal sign = , but without it would not work at all.
case
when Basic.RequireReport = 'Y' then 'Yes'
else 'No'
end as Report_Required,
I would like to have a date range dialog ((date>: min and date <: max)) for the export of data, is it possible to do this? Or would it be easier to create a form for this, with 2 date picker boxes?
functionMenu:btnExportActionOnClick()--addeddialogmessage,dialogwindowdoesnotshowfiletype*.csvforsaving.nsbase.dialog.showMessage('info','User must type [filename].csv for file name')rc,filename=nsbase.dialog.fileOpen('Export','*.csv','','')ifrcthenrc=nsbase.fileSystem.export('BasicAndConsumablesAll',',',filename,'header')ifrcthennsbase.dialog.showMessage('info','Export is ok')elsensbase.dialog.showMessage('error','Export is not ok')endendend
Last edit: Freen 2021-02-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm trying too many things, sorry
I would like to make one very simple data collection database, which allows to print and export collected data, like a clipboard device.
There are a few issues with the sample, I'm struggling with the code to create interaction.
Thank you very much for any help.
I have no idea what you want to do
When recording a new record, how to stop the user adding items into the DBGrid, until the record ID has been created?
What ID of "Basic" or "Stock used"?
"Stock used" is dependent on "Basic"?
*
What recording?
mail tickbox, I think I got the code code right for the placement of the input field, but how to make the field visible, if a record exists?
What recording?
How to print on record with the articles used as one A4 page?
with report
Can one record with articles be exported into one Excel file?
What recording?
And why do you use comboboxes as single zones?
Last edit: neuts-jl 2021-01-31
Recording = one (data)entry or one dataset.
Tickbox - ckRequireReport & edtMail - Data (from Basic.Email) present in field edtEmail is not shown, I don't know why.
Recording = one file/data entry item.
Comboboxes as single zones, I may have misunderstood your instructions? https://sourceforge.net/p/nsbase/forum/general/thread/0181bc879e/#031b/f1a3
What I understood
ckRequireReport... One line of code in a different location... argh
Merci Beaucoup!
Form Basic > new entry > data is lost in DBGrid, when form data is saved. How to prevent data entry in DBGrid, before a new Form entry is saved?
Btn Save > how to code correctly to prevent error (...Operation not allowed...)?
Report "stock for one" (your sample Factures.nsb helped!), but how to display/print the column headers in item RGridPanel? Is it only possible the way I have done? With additional rLabel outside of container RGridPanel?
I noticed this in the sample Factures.nsb too, in edit mode of the Report, the column headers are shown, but when printing the report, only data is shown, but not the column headers. Is that intentional?
txtRequireReport:Rtext how to print boolean value 'True' as "Yes" and 'False' as "No"?
Sorry for all the questions ^^;
ckRequireReport is bound to a field in the database, so you need to put the function call, where the data changes
Basic form> new entry> You must block the article as long as the record does not exist, so in insert mode
btnSave, that saves what, if that's all, you have to put code knowing what is the main and / or the articles presented
In the example invoice, the headers are not displayed even in edit mode, they are data fields.
To put a header you have to put labels above / before the RGridPanel, like you did
txtRequireReport: Rtext: you need to put code for each change, or do it in the request of your choice, I did it here in the view
Last edit: neuts-jl 2021-02-04
Hi surfvite, I see the formula in filter BasicAndStockForOne, but the result for the formula is always 'No'? I can't see why this is happening.
On the reports, where or what formula would I need to apply to hide RLabel - labEmail - if there is no data in the field Email and RequireReport is 'No'?
The ZEOS library translates Boolean values into Y or N so the code must be
Last edit: neuts-jl 2021-02-07
Got this function to work now, thank you :-)
How to hide items on reports? Where or what formula would I need to apply to hide RLabel - labEmail - if there is no data in the field Email and RequireReport is 'No'?
frmBasic, there is something confusing happening, when saving a new event. I can enter the data in all fields and select data with xcb Dropdown fields. When saving a new data entry, for example id '5', the form then displays the previous id '4', displaying part of the data from id 5 and blank fields on cbx fields. When clicking 'Refresh', the correct data is displayed.
1) element masking is not implemented
2) I can't find the xcb component ??
2) Sorry, typing error, it's cbx -_-;
.
Hello surfvite, I've made a DBGrid form and want to list events or stock used between two dates via interactive search function. How to make query for a date range?
-
DBGrid clColour highlight, this is difficult to explain. I want to highlight a cell without data (the user never stored data in that field), if I use
it does not work on empty cells if no data was stored. It will only work if you have stored [space] or 0 . I believe these empty cells show as [Null] in a sql editor.
1) Must compare your date with 2 parameters (date>: min and date <: max)
2) This is a restriction of the current version which will be removed in the next version, the syntax is :
if field="" then clRed clRed 0
BDGrid colour is working now, thank you.
DBGrid, is it possible to use conditional formatting for one cell based on another cell? If field B is empty and field A = Yes then field B = clRed.
Conditional formatting is not a programming language and does not support expressions
you can compare one field with another or just a constant. according to the following operators "=, <,>, <>, Contains, NotContain"
You can test a field(visible or invisible) to condition another field
if field1="xxxxx" then clRed clRed 0 field2
I'm really struggling with this expression, but I'm sure the solution is to create another invisible field in the view?
field Basic.RequireReport is boolean, yes/no (customer requires report or not)
field Basic.ReportSent is a date field
These are the 4 states:
1 = RequireReport 'Y' and ReportSent "Null" = display 'Yes' in RRSDate
2 = RequireReport 'N' and ReportSent "Null" = display 'No' in RRSDate
3 = RequireReport 'Y' and ReportSent "anyDate" = display 'No' in RRSDate
4 = RequireReport 'N' and ReportSent "anyDate" = display 'No' in RRSDate
The formula below does not produce the desired result
Conditional formatting:
I want to use 'Yes' in field RRSDate for conditional formatting clRed on the date field ReportSent - this is working, thank you for the previous reply.
Sqlite is special for 'null' cases
and you forgot a case in case
RequireReport ="Null" and ReportSent "Null" = display '?' in RRSDate
Just checking on the expression - this seems to work, to display a different column name, is that correct? I'm not sure about the use of the equal sign = , but without it would not work at all.
I would like to have a date range dialog ((date>: min and date <: max)) for the export of data, is it possible to do this? Or would it be easier to create a form for this, with 2 date picker boxes?
Last edit: Freen 2021-02-14
1) Do not use an = sign
2) A dialog box containing datetimepicker will be displayed in a typed parameterized request
example
Last edit: neuts-jl 2021-02-16