report explorer - several reports
Hello,
in report explorer end-user can select several reports at the same time
(multi select), but if the end-user press Print or Print Preview, then shows
up only the last report, not all. Do i need implement that part myself and
how, or what to do ?
Regards,
Simonas
in report explorer end-user can select several reports at the same time
(multi select), but if the end-user press Print or Print Preview, then shows
up only the last report, not all. Do i need implement that part myself and
how, or what to do ?
Regards,
Simonas
This discussion has been closed.
Comments
You can create a custom report explorer form by copying the existing one and
registering it with RB. For an example, check out
RBuilder\Tutorials\Complete\Applications\Custom ReportExplorer.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
at first in procedure TrbReportExplorerForm.PrintPreview; we have
if (FListView.ItemName = '') then Exit;
FReportExplorer.PrintPreview(FListView.ItemName,
FListView.FolderId{FListView.ItemId});
and we should have
FReportExplorer.PrintPreview(FListView.ItemName, FListView.FolderId); to
work correctly.
Now question is how to get selected items id's ?
we have FListView.SelectionCount property, but we don't have Selections or
any like that property.
So how to get these selected items ?
Regards,
Simonas
procedure TrbReportExplorerForm.Print;
var
i: Integer;
begin
if FListView.SelectionCount<=0 then Exit;
for i := 0 to FListView.Items.Count-1 do
if FListView.Items[i].Selected then
FReportExplorer.Print(FListView.Items[i].Caption,
integer(FListView.Items[i].Data));
end; {procedure, Print}
now i've got another problem. How to print all selected items(reports)
without showing printer dialog? And how to shoe printer dialog for all these
reports user has selected?
Regards,
Simonas
Simplest approach would be to set Report.ShowPrintDialog to true for the
first report and set it to false for the rest of the reports. For the first
report, also set Report.SavePrinterSetup to true. Then after the firtst
report prints, you can assign the Report.PrinterSetup.PrinterName from the
first report to the subsequent reports.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
how do I get the right Report object in procedure
TrbReportExplorerForm.Print;?
There is only one TppReport instance - the one on the form. The TppReport
can load templates from the database.
The relationship is...
Report <-- Designer <-- ReportExplorer
Programmatically...
myReportExplorer.Designer.Report
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
it does not work. PrinterDialog shows again and again.
I work with v7.04
"Nard Moseley (Digital Metaphors)" wrote :
Please create a simple, minimal example. You can use one of the end-user
examples or the custom report explorer tutorial as a starting point. Modify
it to show what you are doing. Send in zip format to
support@digital-metaphors.com and we can check it out.
The other approach is to work thru it incrementally. For example, place a
report on a form and set Report.ShowPrintDialog to False. Now call
Report.Print from a button click event. Does that work? (Answer should be
yes). Now from there incrementally add complexity to process a list of
reports.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com