Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Friday, March 23, 2012

MMC error with Enterprise Manager

When attempting to display a database's property window in Enterprise Manager
an error happens with MMC. On a machine that also has SQL Server 2005 client
tools installed Enterprise manager crashes. On other machines that do not
have SQL Server 2005 client tools installed, MMC throws an error similar to
the one below before Enterprise Manager crashes:
mmc.exe Application error The instruction at "0x7801094 referenced
memory.....
The exact memory address in the above error message is not correct. I copied
it from another reference (on Google) dealing with DTS / MMC errors. I do not
have the exact message because I was forced to reinstall SQL Server 2000 in
order to use the RTM version to get around this error. The bug does not
happen in the RTM version but does with both SP3 and SP4.
The problem started fairly recently and I suspect it has to do with a
Microsoft update. It is happening to every computer computer in our facility
that has service packs applied to SQL Server and affects more than the
ability to display a databases property page.
Does anyone have any knowledge as to what might be causing these errors with
MMC and whether or not there is a work around?
I have now applied SP4 again and can replicate the error again.
When I right click on a Database in Enterprise Manager and select properties
I receive the following message:
mmc.exe - Application Error
The instruction at "0x4247b98b" referenced memory at "0x0000001c". The
memory could not be read.
Click OK to terminate....
I am running SQL Server 2000 on Windows 2000 (SP4).

Wednesday, March 21, 2012

MM/DD instead of MM/DD/YYYY?

Is it possible to display a date field as just MM/DD instead of the full MM/DD/YYYY?

Yes, just go to the format property of the textbox in which this date is displayed and enter MM/dd

|||That was embarrassingly easy. Thanks for the help.

Monday, March 19, 2012

Mix Scatter and Line in Reporting Services Charts

