Page 1 of 1

while combine multiple reports & print,content non-readable

Posted: Thu Feb 15, 2018 8:14 am
by Manu Radhakrishnan
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

Re: while combine multiple reports & print,content non-reada

Posted: Fri Feb 16, 2018 1:51 pm
by Alex K.
Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.