Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Monday, March 12, 2012

Number Format

When setting the format property for a textbox containing a number the first parameter relates to a positive number, the second negative and the third to zero.

eg #,###; (#,###); 0

Is there a way of also formatting Null values in the same way without writing custom code?

Could you do an isnull in your query so that you don't get NULL showing on your report?

Jarret

|||

I could. Just means I have to either type this in for every column in my dataset or every textbox (instead of doing a multi-select). Sounds a bit lazy I know but I have a lot of reports and columns to go through.

Mark

|||

Sorry Mark, I can't seem to find anything that will replace NULL with a 0 just by changing using the format code.

I think you're best bet is using the ISNULL or an expression, but either way, you'd have to change each field.

Jarret

Friday, March 9, 2012

NullReferenceException

I have a report with a chart and a textbox. I use the 'navigation'
property of the textbox to jump to another report. When my request
returns an empty dataset I have the following exception:
[1580] w3wp!library!1!04/04/2007-20:16:26:: i INFO: Call to
RenderFirst( '/Reporting/ReportProjects' )
[1580] w3wp!processing!1!04/04/2007-20:16:26:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing., ;
[1580] Info:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing. -->
System.NullReferenceException: Object reference not set to an instance
of an object.
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.FieldsImpl.ResetUsedInExpression()
[1580] at
Microsoft.ReportingServices.ReportProcessing.Action.ResetObjectModelForDrillthroughContext(ObjectModelImpl
objectModel, IActionOwner actionOwner)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICollection.CreateTextBoxInstance(TextBox
textBox, ProcessingContext processingContext, Int32 index, IScope
containingScope)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICollection.CreateInstance(ReportItem
reportItem, Boolean setupEnvironment, Int32 index)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICollection.CreateInstances(ReportItemColInstance
collectionInstance, ReportItemCollection reportItemsDef)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.Merge.CreateInstances(ParameterInfoCollection
parameters, Boolean noRows)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.Merge.Process(ParameterInfoCollection
parameters, Boolean mergeTran)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessReport(Report
report, ProcessingContext pc, ProcessingContext context)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessReport(Report
report, ProcessingContext pc, Boolean snapshotProcessing, Boolean
processWithCachedData, GetReportChunk getChunkCallback, ErrorContext
errorContext, DateTime executionTime, CreateReportChunk
cacheDataCallback, ProcessingContext& context)
[1580] at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension
renderer, DateTime executionTimeStamp, GetReportChunk
getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext
rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
[1580] -- End of inner exception stack trace --
If I remove the textbox, all is fine (nothing is displayed)
Any idea ?On Apr 4, 1:24 pm, "jcmag" <j...@.yahoo.com> wrote:
> I have a report with a chart and a textbox. I use the 'navigation'
> property of the textbox to jump to another report. When my request
> returns an empty dataset I have the following exception:
> [1580] w3wp!library!1!04/04/2007-20:16:26:: i INFO: Call to
> RenderFirst( '/Reporting/ReportProjects' )
> [1580] w3wp!processing!1!04/04/2007-20:16:26:: e ERROR: Throwing
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> An unexpected error occurred in Report Processing., ;
> [1580] Info:
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
> An unexpected error occurred in Report Processing. -->
> System.NullReferenceException: Object reference not set to an instance
> of an object.
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.FieldsImpl.ResetUsedInExpression()
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.Action.ResetObjectModelForDrillthroughContext(ObjectModelImpl
> objectModel, IActionOwner actionOwner)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICollection.CreateTextBoxInstance(TextBox
> textBox, ProcessingContext processingContext, Int32 index, IScope
> containingScope)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICollection.CreateInstance(ReportItem
> reportItem, Boolean setupEnvironment, Int32 index)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICollection.CreateInstances(ReportItemColInstance
> collectionInstance, ReportItemCollection reportItemsDef)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.Merge.CreateInstances(ParameterInfoCollection
> parameters, Boolean noRows)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.Merge.Process(ParameterInfoCollection
> parameters, Boolean mergeTran)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessReport(Report
> report, ProcessingContext pc, ProcessingContext context)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ProcessReport(Report
> report, ProcessingContext pc, Boolean snapshotProcessing, Boolean
> processWithCachedData, GetReportChunk getChunkCallback, ErrorContext
> errorContext, DateTime executionTime, CreateReportChunk
> cacheDataCallback, ProcessingContext& context)
> [1580] at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension
> renderer, DateTime executionTimeStamp, GetReportChunk
> getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext
> rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
> [1580] -- End of inner exception stack trace --
> If I remove the textbox, all is fine (nothing is displayed)
> Any idea ?
Have you tried to include a dummy default single resultset and in the
main report filter that resultset out?
Enrique Martinez
Sr. Software Consultant|||> Have you tried to include a dummy default single resultset and in the
> main report filter that resultset out?
>
sorry but I don't understand what do you want me to do...