Web Service StimulSoft Report Object???

Stimulsoft Reports.NET discussion
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Web Service StimulSoft Report Object???

Post by roomy »

I am looking for your valuable suggetion basiclly I am using a web service to report and have two opetions ...
First one is web service just send xml data to my application and I create mrt report in that application using this xml data.
And the second is web service return StiReport object (Already create report with data) and show in my application.

But here I sceared about the performence of my application. which one is better approach? and Returened StiReport Object create speed issue here.

I am looking for your valuable suggession on to that.

Thanks,
Roomy
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Web Service StimulSoft Report Object???

Post by roomy »

Can i use [Serializable()] with stireports?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Web Service StimulSoft Report Object???

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Web Service StimulSoft Report Object???

Post by roomy »

I am looking to create a web service which can return serialized stimulsoft StiReport object.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Web Service StimulSoft Report Object???

Post by Alex K. »

Hello,

Could you, please clarify why do you need this? Why do you find the standard methods Save, SaveToString etc. in the report not appropiate?
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Web Service StimulSoft Report Object???

Post by roomy »

Hi,
Could I save the mrt report with data in string format??? because it is easy to return string from a web service.

thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Web Service StimulSoft Report Object???

Post by HighAley »

Hello.

You could save rendered report to string with SaveDocumentToString() method.

Thank you.
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Web Service StimulSoft Report Object???

Post by roomy »

Thanks its work fine.

Code: Select all

public string GetRpt(int id)
{
  StiReport report1 = new StiReport();
  ......
  ......
   report1.RegData(ds);
   report1.Dictionary.Synchronize();
   report1.Compile();
   report1.Render();
  return(report.SaveDocumentToString());
}

public void MainReport()
{
 //ids get from DB.
...........
...........
...........
StiReport JoinReports = new StiReport();
foreach (int id in arraylist)
{
 string str = GetRpt(id);
 StiReport subReport = new StiReport();
 subReport.LoadDocumentFromString(str);
 subReport.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, reportPath);
JoinReports.SubReports.Add(subreports);
}
 JoinReports.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, reportPath);
}
}
here I have two code line in MainReport() to create pdf from report:
1.

Code: Select all

subReport.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, reportPath);  
this line work fine and create pdf as I require for a single "ID".

2. But when i try to create a joined report for all ID passed one by one I got a blank pdf file.

Code: Select all

//Add subreport to JoinReports.
JoinReports.SubReports.Add(subreports);
//Create join pdf file but its blank... :(
JoinReports.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, reportPath);
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Web Service StimulSoft Report Object???

Post by Alex K. »

Hello,

Please try to use the Render() method before export.

Thank you.
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Web Service StimulSoft Report Object???

Post by roomy »

I try that but still page is blank.
Post Reply