Wednesday, March 7, 2012

Programmatic Render of Reports into PDF format

Hi,
Can anybody please convert the following C# code into VB.Net Code.I tried
but its saying Object Reference not set to an instance of an object.
Or give me VB.NET(Web Application, CodeBehind:VB.Net) code to
programmatically render reports into PDF format.
// Prepare report parameter.
ParameterValue[] parameters = new ParameterValue[1];
parameters[0] = new ParameterValue();
parameters[0].Name = "Parameter1";
parameters[0].Value = Request.QueryString["id"];
Thanks
Rajesh YDim Parameters(1) As New ParameterValue
Parameters(0) = New ParameterValue
Parameters(0).Name = "Parameter1"
Parameters(0).Value = Request.QueryString("id")
"Rajesh Yennam" wrote:
> Hi,
> Can anybody please convert the following C# code into VB.Net Code.I tried
> but its saying Object Reference not set to an instance of an object.
> Or give me VB.NET(Web Application, CodeBehind:VB.Net) code to
> programmatically render reports into PDF format.
> // Prepare report parameter.
> ParameterValue[] parameters = new ParameterValue[1];
> parameters[0] = new ParameterValue();
> parameters[0].Name = "Parameter1";
> parameters[0].Value = Request.QueryString["id"];
> Thanks
> Rajesh Y|||Hi Rajesh:
I'd suspect the line of code :
parameters[0].Value = Request.QueryString["id"];
I'd guess you do not have an id parameter in the query string. Double
check the query string.
HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 29 Oct 2004 03:43:01 -0700, "Rajesh Yennam"
<RajeshYennam@.discussions.microsoft.com> wrote:
>Hi,
>Can anybody please convert the following C# code into VB.Net Code.I tried
>but its saying Object Reference not set to an instance of an object.
>Or give me VB.NET(Web Application, CodeBehind:VB.Net) code to
>programmatically render reports into PDF format.
>// Prepare report parameter.
> ParameterValue[] parameters = new ParameterValue[1];
> parameters[0] = new ParameterValue();
> parameters[0].Name = "Parameter1";
> parameters[0].Value = Request.QueryString["id"];
>Thanks
>Rajesh Y

No comments:

Post a Comment