DataSource from an Assembly
DataSource from an Assembly
I have a class that works as DataAccess layer in my application. It has a method with this signature: IEnumerable List(string filter).
Is it possible to within the report design call this method?
I want that my DataSource comes from an Assembly, specifically from a method.
I don't want to, from code behind, call this List method and set the RegBusinessObject with the returned IEnumerable. I just wan to tell the Stimul where to find the source.
Is it possible?
Is it possible to within the report design call this method?
I want that my DataSource comes from an Assembly, specifically from a method.
I don't want to, from code behind, call this List method and set the RegBusinessObject with the returned IEnumerable. I just wan to tell the Stimul where to find the source.
Is it possible?
DataSource from an Assembly
Hello.
Could you describe it more detailed?
Thank you.
We can't imagine what do you want to do.JobaDiniz wrote:I have a class that works as DataAccess layer in my application. It has a method with this signature: IEnumerable List(string filter).
Is it possible to within the report design call this method?
I want that my DataSource comes from an Assembly, specifically from a method.
I don't want to, from code behind, call this List method and set the RegBusinessObject with the returned IEnumerable. I just wan to tell the Stimul where to find the source.
Is it possible?
Could you describe it more detailed?
Thank you.
DataSource from an Assembly
Inside Stimul, can I add a DataSource from assembly, and within that assembly choose which method to call specifying its parameters?
The only thing I want to do in code is:
All my settings regarding the DataSource and parameter have to be inside StimulReport itself.
Can it be done?
The only thing I want to do in code is:
Code: Select all
StiReport report = new StiReport();
report.Load(path);
report.ShowWithWpf();
Can it be done?
DataSource from an Assembly
Hello.
Thank you.
You should use RegBusinessObject() method to register your Business Object before showing it.JobaDiniz wrote:Inside Stimul, can I add a DataSource from assembly, and within that assembly choose which method to call specifying its parameters?
The only thing I want to do in code is:
All my settings regarding the DataSource and parameter have to be inside StimulReport itself.Code: Select all
StiReport report = new StiReport(); report.Load(path); report.ShowWithWpf();
Can it be done?
Thank you.
DataSource from an Assembly
That's the whole point: I don't want to call this method to register my Business Objects.
I want to tell the Stimul where to find my Business Objects when it is rendering.
Example: inside MyAssembly.dll exists a class MyClass, and inside it exists a method IEnumerable MyMethod(string parameters).
So, Stimul: this is the assembly you'll be using, this is the class within that assembly, this is the method of the class and those are the parameters you'll need. They are all there, so when it is needed use them to render the report.
I can't be more clear than that.
I want to tell the Stimul where to find my Business Objects when it is rendering.
Example: inside MyAssembly.dll exists a class MyClass, and inside it exists a method IEnumerable MyMethod(string parameters).
So, Stimul: this is the assembly you'll be using, this is the class within that assembly, this is the method of the class and those are the parameters you'll need. They are all there, so when it is needed use them to render the report.
I can't be more clear than that.
DataSource from an Assembly
Hello.
Thank you.
Please, send us your assembly with Business Object and information how to create the report for analysis.JobaDiniz wrote:That's the whole point: I don't want to call this method to register my Business Objects.
I want to tell the Stimul where to find my Business Objects when it is rendering.
Example: inside MyAssembly.dll exists a class MyClass, and inside it exists a method IEnumerable MyMethod(string parameters).
So, Stimul: this is the assembly you'll be using, this is the class within that assembly, this is the method of the class and those are the parameters you'll need. They are all there, so when it is needed use them to render the report.
I can't be more clear than that.
Thank you.
DataSource from an Assembly
Similar to these links:
http://www.thescarms.com/dotnet/DLLDatasource.aspx (Crystal Reports)
http://support.microsoft.com/kb/920769 (Reporting Services)
They invoke a specified method to get the data.
http://www.thescarms.com/dotnet/DLLDatasource.aspx (Crystal Reports)
http://support.microsoft.com/kb/920769 (Reporting Services)
They invoke a specified method to get the data.
DataSource from an Assembly
Hello.
We couldn't help you without library with Business Objects that you use.
We could show you code how to connect xml data in the report. You should write this code at the design time in the code tab.
Other way you should use RegBusinessObject() method.
Thank you.
We couldn't help you without library with Business Objects that you use.
We could show you code how to connect xml data in the report. You should write this code at the design time in the code tab.
Code: Select all
public Report()
{
this.InitializeComponent();
DataSet ds = new DataSet();
ds.ReadXml("d:\\Demo.xml");
Categories.DataTable = ds.Tables["Categories"];
}
Thank you.
-
- Posts: 4
- Joined: Mon Jan 23, 2012 11:39 am
- Location: Belgium
DataSource from an Assembly
In our project we had almost the same problem. And it was solved with custom data provider. But it was not very easy...
But now we actually can run any code as data source. We even can run method inside the report as data source!
You need to create your own class, derived from StiSqlAdapterService, and override method ConnectDataSourceToData (and may be some other methods).
If you are interested, I can post some parts of code here.
But now we actually can run any code as data source. We even can run method inside the report as data source!
You need to create your own class, derived from StiSqlAdapterService, and override method ConnectDataSourceToData (and may be some other methods).
If you are interested, I can post some parts of code here.
DataSource from an Assembly
Hello.
Thank you.
OK. It will be useful to see your code.denis.bredikhin wrote:In our project we had almost the same problem. And it was solved with custom data provider. But it was not very easy...
But now we actually can run any code as data source. We even can run method inside the report as data source!
You need to create your own class, derived from StiSqlAdapterService, and override method ConnectDataSourceToData (and may be some other methods).
If you are interested, I can post some parts of code here.
Thank you.