Stimulsoft Reports.Net
www.stimulsoft.com

Welcome Guest Search | Active Topics | Members | Log In | Register

get data, do some processes on them, retrive and display them on report?? Options
M.I.A
Posted: Thursday, March 11, 2010 10:21:13 AM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
Hello all,

i already designed my report by stimulsoft, i have data band that contains more than one text components, all of these text components connected with data source in stimulsoft to retrieve data from my data base, every thing work correctly until now and i can see my information in my web application by stimulsoft report.

My problem is: i want get from date column from my data base rows, do some manipulations and then retrieve this manipulated data to one of these text components (suppose it is "Test3") in stimulsoft report, and the rest of my data it will display directly from my data base to stimulsoft report.

My report running good now, just the problem in this component ("Text3"), i don't know how i can display it in stimulsoft report after manipulation, i already did the manipulations in this column and i put the result in string array, but as i said i don't know how i can display and return results of this array to stimulsoft report.

Thank you all.
Andrew
Posted: Thursday, March 11, 2010 5:17:02 PM
Rank: Advanced Member
Groups: Stimulsoft Team

Joined: 6/9/2006
Posts: 1,132
Hello,

Could you please describe your issue in details? Do you use WebViewer or WebViewerFx? What is the resulted format of manipulated data? You may connect user data using the report.RegData() method after loading a report. If some data are already registered then, to clear them, the report.DataStore.Clear() method can be used.

Thank you.
M.I.A
Posted: Saturday, March 13, 2010 8:01:39 AM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
Hello Andrew, thank you for your reply.

To be more clear i will tell you about my stimulsoft tempalte design, i have header band, data band, footer band. in the data band (and my problem is here) i put many text box components, i created dataset mentioned to my data base table and connected these text components with this dataset to can take data from my data base when i write some codes in my web application (except one text box which is dateTextBox under the date column in my report template)

In my web application i already put my data that imported from my data base in DataTable, then put them in report.RegData(myDataTable), then i used webviewr to display them, for example:
report.RegData(myDataTable)
StiWebViewr1.Report = report;

i can display my report in my web application using stimulsoft report until now, but i just have one column which is date column, i want take the hole data of this column, and do some manipulation in ready method in my application, the result of this manipulation inserted in string array, now my array is ready with these results, i want return the array result to the (date column in my stimulsoft report template).

Because i import the date column from my data base in Gregorian Calendar format, and the requirment of my application have to use UmAlqura Calender, so after using (system.Globalization) library, i created method to convert from Gregorian format to UmAlqura calendar format, the result of this method put in string array, but i dont know how i can display this string array beside another results that directly come from my data base and display in my application by WebViewr.

Thank you.

M.I.A
Posted: Sunday, March 14, 2010 2:31:31 PM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
Hello all

Now i have another idea to solve this, but first can i use my function that created in my C# editor in my web application, can i use it (my function) in the code editor of stimulsoft?

If that possible my problem will solve, because i will get the dates data from the data base by stimulsoft, then pass these dates into my function, then return the converted dates to the Text box component.

Please if it is possible, please tell me how.

Thank you.
M.I.A
Posted: Sunday, March 14, 2010 4:29:58 PM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
M.I.A wrote:


Now i have another idea to solve this, but first can i use my function that created in my C# editor in my web application, can i use it (my function) in the code editor of stimulsoft?

If that possible my problem will solve, because i will get the dates data from the data base by stimulsoft, then pass these dates into my function, then return the converted dates to the Text box component.

Please if it is possible, please tell me how.

Thank you.



I think it is bad idea, because even if i can use my functions that created in my C# editor, how i can do select statement in stimulsoft code editor to select dates that i want put them in the function to convert them to another calendar format.

any other idea?
Jan
Posted: Monday, March 15, 2010 8:26:17 AM
Rank: Advanced Member
Groups: Administration, Stimulsoft Team

Joined: 2/19/2009
Posts: 952
Hello,

Please visit following link:

http://www.stimulsoft.com/livedemos/ReportCreation/How_to_Add_My_Function.html

Thank you.
M.I.A
Posted: Monday, March 22, 2010 3:15:45 PM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
Hello

Thank you Jan for your reply, i am sorry because i did not reply about your link but that because i faced serious problem in my PC which led me to format my PC.

Now i reinstall SQL Server and VS2008, and i will try today that solution in this link.

