Any comments?
2 2024-03-31 22:15:00
Topic: Search multiple fields using one Input (1 replies, posted in Script)
Hi everyone,
I want to enable searching on my form. However, it seems we can only search one field at a time with an input text.
Is there any way to use just one input field to search multiple fields from a table? For example, I have a field for a name and another one for a last name. Is there any way to search both using just one input, regardless of whether we're searching for a name or a last name? I don't want to use any combinations of both.
Many thanks!
3 2024-03-31 22:08:58
Topic: Regarding Bar Chart Representation (4 replies, posted in Script)
Hi everyone,
I created a bar chart using this script example (This one: https://myvisualdatabase.com/forum/view … ?id=5340), and it works. I have data for months and income. Currently, I'm using numbers instead of month names to represent the correct month. Is there any way to use strings instead of floats or dates in bar charts?
Many thanks!
ChartBar := TChart.Create(Main);
ChartBar.Parent := Main.LevelChart;
ChartBar.Align := alClient;
ChartBar.AddSeries(TBarSeries.Create(ChartBar));
ChartBar.Series[0].AddXY(Month,Value);
4 2024-03-31 15:17:23
Re: Query Adjustment: Filtering Grid Results by Year and Month-Year (2 replies, posted in SQL queries)
Hi Sonixax,
Perhaps you can take a simpler approach (providing I understand your problem correctly).
Can you not just use two calculated fields (one for 'month' and one for 'year') formatted using 'strftime'?
Have a look at the attachment.
Regards,
Derek
Hi
Thank you for the solution, it solved my Problem.:)
5 2024-03-25 17:40:07
Topic: Query Adjustment: Filtering Grid Results by Year and Month-Year (2 replies, posted in SQL queries)
Hi everyone,
I just have a question regarding my query. I want to have a query to filter some results in my grid based on a date time picker data.
This is my current query in a calculated field in the database and it works like a charm:
bookings.monthly_fee * ROUND((JULIANDAY('now') - JULIANDAY(start_date))/30) - (SELECT ifnull(SUM(amount),0) from payments where payments.id_bookings = bookings.id)
Now I want to filter based on the year only and month-year instead of the current date. This means when I select the year only, the query should change the current date to the last day of that year. Similarly, when I select a month, it should set the current date to the last day of that month in the selected year.
How can I do it?
Additionally, how can I utilize the DateTimePicker component value in an SQL query form? I mean without any script. Alternatively, if I have to use scripts, how can I pass the results to my grid to display them?
Many thanks and have a lovely day!
7 2023-05-22 09:29:36
Topic: Sum a column in reports (1 replies, posted in Reports)
Hi,
I just have a simple project and want to sum a column data in report, but instead of sum it show all records behind each other!
how can I fix it?
many many thanks
8 2023-04-23 21:22:26
Topic: Change thousand seperator (1 replies, posted in Reports)
Hi everyone,
I just want to know how can I change Thousand seperator from , to .!
It seems fastreport ignoring system setting.
so what is the correct format setting?
many many thanks
9 2023-03-14 23:47:20
Re: Default Printer per template using scripts (5 replies, posted in Script)
Many Many thanks.
10 2023-03-14 23:45:48
Re: How to filter combobox results based on database calculated field? (3 replies, posted in Script)
Thank you Derek, you made my day
11 2023-03-14 23:44:03
Topic: setfocus not working! (2 replies, posted in Script)
Hi,
I just have a simple DB, All i want to save data to database and set focus to a textbox after hitting enter.
saving works fine, but set focus not working!
how can I make it to work?
I just attached the project.
and I have another problem, Cannot have empty value for relations and must select notnull in database to prevent of error but sometimes I need to leave the field empty
Many Many Thanks
12 2023-03-12 21:31:29
Re: How to filter combobox results based on database calculated field? (3 replies, posted in Script)
Also, this is my calculated field query:
(CASE
WHEN (SELECT b.id_bestand
FROM positionen b
WHERE b.id_bestand=bestand.id) != 0
THEN "Verkauft" ELSE "auf Lager" END)
13 2023-03-12 21:30:10
Topic: How to filter combobox results based on database calculated field? (3 replies, posted in Script)
hi,
I have a calculated field in my database which is returned sold or available as text.
I have another combo box which shows all records from that table.
I need to know how can I filter every SOLD items to prevent showing them in my combobox?
Many many thanks
14 2023-03-12 21:27:21
Re: Default Printer per template using scripts (5 replies, posted in Script)
any Idea?
15 2023-03-07 23:34:02
Re: Default Printer per template using scripts (5 replies, posted in Script)
Hi, I have three printers on my system, each with a different paper size and type.
I want to define a default printer for every report template in my app settings. How can I do that using scripts? I have already created a setting system using ini read and write, and I want to define the printer for each template in that ini file.
Many Thanks
16 2022-12-17 22:31:51
Topic: currency conversion rate (0 replies, posted in Script)
Hi,
is there any example to show how to retrieve currency conversion rate from free online services?
main currency is Euro, and then I need to show the rate in Dollar and Pound.
Many Many thanks
17 2022-12-17 22:29:32
Re: Change Grid cell text (9 replies, posted in Script)
Sparrow, Derek, k245.
Many many thanks for your support
Everything now working perfectly, I just have another question which is need another topic.
Many thanks again.
18 2022-10-31 20:26:52
Re: Color picker (5 replies, posted in General)
Забей на HEX, сохраняй и восстанавливай десятичное (оно же и есть TColor)
Form1.Edit1.Text := IntToStr(cDialog.Color); Form1.Edit1.Color := StrToInt(Form1.Edit1.Text);
Many Thanks but when I run this:
TdbPanel(Main.FindComponent('Panel'+IntToStr(i))).Color := StrToInt(SQLExecute('SELECT busycolor FROM settings order by id desc'));
I Have this:
FF0000 is not a Valid Integer value
How can I solve this?
19 2022-10-31 20:00:27
Re: Change Grid cell text (9 replies, posted in Script)
Hi Sonixax,
Works okay for me (Windows10 and MVD 6.5) - see attachment.
Maybe upload your project to see if there is something else going on.
Derek.
Sure,
Attached you can find the project.
Many thanks
20 2022-10-31 15:38:42
Re: Color picker (5 replies, posted in General)
Many Many Thanks,
Sorry for late I was in Hospital.
One ore question, how can I convert that Hex string to TColor?
Many Many Thnaks
21 2022-10-31 15:16:26
Re: Change Grid cell text (9 replies, posted in Script)
I have a question,
this
Main.TransGrid.Cells[9,i] := 'Nein';
return an error and said Nein is not integer!!!!!!
before update to v6 this one was ok but now its not working anymore
How can I fix it?
Many thanks
22 2022-10-04 20:38:09
Topic: Color picker (5 replies, posted in General)
Hi,
Is it possible to have a color picker? and save the value as hex in db?
many many thanks
23 2022-09-11 12:15:14
Topic: Send field Value to Report (1 replies, posted in Script)
Hi,
Is there any way to send a input box variable to a report as variable which is not saved in database?
Many thanks
24 2022-09-11 11:19:48
Re: Daysbettween in Database Calculated field! (4 replies, posted in Script)
Hi,
Many thanks again for your help.
Just have another question.
this is the query which is works fine
(SELECT JULIANDAY('now') - JULIANDAY(date) AS date_difference_in_days FROM payments where payments.id_customers = customers.id ORDER BY payments.id DESC LIMIT 1)
I just want to change it a little bit.
If there is no date record in payments records then I want to take start_date field from bookings table instead.
is it possible?!