how to printing selected record (on MultiSelect Grid Mode)
i want to print report base on user selection on DBGrid (No filter - MultiSelect Mode)
i already use some method:
1. Use GetValue method for TFrxUserDataSet
Sample
procedure FMain.frxItemGetValue(const VarName: string;
var Value: Variant);
begin
with DBGrid1.DataSource.DataSet do
begin
GotoBookmark(pointer(DBGrid1.SelectedRows.Items[frxItem.RecNo]));
if CompareText(VarName, 'ItemCode') = 0 then
Value := AQItemTable_ItemCode.AsString;
if CompareText(VarName, 'ItemName') = 0 then
Value := AQItemTable_ItemName.AsString;
if CompareText(VarName, 'QtyMax') = 0 then
Value := AQItemTable_QtyMax.AsString;
end;
end;
----> But this way not flexible, because more efforts for much fields
2. Use Temporary Table
We generate Temporary Table base on User Selection
But this method take long time if much data selected
Any way for solve this problem more quickly develop and quick generate report.. (Without CheckListBox)
Thanks...
i already use some method:
1. Use GetValue method for TFrxUserDataSet
Sample
procedure FMain.frxItemGetValue(const VarName: string;
var Value: Variant);
begin
with DBGrid1.DataSource.DataSet do
begin
GotoBookmark(pointer(DBGrid1.SelectedRows.Items[frxItem.RecNo]));
if CompareText(VarName, 'ItemCode') = 0 then
Value := AQItemTable_ItemCode.AsString;
if CompareText(VarName, 'ItemName') = 0 then
Value := AQItemTable_ItemName.AsString;
if CompareText(VarName, 'QtyMax') = 0 then
Value := AQItemTable_QtyMax.AsString;
end;
end;
----> But this way not flexible, because more efforts for much fields
2. Use Temporary Table
We generate Temporary Table base on User Selection
But this method take long time if much data selected
Any way for solve this problem more quickly develop and quick generate report.. (Without CheckListBox)
Thanks...
Comments
In Delphi when this user function is called, goto next selection record.