How to build a generic report

Stimulsoft Reports.WEB discussion
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: How to build a generic report

Post by beginner »

That's exactly what I'm doing, but my filters on that data are affectless. It would be great to be able to manipulate data on my own code and don't use parameters.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to build a generic report

Post by HighAley »

Hello.

Sorry, maybe we don't understand your issue.
Could you describe it more detailed?
We need to see any sample. Please, describe in details what you do and what is wrong.

Thank you.
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: How to build a generic report

Post by beginner »

Sorry if I'm being vague, limited English.

This is my code:

Code: Select all

StiReport report = new StiReport();
report.Load(path);
report.Compile();
var data = from g in goods
where g.AGoodName.StartsWith("tes")
select g;
report.RegData("DataSource1", data);
That where statement is affectless. Is my only option to define a variable and put the where in the report's datasource? Is there any way to limit the data on my own code? It seems the report uses its own data source, it would be great if I could replace it with my own, and therefore I would be able to do all of my things at once.

Thanks for your time, :)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to build a generic report

Post by Alex K. »

Hello,

Sorry, maybe we don't understand your issue.
Please clarify what wrong in your code. In this case in the report will be sent already filtered data as you want.

Thank you.
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: How to build a generic report

Post by beginner »

No, it won't! With this code I'll have a full list and without any filter. Is there any example? Maybe there is something wrong with my report?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to build a generic report

Post by HighAley »

Hello.

You use LINQ in your code. This is not connected with our product. We can't help you with it.
We didn't see your report template and we don't know what could be wrong there.
If you need to filter data in SQL query you could use advice from the Dynamic SQL queries article.

Thank you.
Post Reply