This is a migrated thread and some comments may be shown as answers.

report, no data, params

1 Answer 175 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David Carnley
Top achievements
Rank 1
David Carnley asked on 15 Mar 2008, 06:26 AM
Hi I am using Q2 2007.  I have a report that uses a single integer parameter, and that parameter is referenced in a simple filter "field=parameter".

I have a text box on teh page header that shows the parameter value, so I know it is set.  But none of my header or detail sections shows up when I pass in a value.

Dim clientBatchID As Integer
clientBatchID = CInt(Request.QueryString("clientBatchID"))
Me.ReportViewer1.Report.ReportParameters("clientBatchID").Value = clientBatchID

If I run the report like this, I get the constants values (header text, page numbers etc) and the parameter text box, but no data.

If I do this

Dim clientBatchID As Integer
clientBatchID = 175
Me.ReportViewer1.Report.ReportParameters("clientBatchID").Value = clientBatchID

I get data for batch 175, report looks fine.

Could this be a transaction problem?  In the first example, I have left out some steps in teh pasted code above, where the records I want to report on are assigned the batch ID.  I imagine they might not be committed and the report doesn't see them.  But I follow this same pattern in other reports and do not have this problem...

any ideas?


1 Answer, 1 is accepted

Sort by
0
Hrisi
Telerik team
answered on 17 Mar 2008, 05:37 PM
Hi David,

As I understand your question, you want to set the parameter from the Request query string. Unfortunately, I do not see any problems in your code and I am not sure where the issues comes from. 

The reporting engine reads the data from the DataSource and after that applies the filter you supply. The resulting data is then used to bind the report items. If you do not see any data, most probably clientBatchID is not set properly (for example it is set to 0). You can try debugging your code - may be it will give you some additional details which will help locate the problem. 

We would also suggest upgrading to the latest version of Telerik Reporting. This way you will be in synch with last features and bug fixes.
 
 
All the best,
Hrisi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
David Carnley
Top achievements
Rank 1
Answers by
Hrisi
Telerik team
Share this question
or