Page 2 of 2
Re: How to build a generic report
Posted: Mon Aug 17, 2015 7:24 am
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.
Re: How to build a generic report
Posted: Mon Aug 17, 2015 7:58 am
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.
Re: How to build a generic report
Posted: Tue Aug 18, 2015 6:45 am
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,

Re: How to build a generic report
Posted: Tue Aug 18, 2015 10:55 am
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.
Re: How to build a generic report
Posted: Wed Aug 19, 2015 3:59 am
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?
Re: How to build a generic report
Posted: Wed Aug 19, 2015 7:16 am
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.