Hi,
When I combined multiple reports and tried to print it as pdf, reports will be non-readable.
Here I am attaching the sample code that I used in the project.
public async Task BulkPrintPdf(List<int> headerIds)
{
int partnerId = PartnerId;
List<StiReport> listreport = new List<StiReport>();
foreach (var headerId in headerIds)
{
string reportPath = Server.MapPath(@"~\MRT_File\PartnerInvoice.mrt");
StiReport report = new StiReport();
string invId = "@invHeadId";
report[invId] = headerId;
var agentIds = await GetAgentFromHeader(headerId);
var currencyDetails = await GetInvoiceCurrency(partnerId);
string currency = "@currency";
report[currency] = currencyDetails.Id;
string agentId = "@agentId";
report[agentId] = agentIds.Item1;
report.Load(reportPath);
var DataBaseName = ConfigurationManager.AppSettings["DataBaseName"];
string ConnectionString = ConfigurationManager.AppSettings.Get("DatabaseConnectionString");
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase(DataBaseName, ConnectionString));
report.Render(false);
listreport.Add(report);
}
StiReport summaryreport = new StiReport();
summaryreport.Render(false);
summaryreport.RenderedPages.Clear();
foreach (var report in listreport)
{
foreach (StiPage page in report.RenderedPages)
{
summaryreport.RenderedPages.Add(page);
}
}
StiReportResponse.PrintAsPdf(summaryreport);
}
Thanks and Regards,
Manu Radhakrishnan
while combine multiple reports & print,content non-readable
-
- Posts: 2
- Joined: Tue Dec 19, 2017 9:19 am
while combine multiple reports & print,content non-readable
- Attachments
-
- IMG_15022018_134345_0.png (39.06 KiB) Viewed 1113 times
Re: while combine multiple reports & print,content non-reada
Hello,
Please send us a sample project which reproduces the issue for analysis.
Thank you.
Please send us a sample project which reproduces the issue for analysis.
Thank you.