.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

show subreport error.

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

hi All 

i want to show sub report through data set But it has some error here is my Code

rptSubReport1 objRptSub1;
rptMainReport objRptMain;

string subreportName1;

ReportDocument subreport1 = new ReportDocument();

SqlConnection cs = new SqlConnection(@"Data Source=.\SQL2005;Initial Catalog=MCQs;Integrated Security=True");
        SqlDataAdapter da = new SqlDataAdapter();
        DataSet ds = new DataSet();

 private void Form1_Load(object sender, EventArgs e)
            objRptMain = new rptMainPaper();
            objRptSub1 = new rptSubReport1();

            da.SelectCommand = new SqlCommand("select Question as DataColumn1, Marks as DataColumn2 from TrueFalse Where OID=18", cs);
            da.Fill(ds, "MCQs");

            // Get the subreport name.
            subreportName1 = objRptSub1.Subreports.ToString();
            // Open the subreport as a ReportDocument.
            subreport1 = objRptSub1.OpenSubreport(subreportName1);

            crystalReportViewer1.ReportSource = objRptMain;

and the error is 
Object reference not set to an instance of an object. 

View Complete Post

More Related Resource Links

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




show data in grid view error Arithmetic operation resulted in an overflow.



i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 

Linked Report Subreport- Error: Subreport could not be shown on SSRS 2008r2

I've got 2 folders: /Finance /Japan In the Finance folder I have a Sales report that has 3 subreports, and a salesregion parameter. I created a linked report in /Japan to /Finance/Sales, hide the salesregion parameter, and set the default to Japan, so they can only see their region's sales data. But when a Japan user runs the Sales report, they get Error: Subreport could not be shown because they do not have access to the /Finance folder. Any ideas?

how can we show error in our application when exception occur in webs service

how can we show error in our application when exception occur in webs service

ERROR: Cannot show Visual Studio 2008 Tools for Applications editor - SP1 IS applied

Using BI Studio, attempting to put a small VB script in a Script Task, hitting the Edit Script gives:   Cannot show Visual Studio 2008 Tools for Applications editor   ADDITIONAL INFORMATION: Could not load file or assembly 'VSTADTEProvider.Interop, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (Microsoft.SqlServer.VSTAScriptingLib)   NEED A FIX, PLEASE, AS I'VE ALREADY LOADED VS2008 SP1...!   I have now also uninstalled VS2008 entirely, along with .NET 3.5 SP1 rebooted several times, reinstalled from the January Team System Database Edition, applied VS2008 SP1 and .Net 3.5 SP1 from Microsoft Downloads with the usual reboots to make sure, and I'm still hosed...   Microsoft Visual Studio 2008Version 9.0.30729.1 SPMicrosoft .NET FrameworkVersion 3.5 SP1 Installed Edition: Enterprise Microsoft Visual Basic 2008   91901-270-1018792-60217Microsoft Visual Basic 2008 Microsoft Visual C# 2008   91901-270-1018792-60217Microsoft Visual C# 2008 Microsoft Visual C++ 2008   91901-270-1018792-60217Microsoft Visual C++ 2008 Microsoft Visual Studio 2008 Tools for Office   91901-270-1018792-60217Microsoft Visual Studio 2008 Tools for Office Microsoft Visual Studio Team System 2008 Database Edition   91901-270-1018792-60217Microsoft Visual Studio Team System 2008 Database Edition Microsoft Visual Web

Creating Matrix report to show totals, need subreport to show details...

I've created a perfect matrix report using the nifty wizard and it's exactly what the client wants, but they would also like to see the detail for each row. I'm able to create subreports and pass parameters and all that jazz, but I'm having a hard time setting up a subreport for this matrix. It's pretty much this format                      MakeOfCar                      ModelOfCar LotLocation   Count of cars   This would return:                         Ford           Ford                        Mustang      F150 Location A:         5                0 Location B:         2                3    

Implementing custom ValidationFor to show an error icon with a tooltip instead of just text for c


I got the problem that my implementation (see source below) only shows the validation error message after server side validation an NOT

after clientside validation! My questions is, how can you extend or implement to show the validation error message also on client-side validation.

Unfortunately I have not found any other info source about this subject, so any help will be very much appreciated!

 public static string ErrorMessageFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression)
            string modelName = htmlHelper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(ExpressionHelper.GetExpressionText(expression));
            FormContext formContext = htmlHelper.ViewContext.FormContext;

            if (!htmlHelper.ViewData.ModelState.ContainsKey(modelName) && formContext == null)
                return null;

            ModelState modelState = htmlHelper.ViewData.ModelState[modelName];
            ModelErrorCollection modelErrors = (modelState == null) ? null : modelState.Errors;
            ModelError modelError = ((modelErrors == null) || (modelErrors.Count == 0)) ? null : modelErrors[0];

            if (modelError == null && formContext == null)

Can't install SQL 2005 Delveloper edition and show error with MSXML

I can't install SQL 2005 Delveloper edition and show error with MSXML component
It shows these massage:
=== Verbose logging started: 6/11/2007  17:17:36  Build type: SHIP UNICODE 3.01.4000.4003  Calling process: C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\setup.exe ===
MSI (c) (A8:90) [17:17:36:545]: Resetting cached policy values
MSI (c) (A8:90) [17:17:36:545]: Machine policy value 'Debug' is 0
MSI (c) (A8:90) [17:17:36:545]: ******* RunEngine:
           ******* Product: \\inwa202746-1\G\SQL Server x86\Servers\Setup\msxml6.msi
           ******* Action:
           ******* CommandLine: **********
