I need to preview multiple reports, need them visible side by side.
However
LL.Print() is a blocking call.
So, I try
Task.Run( () =>
{
LL.AutoDestination = rs.AutoDestination;
LL.AutoShowPrintOptions = rs.AutoShowPrintOptions;
LL.AutoShowSelectFile = rs.AutoShowSelectFile;
LL.DefinePrintOptions += LL_DefinePrintOptions;
LL.Print();
LL.Dispose();
LL = null;
});
which works in general, but the looks of the preview changes dramtically compared to a direct LL.Print()
Am I missing something ?
Thanks
Oskar
well, it can be done
prepwork:
in the startup of the app
public static ListLabel LLpub;
…
LLpub = new ListLabel();
LLpub.LicensingInfo = “secret”; //
closing the app, cleanup
if (null != LLpub)
LLpub.Dispose();
then to print/preview
ListLabel LL = new ListLabel();
LL.DataSource = ds;
LL.DataMember = "ReportMaster";
LL.AutoProjectFile = lstfile;
LL.AutoProjectType = rs.ProjectType;
Thread tr = new Thread(
() =>
{
LL.AutoDestination = LlPrintMode.Export;
LL.AutoShowPrintOptions = false;
LL.AutoShowSelectFile = false;
LL.DefinePrintOptions += LL_DefinePrintOptions;
LL.Print();
LL.Dispose();
LL = null;
}
);
tr.SetApartmentState(ApartmentState.STA);
tr.Start();