get data, do some processes on them, retrive and display them on report??

Stimulsoft Reports.WEB discussion
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

get data, do some processes on them, retrive and display them on report??

Post by M.I.A »

Hello

I also tried that, i called it in HTML preview but did not work also although i did exactly all steps in that video, however now i think this way not possible to doing in my web application, and i need the solution for web application because my project by ASP.NET and C#.

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

get data, do some processes on them, retrive and display them on report??

Post by Jan »

Hello,

Please send your report to support@stimulsoft.com. We will check it. Also you can add your own function similar to this:

http://forum.stimulsoft.com/Default.aspx?g=posts&t=3007

Thank you.
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

get data, do some processes on them, retrive and display them on report??

Post by M.I.A »

Hello

Thank you Jan for your reply, regarding the report you want me to send, which one you want? the original one, or the test report that i tried to attach my function in it?


The second point is, now i am trying to play the hole data of my project in the report template, my database is huge, and when i wrote the necessary codes to display my report an exception generated, and this is the exception message:

System.OutOfMemoryException was unhandled
Message="Exception of type 'System.OutOfMemoryException' was thrown."
Source="mscorlib"
StackTrace:
at System.Threading.ExecutionContext.CreateCopy()
at System.Threading._TimerCallback.PerformTimerCallback(Object state)
InnerException:


is that because my report pages number are: 7235 page?


Because i am sure that my codes are correct and i tried similar code before in test project by ASP.NET and the result was perfect.

some of my code:

StiReport report = new StiReport();
report.Load(Server.MapPath("EnrollmentReport.mrt"));
report.RegData(myDataSet);

StiWebViewr1.Report = report;



Thank you.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

get data, do some processes on them, retrive and display them on report??

Post by Vladimir »

Hello,

Huge amount of pages in a web reports can lead to the lack of server memory. More than 300 pages is a very big report for Web. It could take around 300Mb of the ASP.NET server memory and even more if there are images in the report pages. The server itself does not provide such amount of memory for the process can be interrupted. There is only one decision. It is to split big report into some smaller ones.

Regarding you first question please watch attached sample.

Thank you.
Attachments
376.WebViewer_UserFunction.zip
(13.59 KiB) Downloaded 336 times
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

get data, do some processes on them, retrive and display them on report??

Post by M.I.A »

Hello all

First of all i would like to thank you all for your support and help for me and for every member in this forum.

In the other hand, i already ran the attached application and the function of the user is displayed, and that what i exactly want.

The problem is: when i tried to change that function to my function, the report just displayed blank page, i know something wrong from my code and i really feel that i am very near to the solution.


In the attachment my sample program after i added my function that i want my dates pass in it before come to the report.


Thank you again.

Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

get data, do some processes on them, retrive and display them on report??

Post by Andrew »

Hello,

1. You should create ASP.NET Web Application instead of WebSite to use its dll in a report.
2. All functions should be defined as static. In this case, there is no need to create the class instance in a report for using its functions.

Thank you.
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

get data, do some processes on them, retrive and display them on report??

Post by M.I.A »

Hello

Yes i created my application in ASP.Net, it is web application you can check that in the fist attachment.

Regarding the second steps, i already defined my function as static function, but an error generated said: "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\WebSite1\WebSite1\web.config 48".

In the attachment, my web application after i defined my methods as static, you can see them in General Class.

Thank you.
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

get data, do some processes on them, retrive and display them on report??

Post by M.I.A »

Sorry still cant upload my file in here, so i uploaded it here in this like:
http://www.4shared.com/file/252676791/c ... Site2.html

Looking for your feedbacks.

Thank you.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

get data, do some processes on them, retrive and display them on report??

Post by Andrew »

Hello,

Regarding your application (WebSite2):
You need to do two things to use the functions defined in your class: 1) Add a namespace to a report, 2) Add the DLL of your Web-based applications to the report.

In the example, which we sent you, we have shown an example of how to do it. In your case to add links to your DLL's, please correct your application the following way:

report.Script = string.Format("using ;\n{0}", report.Script);
referencedAssemblies[referencedAssemblies.Length - 1] = ".dll";

Otherwise report engine can not use the user function.

Thank you.
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

get data, do some processes on them, retrive and display them on report??

Post by M.I.A »

Hello,

Thank you Andrew for your replies and support.

The function works fine, but the problem is: just one result display by that function in the report template, because i put that text component in data band and pass it in that function to display many results from my database but that did not work.

I want just one column from my database pass in my function then the result must display beside the other columns in stimulsoft template.

For example: i have 4 columns, they are displaying very well in simulsoft template, but i need just one column which is DateColumn, i want this column first pass in this function:

public string GetUserText(object gre)
{
GregorianCalendar Grn = new GregorianCalendar();
UmAlQuraCalendar Umq = new UmAlQuraCalendar();

DateTime greg = (DateTime)gre;
int year = Umq.GetYear(greg);
int month = Umq.GetMonth(greg);
int day = Umq.GetDayOfMonth(greg);

string hijri = day.ToString() + "/" + month.ToString() + "/" + year.ToString();
return hijri;
}

then the results of this converted dates must insert to dataset or any other way to display this converted dates under the date column in the stimulsoft template beside other columns.

I did that using GridView, but until now i cant figure how i can do it using stimulsoft report which is more powerful and have much features than GridView.

Thank you.
Post Reply