I've build a aspx page.
On the aspx page users can show a report. Locally it works great! But on the server i'll get this error:
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:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.HttpResponse.BinaryWrite(Byte[] buffer) +13
reporter.CreateReport() +371
reporter.Page_Load(Object sender, EventArgs e) +5
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
The coding of the aspx.cs is:
string URL = Request["URL"].ToString();
string options = Request["options"].ToString();
string van = Request["van"].ToString();
string tot = Request["tot"].ToString();
string totaal = Request["totaal"].ToString();
//report: links
byte[] b = reports.CreateReportLinks(URL, options, van, tot, totaal);
//Check if user has rights
Response.Clear();
Response.ContentType = "Application/PDF";
Response.AddHeader("Content-disposition", string.Format("inline; filename={0}_{1}_{2}.pdf", URL, van, tot));
Response.BinaryWrite(b);
Response.End();
And the createreportlinks:
public static byte[] CreateReportLinks(string URL, string Options, string van, string tot, string totaal)
{
return CreateReport(URL, Options, ConfigurationManager.AppSettings["localpath"].ToString() + @"reports\ReportLinks.rdlc", van, tot, totaal);
}
private static byte[] CreateReport(string URL, string options, string path, string van, string tot, string totaal)
{
byte[] bytes = null;
try
{
Microsoft.Reporting.WebForms.ReportViewer ReportViewer1 = new Microsoft.Reporting.WebForms.ReportViewer();
// // Set the processing mode for the ReportViewer to Local
ReportViewer1.ProcessingMode = ProcessingMode.Local;
LocalReport rep = ReportViewer1.LocalReport;
rep.ReportPath = path;
rep.DataSources.Clear();
dftv.logger.Add2Log("Start adding params");
List<ReportParameter> ParOptions = new List<ReportParameter>();
ParOptions.Add(new ReportParameter("ParOptions", options));
rep.SetParameters(ParOptions.ToArray());
dftv.logger.Add2Log("ParOptions added");
List<ReportParameter> ParURL = new List<ReportParameter>();
ParURL.Add(new ReportParameter("ParURL", URL));
rep.SetParameters(ParURL.ToArray());
dftv.logger.Add2Log("ParURL added");
List<ReportParameter> ParVan = new List<ReportParameter>();
ParVan.Add(new ReportParameter("ParVan", van));
rep.SetParameters(ParVan.ToArray());
dftv.logger.Add2Log("ParVan added");
List<ReportParameter> ParTot = new List<ReportParameter>();
ParTot.Add(new ReportParameter("ParTot", tot));
rep.SetParameters(ParTot.ToArray());
dftv.logger.Add2Log("ParTot added");
List<ReportParameter> Totaal = new List<ReportParameter>();
Totaal.Add(new ReportParameter("Totaal", totaal));
rep.SetParameters(Totaal.ToArray());
dftv.logger.Add2Log("Totaal added");
ReportDataSource DataSet1 = new ReportDataSource();
DataSet1.Name = "DataSet1";
dfDataSet.tblRedirectDataTable ds1 = new dfDataSetTableAdapters.tblRedirectTableAdapter().GetData(URL, options, DateTime.Parse(van), DateTime.Parse(tot));
DataSet1.Value = ds1;
rep.DataSources.Add(DataSet1);
dftv.logger.Add2Log("DataSet1 added");
////----------------Export directly-----------------
////First delete existing file
////Then create new pdf file
string strMime = null;
string strEncoding = null;
string strfileNameExtentions = null;
string[] stream = null;
Microsoft.Reporting.WebForms.Warning[] warnings = null;
dftv.logger.Add2Log("No warnings -> build");
bytes = rep.Render("PDF", null, out strMime, out strEncoding, out strfileNameExtentions, out stream, out warnings);
dftv.logger.Add2Log("PDF build");
//outputstream.Write(bytes, 0, bytes.Length);
//using (FileStream fs = new FileStream(filepath, FileMode.Create))
//{
// fs.Write(bytes, 0, bytes.Length);
// fs.Close();
//}
//----------------End Export directly-----------------
}
catch (Exception ex)
{
//PageOverride.mailError(ex);
}
return bytes;
}
The logger is to make som log files. The result is that he addes only Start adding params to the log file. So wen i add the first param to the report it stucks. It means that the report isn't well, but strange enough locally it works. So what could be else on it on the server? Also the connection string works....
I have the same issue... and I changed the References to V 9 and 10 (Microsoft.ReportViewer.Common + Microsoft.ReportViewer.WebForms)... both are not working in Production.
c:\Program Files\Microsoft Visual Studio 10.0\ReportViewer\Microsoft.ReportViewer.WebForms.dll etc.
On my localhost botht version works fine.. .but when I move the dll + rdlc to production I get the error below...
Any idea?
Server Error in '/' Application.
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:
[NullReferenceException: Object reference not set to an instance of an object.] System.Web.HttpResponse.BinaryWrite(Byte[] buffer) +13 ABC.CustomModules.Controle_InhoudingsPlicht.WebForm1.Page_Load(Object sender, EventArgs e) +200 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
I'm having the same problem. The reports work perfect when debugging them, but once they are moved to the server they don't work. Anyone find a solution?
I am also stuck in same issue. in debugging mode reports are perfect as i needed but when i deploy those to server and run the report by clicking on the link for reports, it asks for username and password. If you got your problem solved, please help me out.
I am also stuck in same issue. in debugging mode reports are perfect as i needed but when i deploy those to server and run the report by clicking on the link for reports, it asks for username and password. If you got your problem solved, please help me out.
can you help me out. i am having a problem with reports. when i run reports in VS2010 they work fine but when i deploy on server i am asked for username and password whenever i click on report link. please help me out. i am stuck in it and also i am new
to this .net and reports
Jelmer850i
Member
232 Points
1053 Posts
VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not set er...
Aug 11, 2010 08:13 AM|LINK
I've build a aspx page.
On the aspx page users can show a report. Locally it works great! But on the server i'll get this error:
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:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.HttpResponse.BinaryWrite(Byte[] buffer) +13
reporter.CreateReport() +371
reporter.Page_Load(Object sender, EventArgs e) +5
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
The coding of the aspx.cs is:
string URL = Request["URL"].ToString();
string options = Request["options"].ToString();
string van = Request["van"].ToString();
string tot = Request["tot"].ToString();
string totaal = Request["totaal"].ToString();
//report: links
byte[] b = reports.CreateReportLinks(URL, options, van, tot, totaal);
//Check if user has rights
Response.Clear();
Response.ContentType = "Application/PDF";
Response.AddHeader("Content-disposition", string.Format("inline; filename={0}_{1}_{2}.pdf", URL, van, tot));
Response.BinaryWrite(b);
Response.End();
And the createreportlinks:
public static byte[] CreateReportLinks(string URL, string Options, string van, string tot, string totaal) { return CreateReport(URL, Options, ConfigurationManager.AppSettings["localpath"].ToString() + @"reports\ReportLinks.rdlc", van, tot, totaal); } private static byte[] CreateReport(string URL, string options, string path, string van, string tot, string totaal) { byte[] bytes = null; try { Microsoft.Reporting.WebForms.ReportViewer ReportViewer1 = new Microsoft.Reporting.WebForms.ReportViewer(); // // Set the processing mode for the ReportViewer to Local ReportViewer1.ProcessingMode = ProcessingMode.Local; LocalReport rep = ReportViewer1.LocalReport; rep.ReportPath = path; rep.DataSources.Clear(); dftv.logger.Add2Log("Start adding params"); List<ReportParameter> ParOptions = new List<ReportParameter>(); ParOptions.Add(new ReportParameter("ParOptions", options)); rep.SetParameters(ParOptions.ToArray()); dftv.logger.Add2Log("ParOptions added"); List<ReportParameter> ParURL = new List<ReportParameter>(); ParURL.Add(new ReportParameter("ParURL", URL)); rep.SetParameters(ParURL.ToArray()); dftv.logger.Add2Log("ParURL added"); List<ReportParameter> ParVan = new List<ReportParameter>(); ParVan.Add(new ReportParameter("ParVan", van)); rep.SetParameters(ParVan.ToArray()); dftv.logger.Add2Log("ParVan added"); List<ReportParameter> ParTot = new List<ReportParameter>(); ParTot.Add(new ReportParameter("ParTot", tot)); rep.SetParameters(ParTot.ToArray()); dftv.logger.Add2Log("ParTot added"); List<ReportParameter> Totaal = new List<ReportParameter>(); Totaal.Add(new ReportParameter("Totaal", totaal)); rep.SetParameters(Totaal.ToArray()); dftv.logger.Add2Log("Totaal added"); ReportDataSource DataSet1 = new ReportDataSource(); DataSet1.Name = "DataSet1"; dfDataSet.tblRedirectDataTable ds1 = new dfDataSetTableAdapters.tblRedirectTableAdapter().GetData(URL, options, DateTime.Parse(van), DateTime.Parse(tot)); DataSet1.Value = ds1; rep.DataSources.Add(DataSet1); dftv.logger.Add2Log("DataSet1 added"); ////----------------Export directly----------------- ////First delete existing file ////Then create new pdf file string strMime = null; string strEncoding = null; string strfileNameExtentions = null; string[] stream = null; Microsoft.Reporting.WebForms.Warning[] warnings = null; dftv.logger.Add2Log("No warnings -> build"); bytes = rep.Render("PDF", null, out strMime, out strEncoding, out strfileNameExtentions, out stream, out warnings); dftv.logger.Add2Log("PDF build"); //outputstream.Write(bytes, 0, bytes.Length); //using (FileStream fs = new FileStream(filepath, FileMode.Create)) //{ // fs.Write(bytes, 0, bytes.Length); // fs.Close(); //} //----------------End Export directly----------------- } catch (Exception ex) { //PageOverride.mailError(ex); } return bytes; }The logger is to make som log files.
The result is that he addes only Start adding params to the log file.
So wen i add the first param to the report it stucks. It means that the report isn't well, but strange enough locally it works.
So what could be else on it on the server? Also the connection string works....
Source code of the report:
<?xml version="1.0" encoding="utf-8"?> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition"> <DataSources> <DataSource Name="dfDataSet"> <ConnectionProperties> <DataProvider>System.Data.DataSet</DataProvider> <ConnectString>/* Local Connection */</ConnectString> </ConnectionProperties> <rd:DataSourceID>d6bf54bb-777f-473d-a351-1c9797c397dd</rd:DataSourceID> </DataSource> </DataSources> <DataSets> <DataSet Name="DataSet1"> <Fields> <Field Name="ID"> <DataField>ID</DataField> <rd:TypeName>System.Int32</rd:TypeName> </Field> <Field Name="Datum"> <DataField>Datum</DataField> <rd:TypeName>System.DateTime</rd:TypeName> </Field> <Field Name="IP"> <DataField>IP</DataField> <rd:TypeName>System.String</rd:TypeName> </Field> </Fields> <Query> <DataSourceName>dfDataSet</DataSourceName> <CommandText>/* Local Query */</CommandText> </Query> <rd:DataSetInfo> <rd:DataSetName>dfDataSet</rd:DataSetName> <rd:TableName>tblRedirect</rd:TableName> <rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod> <rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod> <rd:TableAdapterName>tblRedirectTableAdapter</rd:TableAdapterName> </rd:DataSetInfo> </DataSet> </DataSets> <Body> <ReportItems> <Tablix Name="Tablix3"> <TablixBody> <TablixColumns> <TablixColumn> <Width>3.94271in</Width> </TablixColumn> <TablixColumn> <Width>2.66146in</Width> </TablixColumn> </TablixColumns> <TablixRows> <TablixRow> <Height>0.23622in</Height> <TablixCells> <TablixCell> <CellContents> <Textbox Name="Textbox12"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>Datum</Value> <Style> <FontWeight>Bold</FontWeight> </Style> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox12</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> <TablixCell> <CellContents> <Textbox Name="Textbox14"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>IP</Value> <Style> <FontWeight>Bold</FontWeight> </Style> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox14</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> </TablixCells> </TablixRow> <TablixRow> <Height>0.23622in</Height> <TablixCells> <TablixCell> <CellContents> <Textbox Name="Datum"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!Datum.Value</Value> <Style /> </TextRun> </TextRuns> <Style> <TextAlign>Left</TextAlign> </Style> </Paragraph> </Paragraphs> <rd:DefaultName>Datum</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> <TablixCell> <CellContents> <Textbox Name="IP"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Fields!IP.Value</Value> <Style /> </TextRun> </TextRuns> <Style> <TextAlign>Left</TextAlign> </Style> </Paragraph> </Paragraphs> <rd:DefaultName>IP</rd:DefaultName> <Style> <Border> <Color>LightGrey</Color> <Style>Solid</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </CellContents> </TablixCell> </TablixCells> </TablixRow> </TablixRows> </TablixBody> <TablixColumnHierarchy> <TablixMembers> <TablixMember /> <TablixMember /> </TablixMembers> </TablixColumnHierarchy> <TablixRowHierarchy> <TablixMembers> <TablixMember> <KeepWithGroup>After</KeepWithGroup> </TablixMember> <TablixMember> <Group Name="Details" /> </TablixMember> </TablixMembers> </TablixRowHierarchy> <DataSetName>DataSet1</DataSetName> <Height>1.2cm</Height> <Width>16.77458cm</Width> <Style> <Border> <Style>None</Style> </Border> </Style> </Tablix> </ReportItems> <Height>0.55208in</Height> <Style /> </Body> <ReportParameters> <ReportParameter Name="ParURL"> <DataType>String</DataType> <Nullable>true</Nullable> <AllowBlank>true</AllowBlank> <Prompt>ReportParameter1</Prompt> </ReportParameter> <ReportParameter Name="ParOptions"> <DataType>String</DataType> <Nullable>true</Nullable> <AllowBlank>true</AllowBlank> <Prompt>ReportParameter1</Prompt> </ReportParameter> <ReportParameter Name="ParVan"> <DataType>String</DataType> <Nullable>true</Nullable> <AllowBlank>true</AllowBlank> <Prompt>ReportParameter1</Prompt> </ReportParameter> <ReportParameter Name="ParTot"> <DataType>String</DataType> <Nullable>true</Nullable> <AllowBlank>true</AllowBlank> <Prompt>ReportParameter1</Prompt> </ReportParameter> <ReportParameter Name="Totaal"> <DataType>String</DataType> <Nullable>true</Nullable> <AllowBlank>true</AllowBlank> <Prompt>ReportParameter1</Prompt> </ReportParameter> </ReportParameters> <Width>6.60417in</Width> <Page> <PageHeader> <Height>2.93688cm</Height> <PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnLastPage>true</PrintOnLastPage> <ReportItems> <Textbox Name="txtURL"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Parameters!ParURL.Value</Value> <Style> <FontSize>14pt</FontSize> <FontWeight>Bold</FontWeight> </Style> </TextRun> <TextRun> <Value xml:space="preserve"> </Value> <Style> <FontSize>14pt</FontSize> <FontWeight>Bold</FontWeight> </Style> </TextRun> <TextRun> <Value>(Totaal:</Value> <Style> <FontSize>12pt</FontSize> <FontWeight>Normal</FontWeight> </Style> </TextRun> <TextRun> <Value>=Parameters!Totaal.Value</Value> <Style> <FontSize>12pt</FontSize> <FontWeight>Normal</FontWeight> </Style> </TextRun> <TextRun> <Value>)</Value> <Style> <FontSize>12pt</FontSize> <FontWeight>Normal</FontWeight> </Style> </TextRun> </TextRuns> <Style> <TextAlign>Center</TextAlign> </Style> </Paragraph> </Paragraphs> <Top>0.40577cm</Top> <Left>0.00001cm</Left> <Height>0.78521cm</Height> <Width>16.77458cm</Width> <Style> <Border> <Style>None</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> <Textbox Name="Textbox1"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Parameters!ParOptions.Value</Value> <Style> <FontSize>12pt</FontSize> </Style> </TextRun> </TextRuns> <Style> <TextAlign>Center</TextAlign> </Style> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox1</rd:DefaultName> <Top>1.26154cm</Top> <Height>0.61701cm</Height> <Width>16.77458cm</Width> <ZIndex>1</ZIndex> <Style> <Border> <Style>None</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> <Textbox Name="Textbox16"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>Van: </Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox16</rd:DefaultName> <Top>2.05493cm</Top> <Height>0.6cm</Height> <Width>2.5cm</Width> <ZIndex>2</ZIndex> <Style> <Border> <Style>None</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> <Textbox Name="Textbox17"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Parameters!ParVan.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox16</rd:DefaultName> <Top>2.01966cm</Top> <Left>2.67639cm</Left> <Height>0.6cm</Height> <Width>2.5cm</Width> <ZIndex>3</ZIndex> <Style> <Border> <Style>None</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> <Textbox Name="Textbox18"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>=Parameters!ParTot.Value</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox16</rd:DefaultName> <Top>2.01966cm</Top> <Left>12.69087cm</Left> <Height>0.6cm</Height> <Width>2.5cm</Width> <ZIndex>4</ZIndex> <Style> <Border> <Style>None</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> <Textbox Name="Textbox19"> <CanGrow>true</CanGrow> <KeepTogether>true</KeepTogether> <Paragraphs> <Paragraph> <TextRuns> <TextRun> <Value>Tot:</Value> <Style /> </TextRun> </TextRuns> <Style /> </Paragraph> </Paragraphs> <rd:DefaultName>Textbox16</rd:DefaultName> <Top>2.05493cm</Top> <Left>10.01448cm</Left> <Height>0.6cm</Height> <Width>2.5cm</Width> <ZIndex>5</ZIndex> <Style> <Border> <Style>None</Style> </Border> <PaddingLeft>2pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> </Style> </Textbox> </ReportItems> <Style> <Border> <Style>None</Style> </Border> </Style> </PageHeader> <PageFooter> <Height>2.54cm</Height> <PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnLastPage>true</PrintOnLastPage> <Style> <Border> <Style>None</Style> </Border> </Style> </PageFooter> <PageHeight>29.7cm</PageHeight> <PageWidth>21cm</PageWidth> <LeftMargin>2cm</LeftMargin> <RightMargin>2cm</RightMargin> <TopMargin>2cm</TopMargin> <BottomMargin>2cm</BottomMargin> <ColumnSpacing>0.13cm</ColumnSpacing> <Style /> </Page> <Variables> <Variable Name="ParURL"> <Value /> </Variable> <Variable Name="ParOptions"> <Value /> </Variable> </Variables> <rd:ReportID>c39c4401-80b5-4872-b015-7a69a3f5c900</rd:ReportID> <rd:ReportUnitType>Cm</rd:ReportUnitType> </Report>Can someone help me? Do i need to install something on the server (windows 2008 server), or is something else wrong?
Thanks.
Jelmer850i
Member
232 Points
1053 Posts
Re: VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not se...
Aug 11, 2010 11:34 AM|LINK
Found the problem, i used reportviewer 2008 but i needed 2010, right now it works great.
mesut.demir
Member
20 Points
8 Posts
Re: VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not se...
Dec 06, 2010 03:18 PM|LINK
I have the same issue... and I changed the References to V 9 and 10 (Microsoft.ReportViewer.Common + Microsoft.ReportViewer.WebForms)... both are not working in Production.
c:\Program Files\Microsoft Visual Studio 10.0\ReportViewer\Microsoft.ReportViewer.WebForms.dll etc.
On my localhost botht version works fine.. .but when I move the dll + rdlc to production I get the error below...
Any idea?
Server Error in '/' Application.
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:
Stack Trace:
asp .net 2. 0 SQL Server Rerporting Service c#
jboroch
Member
2 Points
1 Post
Re: VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not se...
Feb 02, 2011 08:23 PM|LINK
I'm having the same problem. The reports work perfect when debugging them, but once they are moved to the server they don't work. Anyone find a solution?
Solvebits
Member
6 Points
3 Posts
Re: VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not se...
Jun 13, 2012 11:05 AM|LINK
Hi Jboroch
I am also stuck in same issue. in debugging mode reports are perfect as i needed but when i deploy those to server and run the report by clicking on the link for reports, it asks for username and password. If you got your problem solved, please help me out.
Solvebits
Member
6 Points
3 Posts
Re: VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not se...
Jun 13, 2012 11:09 AM|LINK
Hi Jboroch
I am also stuck in same issue. in debugging mode reports are perfect as i needed but when i deploy those to server and run the report by clicking on the link for reports, it asks for username and password. If you got your problem solved, please help me out.
Solvebits
Member
6 Points
3 Posts
Re: VS 2010: Asp.Net RDLC Report works local, but not on server getting a object reference not se...
Jun 13, 2012 11:12 AM|LINK
can you help me out. i am having a problem with reports. when i run reports in VS2010 they work fine but when i deploy on server i am asked for username and password whenever i click on report link. please help me out. i am stuck in it and also i am new to this .net and reports