
I created a report with a parameter "Team". I can view the report's contents correctly and change the team and get back data within the html preview. Once I try to use the grid to select the report and display outside of VS 2008 I get the error "Object reference not set to an instance of an object". Not sure why.
I did take the same dataset and not use parameters and the data comes up fine. Any ideas?
Thanks,
Dwayne
7 Answers, 1 is accepted
Can you elaborate - what is the grid you're referring to in your post? Displaying reports in web app/site is accomplished via web report viewer. More information on how to use it and set a report to display is available in Web Report Viewer section of our documentation.
Kind regards,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

the grid dispays the reprot name:
<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
Width="600px" AutoGenerateColumns="False" style="text-align:left;">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:TemplateField HeaderText="Report">
<ItemTemplate>
<asp:HyperLink id="ReportLink" runat="server" target="_blank" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "NavigateUrl") %>'><%# DataBinder.Eval(Container.DataItem, "Report") %></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="150px" />
</asp:TemplateField>
<asp:BoundField DataField="Description" HeaderText="Description"/>
</Columns>
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
From the Grid you get the report name. When clicking on the name it redirects you to the report viewer and loads the report(in a seperate window). This is when the Object error occurs. If I use no parameters the error does not happen.
Thank you for the clarification - generally speaking you've added one more report to our Visual Studio examples and when you're trying to open it from the "selection grid" you receive an error. It is hard to say what could be the cause of it without looking into the report, but if it is report related it is highly unlikely that it would work in preview but would not work when shown in report viewer. You can add a separate .aspx page to your web site/app with a viewer only, assign the report like so:
Telerik.Reporting.Report report = new MyReport1();
ReportViewer1.Report = report;
and see if the same error is thrown. You can also check out the Output VS window to see if it provides more info about the error. If you have any manual code (i.e. not created by the report designer), you can set a break point and see if the error isn't thrown in it.
Greetings,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.


Filters are set to Fields.Team = =Parameters.Team
Report Parameter: Value is set ot W904CH, Name: Team, Visable=True
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
It does preview correctly within the designer. I used the code below to view my report within the viewer.
Dim report = New ReportLib.Report2
ReportViewer1.Report = report
Thanks for all the help, hope you have more direction.
Dwayne
It would be best if you zip and attach your sample project to a support ticket or provide a link from where we can download it. Once we review it, we would be able to provide you with more info.
Sincerely yours,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

"The problem is that you have added a resx file in App_GlobalResources which does not contain any key-value pairs. Thus the viewer is trying to load them from the file, but since it cannot find any it recognizes - throws exception. Delete this file and the report should show in the viewer just fine. "
Thanks for the help