1

(0 replies, posted in Reports)

Dear's


I have a problem with the reports... The issue is that you must select the target table in the report, but I have a table that is not linked by any relationship. However, I need the value in ID 1 in the report, which is a variable value. What is the solution for this?

2

(9 replies, posted in General)

Thank you very much, dear Derek. You are always our savior



I have another question: Do you have an example of changing data in FastReport? I've tried this many times but always encounter errors. I want to understand the mechanism, and if you also have an example of a calculated field, that would be great. smile))) 

3

(9 replies, posted in General)

thanks

but the numbers in the table already

the Fast report code never worked with me , can someone explain how to me ???? or modify the sample that I have add  pleaseeeee ?

i want to know why it never worked for my

4

(9 replies, posted in General)

Here is the example: there are (days of  week ) represented as numbers, and I want to display them as the names of the days in the report

5

(9 replies, posted in General)

Dears
I get the days of the week as numbers in a table, can I change them in the report designer to the names of the days and how ?"


Thanks again

derek wrote:

There are a number of ways to achieve this.
One of the simplest is to display in your message the contents of a column that you specify in your script depending on the row you have clicked on (see the script in the attachment).  In this example, clicking on a row show the 'city' field.
Also you can be totally flexible and show the contents of any cell (any column, any row);  see the commented out code in the script.
Maybe this helps.
Derek.


Thank you very much i found a way and solved it ,  here is the code i have made

var
  selectedRow: Integer;
  valueNeeded: String;
begin

  selectedRow := TOTAL_Hours.TableGrid1.SelectedRow;

  valueNeeded := TOTAL_Hours.TableGrid1.Cells[3, selectedRow]; 


 TOTAL_Hours.Label11.Caption := (valueNeeded);

what to change in this code to get other cell value from selected row in datagrid instead then the ID .

ShowMessage ('ID record:' + IntToStr (TOTAL_Hours.TableGrid1.dbItemID)); // Get selected record id

derek wrote:

As I already wrote in my previous answer

 replace 'fkcount' with 'fksum' in the script

See new attachment.
Derek.


Sorry it is my mistake I didn't read carefully


to be honest you are genius !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Thank you very much 

derek wrote:

Hi,
From your post, I assume that you are not currently using standard MVD functionality to display tablegrid footer values.
In that case, have a look at the attached example and simply replace 'fkcount' with 'fksum' in the script and adjust the column number to be the column that contains 'hoursmissed'.
However, if you are already using standard MVD functionality to display tablegrid footer values, you do not need lines 3-4 in the script.
Derek.


Thank you very much for your answer , but what I need not the total number or rows , what I need is the total summation  of column ...like if I have

5
2
4
2
5
in column  to have summation  of them in label (18)

dears How can I sum the values displayed in a column of a tablegrid and place them in a label? The name of the tablegrid is tablegrid1, and the column is called hoursMissed in the myabsences table. Of course, the result shown is the outcome of certain filters.

11

(2 replies, posted in SQL queries)

i have this query

if SQLExecute("SELECT COUNT(*) FROM student WHERE date = '" + student.DateTimePicker1.sqlDate + "' AND id_Teachers = CAST('" + student.ComboBox1.sqlValue + "' AS INTEGER)") <> 0 then

here I want to check the date if this date is already available for specific teacher for that I used

id_Teachers = CAST('" + student.ComboBox1.sqlValue + "' AS INTEGER)"

to check only if the date is available for that teacher (id_Teachers) and this is a forging key , but the code is not working ! any idea please …

I have changed the student.ComboBox1.sqlValue  to integer as I see that it is a string .