Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > Reporting Services
|
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 29th, 2007, 09:19 AM
Authorized User
 
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Somesh
Default Problem with Rendering Reports.

Hi all,

I have created some reports using the SQL Server2005 Reporting Service and the reports are deployed properly.

To display the reports from Report server through an windows application I have done the stapes as:- Passing the URL I am getting the Report name, Parameters Name and corresponding value.

The next step is selecting a suitable format (in which format the report will save into hard disk). I have done that thing.

Now my problem is that when I am going to render(save the report into hard disk) then it is showing the error as:-"Report_Publish.RSService.ReportingService2005 has not a definition for Render." ; Here namespace= Report_Publish;Data Source=RSService and ReportingService2005 is the webservice which is coming from web reference.

I am using Visual Studio 2005.


I think in VS2005 the key Word Render is not supported.

Can any one tell me what will be the Keyword for it?

The code are given below for render:-
  private void button4_Click(object sender, EventArgs e)
        {
            //get the format and report item from the comboboxes
                Format format = (Format)cboFormat.SelectedItem;
                ReportItem reportItem = (ReportItem)cboReports.SelectedItem;
                //set up variables needed to call render method
                ParameterValue[] parameters = GetParameters();
                string encoding;
                string mimeType;
                ParameterValue[] parametersUsed;
                Warning[] warnings;
                string[] streamIds;
                //render the report
                byte[] data;

                data = _rs.Render(reportItem.Path, format.Name,null, null, parameters, null, null, out encoding, out mimeType,out parametersUsed, out warnings, out streamIds);
                //create a file stream to write the output
                string fileName = txtOutputLocation.Text + "\\"+reportItem.Name + format.Extension;
                System.IO.FileStream fs = new System.IO.FileStream(fileName, System.IO.FileMode
                .OpenOrCreate);
                System.IO.BinaryWriter writer = new System.IO.BinaryWriter(fs);
                writer.Write(data, 0, data.Length);
                writer.Close();
                fs.Close();
                MessageBox.Show("File written to: " + fileName);
                //Report_Publish.RSService.ReportingService2005.Gene rateXmlMappings();

        }

        private ParameterValue[] GetParameters()
        {
            ArrayList controls = new ArrayList();
            //get the values from the parameter controls
            int len = grpParamInfo.Controls.Count;
            for (int i = 0; i < len; i++)
            {
                if (grpParamInfo.Controls[i] is TextBox)
                {
                    controls.Add(grpParamInfo.Controls[i]);
                }
            }
            //add the control information to parameter info objects
            len = controls.Count;
            ParameterValue[] returnValues = new ParameterValue[len];
            for (int i = 0; i < len; i++)
            {
                returnValues[i] = new ParameterValue();
                returnValues[i].Name = ((TextBox)controls[i]).Name;
                returnValues[i].Value = ((TextBox)controls[i]).Text;
            }
            return returnValues;
        }

Somesh Chatterjee
__________________
somesh chaterjee





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Crystel Reports aliirfan84 ASP.NET 2.0 Professional 0 August 29th, 2007 01:33 AM
Chapter2:problem in rendering weather table samouille666 JSP Basics 0 January 17th, 2007 10:50 AM
problem with master page rendering in ch02 MM BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 December 5th, 2006 08:22 PM
Deployment Problem with Sub Reports amirmunir Crystal Reports 0 May 28th, 2006 10:57 PM
Crystal Reports problem julenis C# 0 April 19th, 2006 01:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.