I want to display the data points as a scatter chart with a line for
'expected'. I can mix bar and line but not scatter and line. Also tried to
over-lay two chart (which of course fails when viewed in html.As you have already found out - the approach of overlapping charts does only
work for image-based renderers (e.g. Preview, PDF, TIFF), but not for HTML.
It is possible to achieve what you want with a "scatter line" chart natively
in RS 2000 SP1. However, this is not trivial and the shown approach has the
limitation that you cannot use the default chart legend (you may want to
check my custom legend sample available either in the archives of this
newsgroups or on Brian Welcker's blog:
http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx).
In addition, you would need to prepare the data in a special way (e.g. with
a stored procedure) so that it contains both, the individual datapoints as
well as the line data. Attached is a sample RDL - it will require some
careful study! It is just a proof of concept that it is possible to do this
in RS 2000 SP1.
The RDL sample is copy&pasted to the bottom of this posting.
--
Robert M. Bruckner
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"GH" <GH@.discussions.microsoft.com> wrote in message
news:6E0AA4E3-B6E6-4CBC-91DC-4A1C6028CE70@.microsoft.com...
>I want to display the data points as a scatter chart with a line for
> 'expected'. I can mix bar and line but not scatter and line. Also tried
> to
> over-lay two chart (which of course fails when viewed in html.
=============================================================
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Chart Name="chart1">
<ThreeDProperties>
<Rotation>30</Rotation>
<Inclination>30</Inclination>
<Shading>Simple</Shading>
<WallThickness>50</WallThickness>
</ThreeDProperties>
<Style>
<BackgroundColor>White</BackgroundColor>
</Style>
<Legend>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Position>RightCenter</Position>
</Legend>
<Palette>Default</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!X.Value)</Value>
</DataValue>
<DataValue>
<Value>=Sum(Fields!Y.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Style>
<BorderWidth>
<Default>3pt</Default>
</BorderWidth>
<BorderColor>
<Default>=iif(Fields!SeriesId.Value >= 100,
iif(Fields!SeriesId.Value >= 200, "DodgerBlue", "GreenYellow"),
Nothing)</Default>
</BorderColor>
<BorderStyle>
<Default>Dotted</Default>
</BorderStyle>
</Style>
<Marker>
<Type>Square</Type>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title />
<MajorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Min>0</Min>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</CategoryAxis>
<DataSetName>DataSet1</DataSetName>
<PointWidth>0</PointWidth>
<Type>Scatter</Type>
<Top>0.125in</Top>
<Title />
<Width>4.75in</Width>
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="chart1_CategoryGroup1">
<GroupExpressions>
<GroupExpression>=Fields!Id.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!Id.Value</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Height>3.875in</Height>
<SeriesGroupings>
<SeriesGrouping>
<DynamicSeries>
<Grouping Name="chart1_SeriesGroup1">
<GroupExpressions>
<GroupExpression>=Fields!SeriesId.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!SeriesId.Value</Label>
</DynamicSeries>
</SeriesGrouping>
</SeriesGroupings>
<Subtype>SmoothLine</Subtype>
<PlotArea>
<Style>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<Left>0.625in</Left>
<ValueAxis>
<Axis>
<Title />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Min>0</Min>
<Margin>true</Margin>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>4.375in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>43c9f73e-1490-476c-8572-d6b0d099d9a8</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=(local);initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.5in</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="Id">
<DataField>Id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="SeriesId">
<DataField>SeriesId</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="X">
<DataField>X</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Y">
<DataField>Y</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>select 10 as Id, 0 as SeriesId, 1 as X, 1 as Y union
all
select 11 as Id, 0 as SeriesId, 1.6 as X, 1.4 as Y union all
select 12 as Id, 0 as SeriesId, 2.7 as X, 3 as Y union all
select 13 as Id, 0 as SeriesId, 4 as X, 4 as Y union all
select 20 as Id, 1 as SeriesId, 1.5 as X, 2 as Y union all
select 21 as Id, 1 as SeriesId, 4 as X, 3 as Y union all
select 100 as Id, 100 as SeriesId, 1.2 as X, 1.0 as Y union all
select 101 as Id, 101 as SeriesId, 1.7 as X, 1.5 as Y union all
select 102 as Id, 102 as SeriesId, 1.9 as X, 2.2 as Y union all
select 103 as Id, 103 as SeriesId, 2.3 as X, 2.7 as Y union all
select 104 as Id, 104 as SeriesId, 3.0 as X, 3.1 as Y union all
select 105 as Id, 105 as SeriesId, 3.7 as X, 3.8 as Y union all
select 200 as Id, 200 as SeriesId, 1.6 as X, 2.2 as Y union all
select 201 as Id, 201 as SeriesId, 1.9 as X, 2.3 as Y union all
select 202 as Id, 202 as SeriesId, 2.3 as X, 2.4 as Y union all
select 203 as Id, 203 as SeriesId, 2.9 as X, 2.5 as Y union all
select 204 as Id, 204 as SeriesId, 3.3 as X, 2.9 as Y union all
select 205 as Id, 205 as SeriesId, 3.8 as X, 3.0 as Y</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>70f720a6-1b18-43f1-a9d5-2d24de087995</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>|||Did you mean you can mix Bar and line in a chart? If yes, how did you do it?
Thanks in advance.
"GH" wrote:
> I want to display the data points as a scatter chart with a line for
> 'expected'. I can mix bar and line but not scatter and line. Also tried to
> over-lay two chart (which of course fails when viewed in html.|||You can display individual items up to render as lines.
Set the chart up to be a bar chart. Add 2 values. Go to properties for the
2nd value and [I think] go to the 2nd tab. There should be a check box for
"Display or Render as Line".
"jxu" <jxu@.discussions.microsoft.com> wrote in message
news:AE549848-174D-41D0-B20F-90CBFD34BF55@.microsoft.com...
> Did you mean you can mix Bar and line in a chart? If yes, how did you do
> it?
> Thanks in advance.
> "GH" wrote:
>> I want to display the data points as a scatter chart with a line for
>> 'expected'. I can mix bar and line but not scatter and line. Also tried
>> to
>> over-lay two chart (which of course fails when viewed in html.|||I posted a question regarding this scenario and how it effects the legend. I
created the chart you described below but now the legend also got updated
with a second series and I do not want this. The line I plotted does not
require legend entries. How do I get rid of these?
"Tim Dot NoSpam" wrote:
> You can display individual items up to render as lines.
> Set the chart up to be a bar chart. Add 2 values. Go to properties for the
> 2nd value and [I think] go to the 2nd tab. There should be a check box for
> "Display or Render as Line".
> "jxu" <jxu@.discussions.microsoft.com> wrote in message
> news:AE549848-174D-41D0-B20F-90CBFD34BF55@.microsoft.com...
> > Did you mean you can mix Bar and line in a chart? If yes, how did you do
> > it?
> > Thanks in advance.
> >
> > "GH" wrote:
> >
> >> I want to display the data points as a scatter chart with a line for
> >> 'expected'. I can mix bar and line but not scatter and line. Also tried
> >> to
> >> over-lay two chart (which of course fails when viewed in html.
>
>

Saturday, February 25, 2012

Missing Information with Cross Tab Expert

I am using a Cross Tab Expert to display coverage information about auto insurance policies. In the SQL that is used, there is a Coverage Column and an Option Column. If the Coverage is Comprehensive and the Option is Full Glass, I am to print "Comprehensive - Full Glass", otherwise, print "Comprehensive". That works fine, if the first vehicle in the group has Full Glass.

Is there a way I can programatically add a new row one car has Full Glass, but the other doesnt, so row 1 will print "Comprehensive" and have the Car 1 value, and row 2 will print "Comprehensive - Full Glass" and have the Car 2 value?

Thanks!!
MichaelNot quite sure why you are a using a crosstab, but here goes:

Set up the crosstab by customer and, the next level lower, by car. Thus, if I had four cars, I would have four rows, sorted based on the type of coverage as you describe. If I had but two cars, both with the same level f coverage, only the two would print.

missing image

Hey
Im trying to display an image in a report in .PDF, but the problem is,
that there will not allways be an image. Im retrieving the image from
the database (MS SQL Server) but the table with the images is left
outer joined with some other tables ie. it will allways return a row,
but not allways will the content field contain an image.
Ive tried the following in the value property of the image item:
=First(Fields!Content.Value)
Results in the report timing out whenever theres no image. The report
never shows.
=iif(Trim(Fields!Content.Value) = "", Nothing, Fields!Content.Value)
Results in a red cross in the report where the image should be. It
doesnt matter wether theres an image or not, it just shows the red
cross.
I would like it not to show anything if theres no image, and if there
is an image, to show the image.
Anyone Please help
Regards
Jimmywell in sql server there is a function named DATALENGTH(ImageDataField)
and returns no of bytes occupied by the image
u should use this to check how many bytes r of a pic better to make a
calculated field in ur data set
then use this calculated field to hid or show the image in the report
by using the following expression in the HIDDEN property of the IMAGE
=iif(imagelengthfield.value=1,true,false)
when image wont b avaiable ur this calculated field ll return 1
otherwise some bigger value representing bytes of the image
u can further go to restrict data set by using
datalength(imageDatabaseField)>1 to come up in the dataset of the
report with the records having images only
choice is urs
take care
regards|||Hey
Actually what did the trick was to specify the dataset name. Dont know
why, it took me very long time, but it was after reading your post that
i found the solution, so thank :)
Jimmy