Thank you.
Andrew
Posted: Monday, March 22, 2010 5:38:22 PM
Rank: Advanced Member
Groups: Stimulsoft Team

Joined: 6/9/2006
Posts: 1,132
Hello,

Let us know about the results.

Thank you.
M.I.A
Posted: Tuesday, March 23, 2010 10:32:49 AM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
Hello

In my first step, i followed exactly the way in that video, i did that steps in windows application not in my web application to do exactly that steps in that video, then if it succeed i will try do it in my web application.

But unfortunately an exception generated when i clicked on preview button in stimulsoft environment after i did all steps, the exception tell me that 'Stimulsoft.Report.Win' library is not found, and when i bought my stimulsoft web license i think that library not came with other libraries, because i searched in my stimulsoft libraries folder and i did not find 'Stimulsoft.Report.Win' library.

This is the exception message: " Assembly 'Stimulsoft.Report.Win' is not found".

And this is the complete exception message:

[Customer Explanation]




[General Info]

Application: StiTest
Framework: v2.0.50727
Version: Version: 2009.3.509 from 5 October 2009
OSVersion: Microsoft Windows NT 5.1.2600 Service Pack 2


[Exception Info]
Message: Assembly 'Stimulsoft.Report.Win' is not found

Source: Stimulsoft.Report

StackTrace:
at Stimulsoft.Report.StiGuiOptions.GetProgressInformation(Object ownerForm, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(Boolean showProgress, Int32 fromPage, Int32 toPage)
at Stimulsoft.Report.StiReport.Render(Boolean showProgress)
at Stimulsoft.Report.Design.StiActions.MainMenu.InvokeReportPreview(StiDesignerControl designer)


[Assemblies]
mscorlib, Version = 2.0.0.0
Stimulsoft.Report, Version = 2009.3.509.0
System, Version = 2.0.0.0
System.Drawing, Version = 2.0.0.0
System.Windows.Forms, Version = 2.0.0.0



Thank you.
Jan
Posted: Tuesday, March 23, 2010 4:38:36 PM
Rank: Advanced Member
Groups: Administration, Stimulsoft Team

Joined: 2/19/2009
Posts: 952
Hello,

Stimulsoft.Report.Win.dll assembly is not provided in web edition of our product. Problem which you faced is fixed some time ago. Please call on HTML preview in report designer.

Thank you.
M.I.A
Posted: Wednesday, March 24, 2010 7:21:58 AM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
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
Posted: Wednesday, March 24, 2010 7:21:36 PM
Rank: Advanced Member
Groups: Administration, Stimulsoft Team

Joined: 2/19/2009
Posts: 952
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
Posted: Thursday, March 25, 2010 7:39:34 AM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
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
Posted: Friday, March 26, 2010 1:20:45 PM
Rank: Advanced Member
Groups: Stimulsoft Team

Joined: 4/13/2007
Posts: 183
Location: Earth
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.

File Attachment(s):
WebViewer_UserFunction.zip (14kb) downloaded 11 time(s).


M.I.A
Posted: Saturday, March 27, 2010 1:30:38 PM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
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
Posted: Tuesday, March 30, 2010 10:39:49 AM
Rank: Advanced Member
Groups: Stimulsoft Team

Joined: 6/9/2006
Posts: 1,132
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
Posted: Tuesday, March 30, 2010 12:00:45 PM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
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.
Andrew
Posted: Tuesday, March 30, 2010 4:18:37 PM
Rank: Advanced Member
Groups: Stimulsoft Team

Joined: 6/9/2006
Posts: 1,132
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 <my class namespace>;\n{0}", report.Script);
referencedAssemblies[referencedAssemblies.Length - 1] = "<my application>.dll";

Otherwise report engine can not use the user function.

Thank you.
M.I.A
Posted: Wednesday, March 31, 2010 2:04:35 PM
Rank: Member
Groups: Member

Joined: 3/11/2010
Posts: 22
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.
Jan
Posted: Thursday, April 01, 2010 1:19:56 AM
Rank: Advanced Member
Groups: Administration, Stimulsoft Team

Joined: 2/19/2009
Posts: 952
Hello,

Please show me how you call this function in report? I mean text expression which use this function.

Thank you.
Users browsing this topic
Guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum Rss Feed : RSS

Powered by Yet Another Forum.net version 1.0.1 - 2/27/2006
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.103 seconds.