Monday, March 19, 2012

Image and text values not displayed in header or footer

I have a report in which I need to display an Image in the header, that is
coming from Database or sometimes an alternative text in place of the image.
Both ways I couldn't do it.
Case Text: I have tried several ways such as using ReportItem Parameters,
but the problem is the text is displayed in the first page of a group. If the
group region needs morethan one page when the report is rendered then the
next pages will not have the header or footer text.
Case Image: No means at all!!!!!
Is there any way of achieving this? Please help ...
--
GoitThere is an option on the Grouping and Sorting Properties dialog to repeat
group headers/footers. If you select the checkbox, the group header will be
repeated and hence the referenced reportitem value will show up in page
header/footer.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Goitom" <Goitom@.discussions.microsoft.com> wrote in message
news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
>I have a report in which I need to display an Image in the header, that is
> coming from Database or sometimes an alternative text in place of the
> image.
> Both ways I couldn't do it.
> Case Text: I have tried several ways such as using ReportItem Parameters,
> but the problem is the text is displayed in the first page of a group. If
> the
> group region needs morethan one page when the report is rendered then the
> next pages will not have the header or footer text.
> Case Image: No means at all!!!!!
> Is there any way of achieving this? Please help ...
> --
> Goit|||Thanks Robert,
You are right, I will check this out but how about the image? Your solution
could be used only for the case of text field. But still I am not able to
display an image logo in the header of the report that needs to be repeated
in all the pages and its source is database
Goit
"Robert Bruckner [MSFT]" wrote:
> There is an option on the Grouping and Sorting Properties dialog to repeat
> group headers/footers. If you select the checkbox, the group header will be
> repeated and hence the referenced reportitem value will show up in page
> header/footer.
>
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
> >I have a report in which I need to display an Image in the header, that is
> > coming from Database or sometimes an alternative text in place of the
> > image.
> > Both ways I couldn't do it.
> > Case Text: I have tried several ways such as using ReportItem Parameters,
> > but the problem is the text is displayed in the first page of a group. If
> > the
> > group region needs morethan one page when the report is rendered then the
> > next pages will not have the header or footer text.
> >
> > Case Image: No means at all!!!!!
> >
> > Is there any way of achieving this? Please help ...
> > --
> > Goit
>
>|||It sounds like you want the same image to show up in the header of every
page. There are several options to achieve this:
* use an "embedded" image in the report. This works well if the image is
e.g. a company logo.
* use a "project" image which is part of the report solution. The image will
get published as resource to the report server
* use a "web" image (aka external image) - which requires at least RS 2000
SP1.
If you really need the image to come from the database, you can do the
following:
* add a dataset DImage to the report which retrieves the image data - e.g.
as ImageData column.
* add a new report parameter PImage of type String. Make the parameter
hidden (non-prompted). Set the parameter default as query-based and choose
ImageData as column.
* add a new Image report item in the page header/footer. Set the image type
to "Database". For the image value expression use =Parameters!PImage.Value.
Don't forget the set the mimetype correctly.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Goitom" <Goitom@.discussions.microsoft.com> wrote in message
news:F071F4C7-08AD-4654-911C-32DA43EA3441@.microsoft.com...
> Thanks Robert,
> You are right, I will check this out but how about the image? Your
> solution
> could be used only for the case of text field. But still I am not able to
> display an image logo in the header of the report that needs to be
> repeated
> in all the pages and its source is database
>
> --
> Goit
>
> "Robert Bruckner [MSFT]" wrote:
>> There is an option on the Grouping and Sorting Properties dialog to
>> repeat
>> group headers/footers. If you select the checkbox, the group header will
>> be
>> repeated and hence the referenced reportitem value will show up in page
>> header/footer.
>>
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
>> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
>> >I have a report in which I need to display an Image in the header, that
>> >is
>> > coming from Database or sometimes an alternative text in place of the
>> > image.
>> > Both ways I couldn't do it.
>> > Case Text: I have tried several ways such as using ReportItem
>> > Parameters,
>> > but the problem is the text is displayed in the first page of a group.
>> > If
>> > the
>> > group region needs morethan one page when the report is rendered then
>> > the
>> > next pages will not have the header or footer text.
>> >
>> > Case Image: No means at all!!!!!
>> >
>> > Is there any way of achieving this? Please help ...
>> > --
>> > Goit
>>|||Thanks a lot, I have tried this approach several times with different
techiniques but the end result is that the image box control shows the no
image icon.
--
Goit
"Robert Bruckner [MSFT]" wrote:
> It sounds like you want the same image to show up in the header of every
> page. There are several options to achieve this:
> * use an "embedded" image in the report. This works well if the image is
> e.g. a company logo.
> * use a "project" image which is part of the report solution. The image will
> get published as resource to the report server
> * use a "web" image (aka external image) - which requires at least RS 2000
> SP1.
> If you really need the image to come from the database, you can do the
> following:
> * add a dataset DImage to the report which retrieves the image data - e.g.
> as ImageData column.
> * add a new report parameter PImage of type String. Make the parameter
> hidden (non-prompted). Set the parameter default as query-based and choose
> ImageData as column.
> * add a new Image report item in the page header/footer. Set the image type
> to "Database". For the image value expression use =Parameters!PImage.Value.
> Don't forget the set the mimetype correctly.
>
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
> news:F071F4C7-08AD-4654-911C-32DA43EA3441@.microsoft.com...
> > Thanks Robert,
> >
> > You are right, I will check this out but how about the image? Your
> > solution
> > could be used only for the case of text field. But still I am not able to
> > display an image logo in the header of the report that needs to be
> > repeated
> > in all the pages and its source is database
> >
> >
> > --
> > Goit
> >
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> There is an option on the Grouping and Sorting Properties dialog to
> >> repeat
> >> group headers/footers. If you select the checkbox, the group header will
> >> be
> >> repeated and hence the referenced reportitem value will show up in page
> >> header/footer.
> >>
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
> >> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
> >> >I have a report in which I need to display an Image in the header, that
> >> >is
> >> > coming from Database or sometimes an alternative text in place of the
> >> > image.
> >> > Both ways I couldn't do it.
> >> > Case Text: I have tried several ways such as using ReportItem
> >> > Parameters,
> >> > but the problem is the text is displayed in the first page of a group.
> >> > If
> >> > the
> >> > group region needs morethan one page when the report is rendered then
> >> > the
> >> > next pages will not have the header or footer text.
> >> >
> >> > Case Image: No means at all!!!!!
> >> >
> >> > Is there any way of achieving this? Please help ...
> >> > --
> >> > Goit
> >>
> >>
> >>
>
>|||Are you sure the image is really stored as image in the database (rather
than being stored as OLE image, which for instance Access would do)?
If it is stored as OLE image, you have to get rid of the OLE header. If the
bitmap was created on an English system, the OLE header is 78 bytes (e.g. on
Spanish it would be 88 bytes). Use the following image value expression to
make the image show up (79 == header length + 1):
=System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!Picture.Value),79))
Alternatively, you can use the following expression (which only works for
images created on an en-US system!):
=System.Convert.FromBase64String(Mid(System.Convert.ToBase64String(Fields!Picture.Value),105))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Goitom" <Goitom@.discussions.microsoft.com> wrote in message
news:ED81ACCF-9D9E-4E4A-9A58-2A6485E338D9@.microsoft.com...
> Thanks a lot, I have tried this approach several times with different
> techiniques but the end result is that the image box control shows the no
> image icon.
> --
> Goit
>
> "Robert Bruckner [MSFT]" wrote:
>> It sounds like you want the same image to show up in the header of every
>> page. There are several options to achieve this:
>> * use an "embedded" image in the report. This works well if the image is
>> e.g. a company logo.
>> * use a "project" image which is part of the report solution. The image
>> will
>> get published as resource to the report server
>> * use a "web" image (aka external image) - which requires at least RS
>> 2000
>> SP1.
>> If you really need the image to come from the database, you can do the
>> following:
>> * add a dataset DImage to the report which retrieves the image data -
>> e.g.
>> as ImageData column.
>> * add a new report parameter PImage of type String. Make the parameter
>> hidden (non-prompted). Set the parameter default as query-based and
>> choose
>> ImageData as column.
>> * add a new Image report item in the page header/footer. Set the image
>> type
>> to "Database". For the image value expression use
>> =Parameters!PImage.Value.
>> Don't forget the set the mimetype correctly.
>>
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
>> news:F071F4C7-08AD-4654-911C-32DA43EA3441@.microsoft.com...
>> > Thanks Robert,
>> >
>> > You are right, I will check this out but how about the image? Your
>> > solution
>> > could be used only for the case of text field. But still I am not able
>> > to
>> > display an image logo in the header of the report that needs to be
>> > repeated
>> > in all the pages and its source is database
>> >
>> >
>> > --
>> > Goit
>> >
>> >
>> > "Robert Bruckner [MSFT]" wrote:
>> >
>> >> There is an option on the Grouping and Sorting Properties dialog to
>> >> repeat
>> >> group headers/footers. If you select the checkbox, the group header
>> >> will
>> >> be
>> >> repeated and hence the referenced reportitem value will show up in
>> >> page
>> >> header/footer.
>> >>
>> >>
>> >> -- Robert
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >>
>> >>
>> >> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
>> >> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
>> >> >I have a report in which I need to display an Image in the header,
>> >> >that
>> >> >is
>> >> > coming from Database or sometimes an alternative text in place of
>> >> > the
>> >> > image.
>> >> > Both ways I couldn't do it.
>> >> > Case Text: I have tried several ways such as using ReportItem
>> >> > Parameters,
>> >> > but the problem is the text is displayed in the first page of a
>> >> > group.
>> >> > If
>> >> > the
>> >> > group region needs morethan one page when the report is rendered
>> >> > then
>> >> > the
>> >> > next pages will not have the header or footer text.
>> >> >
>> >> > Case Image: No means at all!!!!!
>> >> >
>> >> > Is there any way of achieving this? Please help ...
>> >> > --
>> >> > Goit
>> >>
>> >>
>> >>
>>

No comments:

Post a Comment