MSI (c) (A8:90) [17:17:36:545]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (A8:90) [17:17:36:545]: Grabbed execution mutex.
MSI (c) (A8:90) [17:17:36:555]: Cloaking enabled.
MSI (c) (A8:90) [17:17:36:555]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (A8:90) [17:17:36:555]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (30:AC) [17:17:36:575]: Grabbed execution mutex.
MSI (s) (30:40) [17:17:36:575]: Resetting cached policy values
MSI (s) (30:40) [17:17:36:575]: Machine policy value 'Debug' is 0
MSI (s) (30:40) [17:17:3

Error processing report with embedded subreport while leveraging interactive sorting in main report.


This error only occurs with the Report Viewer v10 control...fine with v9 and occurs on both SQL Server 2008 SP1 CU9 and 2008 R2.  I have a report that has an embedded subreport object, and the subreport renders properly until I click on any textbox with interactive sort enabled in the main report...at which time I receive the following error message in the subreport object:


reportrendering!ReportServer_0-2!d98!10/06/2010-11:38:22:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: One or more parameters were not specified for the subreport, 'FilterList', located at: Common_SubReport_FilterList., ;

 Info: Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: One or more parameters were not specified for the subreport, 'FilterList', located at: Common_SubReport_FilterList.

processing!ReportServer_0-2!d98!10/06/2010-11:38:22:: e ERROR: An error has occurred while processing a sub-report. Details: One or more parameters were not specified for the subreport, 'FilterList', located at: Common_SubReport_FilterList. Stack trace:

   at Microsoft.ReportingServices.OnDemandReportRendering.SubReport.CheckRetrievalStatus(Status status)

   at Microsoft.ReportingServices.OnDemandReportRendering.SubReport.RetrieveSubreport()


Error showing subreport... due to user access?


I am experiencing a strang issue in SSRS 2005.

a) I have a MainReport that contains a SubReport and I deploy these up into Report Manager into a folder called MyFolder.

b) MyFolder has restricted access so only I can access it via ReportManager.

c) I ceate a linked report for each report: LinkedMainReport and LinkedSubReport and move these linked reports into a folder called YourFolder.

d) YourFolder is restricted to a Windows AD group... called ManagerGroup.

e) Report Manager folder structure now looks like this:

MyFolder (my access only)
- MainReport (original report)
- SubReport (original report.. and set to be hidden)

YourFolder (ManagerGroup and my access)
- LinkedMainReport
- LinkedSubReport (set to be hidden)

f) Security from the folders is applied to each report and link report by default.

g) ManagerGroup contains say 3 users: Homer, Lisa and Bart.

Homer and Bart can run the report "YourFolder -> LinkedMainReport" without any problems.  The main report and subreport embedded within it run fine.  The problem I have is when Lisa runs the same report "YourFolder -> LinkedMainReport" she sees the main report but gets the "Error showing subreport" message where the subreport is usually display

Unable to delete SSP, show error Unprovisioning


Under Manage this Farm's Shared Services , it showing like this   SharePoint - 24402 (Administration site host)

How to solve this issue?  Any one can help?

Error: There are no items to show in this view. SharePoint Designer 2010


Hi, i got this error while editing a sharepoint subsite in SharePoint Designer 2010. We are using SharePoint 2010, Office 2010, Windows 7 and SharePoint Designer 2010 x32.

When i now open my subsite in SharePoint Desinger i cant see any Lists and Libraries, no Workflows and no Site Pages. I get these messages:

"There are no items to show in this view."
"The Document Library view connot be displayed for this Web site."

All the Libraries and Files still exist and i can view the sites still in browser. I see them at "all files". But i cant edit anything or change things.

Does anybody know that issue? What can i do to fix that?

Best regards

XML web service showing error in Data Source Library when I clicked on "Show Data".


Hi ,

I am working on share point 2007.
I have added a XML Web service in Data source in Share Point designer 2007. This web service is custom web service which get data from 3 different type of list and creates XML and return that xml.

I have installed this web service as instructed in msdn. I checked it is working properly.
First time when I create a data source from XML web service in Share Point Designer 2007, It shows all records when I clicked on “Show Data ”. But after a few minutes it shows en error” The server returned a non-specific error when trying to get data from the data source. Check the format and content of your query and try again. If the problem persists, contact the server administrator. ”.

Gaurav Goyal

MessageBox.Show error


If I have .NET 3.5 SP1 and use MessageBox.Show(), everything works fine.

However, if I dont have .NET 3.5 SP1, I need to detect that and print a pop up on the screen. How do I do that? If I use MessageBox.Show() in that case, I get an exception error.

Show friendly error message if no data is existing



my reports shows an irritating error message to the end users, they don`t understand it:

"Error while Rendering: The CommandText expression for the query ‘Header’ contains an error: Index was outside the bounds of the array."


Cause : They submitted a query for a date where no data was existing

I tried the following:

1) I dont get an Error Code Number, so I cannot work with IIS Custom Error Pages.

2) Then I tried to use this expression in the visbility tab of tablix "Header":

=IIF(Count(Fields!Date.Value, "Header")=0, True, False)

But that does not work because the date field is not emtpy, the date just does not fit to the existing records

3) I also tried to wrap this around my SELECT-statement but without success:


and not exists (select 1 from my Database where ….)


any other ideas are welcome!

Show custom error message inside SharePoint Business Data List web part?

I am using SharePoint 2007 Business Data List web part to show external information retrieved from my simple web service. Is there ability to show custom error message on Business Data List web part?

Events of September 2011 don't show up in calendar view and error on displaying october 2010 in cal



I actually faced a strange problem which is that when I add events in september 2011, they don't show up in the calendar view and the view remains empty but they appear in the all events view and another strange thing is that when I change the month to be october 2010, I get error page with the text:

An unexpected erro has occured.

web parts maintenance page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

and I checked in more than one calendar and in more than one site and it's the same, So I'm asking if any one faced something like this.

Thanks in advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend