Topic: Using Grid Results in Report

Hi,
Is it possible to use Grid Results Directly in Reports ?!

Because I do many math with scripts to Grid result and it is near to Impossible to do all of them again in Report!

For example I have a ComboBox in my Project,

If the combobox Select number one , and first column of any row is not equal to ComboBox Text, then my script set those values to negative!

so, It is easier to have Grid results Directly into the Report!

Re: Using Grid Results in Report

Hello,


Added this function in latest beta version 1.47, first please download:
https://www.dropbox.com/s/bhwao1izh5q4y … 7.zip?dl=0



Here you can download example project:

Post's attachments

Attachment icon TableGrid to report.zip 7.37 kb, 1163 downloads since 2014-11-10 

Dmitry.

Re: Using Grid Results in Report

Should I Use scripting like this ? :

procedure frxReportBeforePrint(Sender: TfrxReportComponent);
var
  Cross: TfrxCrossView;
  x, y, cx, cy: Integer;
begin
  if Sender is TfrxCrossView then
  begin
    Cross := TfrxCrossView(Sender);

    // Columns name
    cx := Form1.GridEmployees.Columns.Count - 2;
    for x := 0 to cx do
          Cross.AddValue([-1], [x], [Form1.GridEmployees.Columns[x].Header.Caption] );

    // data
    cy := Form1.GridEmployees.RowCount - 1;
    for y := 0 to cy do
      for x := 0 to cx do
        Cross.AddValue([y], [x], [Form1.GridEmployees.Cells[x,y]]);
  end;

end;



begin

end.

Re: Using Grid Results in Report

Dear Dimitri ,
I cannot Understand this Script and how it works !
I cannot get values in Report designer side!!!
Also I do not know how can I wok with Cross component sad

Re: Using Grid Results in Report

Please, send me your project to support@drive-software.com
with description, from which TableGrid you need data for report.

Dmitry.

Re: Using Grid Results in Report

Hi,
Dear Dimitri did you Received My Email ?!

Re: Using Grid Results in Report

Hello,


No, please try to send drive.soft.mail@gmail.com

Dmitry.

Re: Using Grid Results in Report

Dmitry, I used the script above that you published and worked, but I do not manage to use the same thing to produce another report. I want to print the tablegrid in 2 reports. How can I use the same routine?

Roberto Alencar

Re: Using Grid Results in Report

jrga wrote:

Dmitry, I used the script above that you published and worked, but I do not manage to use the same thing to produce another report. I want to print the tablegrid in 2 reports. How can I use the same routine?

Please attach your project and some info about the project.

Dmitry.

Re: Using Grid Results in Report

Dmitry, please, how can I use the routine above if I have 2 tablegrids?

Roberto Alencar

Re: Using Grid Results in Report

jrga wrote:

Dmitry, please, how can I use the routine above if I have 2 tablegrids?

An example for you

Post's attachments

Attachment icon TableGrid to report for few grids.zip 10.21 kb, 604 downloads since 2019-05-27 

Dmitry.

Re: Using Grid Results in Report

Dmitry, thank you, but I wanted to print each tablegrid in a different report, in other words, there are 2 reports. Is it possible? The ideal is if there was a function to call any tablegrid to criterion of a user

Roberto Alencar