Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Friday, March 23, 2012

Help with an error I don''t understand

Hey everyone,

I'm trying to make an image appear differently depending on the values of certain data. The statement that I am using is:

= IIF(DATEDIFF("dd",Fields!LastBackupDate.Value,Now)>15,"redball",IIF(DATEDIFF("dd",Fields!LastBackupDate.Value,Now)<8,"greenball","yellowball"))

And the error that I get is:

[rsRuntimeErrorInExpression] The Value expression for the image ‘image4’ contains an error: Argument 'Interval' is not a valid value.

Preview complete -- 0 errors, 1 warnings

When I preview the report I just get the typical white box with a red x where the image should be. I don't understand.

Thanks in advance,

Keith

Nevermind, argument needs to be "d". Thanks anyway!

-Keith

Help with an error I don''t understand

Hey everyone,

I'm trying to make an image appear differently depending on the values of certain data. The statement that I am using is:

= IIF(DATEDIFF("dd",Fields!LastBackupDate.Value,Now)>15,"redball",IIF(DATEDIFF("dd",Fields!LastBackupDate.Value,Now)<8,"greenball","yellowball"))

And the error that I get is:

[rsRuntimeErrorInExpression] The Value expression for the image ‘image4’ contains an error: Argument 'Interval' is not a valid value.

Preview complete -- 0 errors, 1 warnings

When I preview the report I just get the typical white box with a red x where the image should be. I don't understand.

Thanks in advance,

Keith

Nevermind, argument needs to be "d". Thanks anyway!

-Keith

sql

Monday, March 19, 2012

Help with a Problem:Reporting Services Session Management

Ok, this is a two fold problemSharepoint & Reporting Services)
I have a Report Image that I call from Reporting Services and I render it in
a Sharepoint Webpart, I need to manage the Session from reporting sevices as
when I try to manage it from the Sharepoint Web Part, Reporting Services says
it can not find the image/data, as the report session has changed, and has
new data, I need to make the Report Image Session able to maintain the prior
session.
I was wondering if there was a way to capture the session variable from
Reporting Services and keep it in the webpart? or capture it in someway to to
maintain the sessionon the data call.
Any one out there know how to capture this or have run into this problem, or
might know a solution?
If you are using the Reporting Services Web Service to retrieve the report by calling the Render method on the ReportingService object in your web part, you can capture the Report SessionId from the SessionHeaderValue.SessionId property on the ReportingSe
rvice object after the call and use it later when you are retrieving the image via the RenderStream method.
see: http://msdn.microsoft.com/library/de...ce_lz_6x0z.asp
Currently I am using a Web Part to display the report and a seperate .aspx file to render the images in the report.
I call the Render Method of the Web Service with the and set the deviceinfo for HTMLFragment(true),StreamRoot(/myVirtualDirectory/ImageRender.aspx?sessionid=&reportname=xx¶m1=y y&streamid=)
After the call the output html will contain image tags with src attribute equal StreamRoot concatinated with the streamId (i.e. streamid has to be the last item in the query string)
I populate the sessionid in the above image url with a string replace.
CODE:
public static string RetrieveReport(string reportPath, ParameterValue[] parameterValues, string sharePointHelperUrl, bool useDefaultCredentials)
{
string outputHtml=string.Empty;
ReportingService rs = new ReportingService();
rs.Credentials = GetCredentials(useDefaultCredentials);
ItemTypeEnum reportType = rs.GetItemType(reportPath);
if(reportType==ItemTypeEnum.Report)
{
// Render arguments
byte[] result = null;
// Prepare Render method's parameters.
/*
* The devInfo parameter is set to hide the tool bar, hide the parameters, return the fragment Html
* and prefix all images with the Url to our helper aspx file with the query string holding all data
* required to retrieve the correct image from the Reporting Service
* */
string imageUrl = System.Web.HttpUtility.HtmlEncode(
string.Format("{0}/getreportimages.aspx?{1}={2}&{3}={4}&{5}={6}&{7}=" ,
sharePointHelperUrl,
"RSSessionID",
"",
"ReportPath",
reportPath,
"Parameters",
getReportParametersForQueryString(parameterValues) ,
"StreamID"
)
);
string devInfo = @."<DeviceInfo><Toolbar>False</Toolbar><StreamRoot>" + imageUrl + "</StreamRoot><Parameters>False</Parameters><HTMLFragment>True</HTMLFragment></DeviceInfo>";
string format = "HTML4.0";
string historyID = null;
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string[] streamIDs = null;
rs.SessionHeaderValue = new SessionHeader();
result = rs.Render(reportPath, format, historyID, devInfo, parameterValues, credentials, showHideToggle, out encoding, out mimeType, out reportHistoryParameters, out warnings, out streamIDs);
outputHtml = System.Text.Encoding.UTF8.GetString(result, 0,result.Length);
/*
* The SessionHeaderValue.SessionId is not available until the Render method of the Reporting Service
* has been called. This is required when calling the RenderStream method, this method is called by the
* supporting aspx page. This page is requested by the client to render images. Replace Query String
* "RSSessionID" with "RSSessionID" and the SessionHeaderValue.SessionId for each image in the rendered
* output.
* */
outputHtml = outputHtml.Replace("RSSessionID=", "RSSessionID=" + rs.SessionHeaderValue.SessionId);
}
return outputHtml;
}
NOTE:The /myVirtualDirectory/ has to excluded from SharePoint so it is processed as a normal aspx.
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Sunday, February 26, 2012

Help storing and retrieving .rtf blob as longvarbinary

Hello,
can anyone point me in the right direction? I have .rtf files stored in a
table as image or sql_longvarbinary data. I would like to be able to pull
out the data and assemble an .rtf file using VBscript or VBA
I'm not sure where to begin when working with image data types.
Thanks
Buddy G.You can take a look at these:
HOWTO: Read and Write BLOBs Using GetChunk and AppendChunk
http://support.microsoft.com/d_efau...b;en-us;1949_75
HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
http://support.microsoft.com/d_efau...;EN-US;q258_038
"Jeff Boyce" <nonse
-oj
"Buddy G" <Buddy at gcsbend dot com> wrote in message
news:ub5xmnyZFHA.3328@.TK2MSFTNGP09.phx.gbl...
> Hello,
> can anyone point me in the right direction? I have .rtf files stored in a
> table as image or sql_longvarbinary data. I would like to be able to pull
> out the data and assemble an .rtf file using VBscript or VBA
> I'm not sure where to begin when working with image data types.
> Thanks
> Buddy G.
>|||Thanks,
let me take a look at those.
Buddy
"oj" <nospam_ojngo@.home.com> wrote in message
news:%23fRZc00ZFHA.3784@.TK2MSFTNGP12.phx.gbl...
> You can take a look at these:
> HOWTO: Read and Write BLOBs Using GetChunk and AppendChunk
> http://support.microsoft.com/d_efau...b;en-us;1949_75
>
> HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream
Object
> http://support.microsoft.com/d_efau...;EN-US;q258_038
>
> "Jeff Boyce" <nonse
> --
> -oj
>
> "Buddy G" <Buddy at gcsbend dot com> wrote in message
> news:ub5xmnyZFHA.3328@.TK2MSFTNGP09.phx.gbl...
a
pull
>