Printing Report Directly Without Using Reportviewer

Apr 11, 2008



Hi,

My Requirement is to dirctly Print the SSRS Report without using Reportviewer.
If anybody know How to Print Report without using Reportviewer, please let me know asap.

Thanks in advance.

View 2 Replies


ADVERTISEMENT

Problem With Printing Report Directly To Printer

Aug 22, 2007

Hello,
I am trying to get a SSRS 2005 report to print from my Visual Studio 2005 C++ application without using the ReportViewer to preview it first. What I have done is created a dll that I call into when I want to access a certain report and print it. While searching around on the internet I found an MSDN article about printing a report without previewing and it had an example in C# code. So I used that as a guide for my C++ code but I am still having problems with rendering the report properly so it can be printed. When I try to render a report using the "Image" format, my streamid string is empty but the byte array that the render routine returns is not. Here is the code I am using, what could be the problem here?

Note: m_Streams is define elsewhere as
array<String^>^ m_Streams = gcnew array<String^>(10);


void Print::Export(LocalReport^ report)

{

array<Warning^>^ Warn = gcnew array<Warning^>(10);

String^ deviceinfo =

"<DeviceInfo>" +

" <OutputFormat>EMF</OutputFormat>" +

" <PageWidth>8.5in</PageWidth>" +

" <PageHeight>11in</PageHeight>" +

" <MarginTop>0.25in</MarginTop>" +

" <MarginLeft>0.25in</MarginLeft>" +

" <MarginRight>0.25in</MarginRight>" +

" <MarginBottom>0.25in</MarginBottom>" +

"</DeviceInfo>";

String^ mimeType;

String^ enc;

String^ FileExt;

array<Byte>^ bytes;

bytes = report->Render("Image",deviceinfo, mimeType, enc, FileExt, m_Streams,Warn); // m_Streams has a length of

return; // 0 after the Render

}


void Print:: PrintPage(System:: Object^ sender, System:: Drawing:: Printing:: PrintPageEventArgs^ ev)

{

Metafile^ pageImage = gcnew Metafile(m_Streams[m_CurrentPage]);

ev->Graphics->DrawImage(pageImage, ev->PageBounds);

m_CurrentPage++;

ev->HasMorePages = (m_CurrentPage < m_Streams->Length);

return;

}


void Print:rintRpt()

{

String^ printerName = "Default";

if (m_Streams->Length < 0)

return;

PrintDocument^ printDoc = gcnew PrintDocument();

if (!printDoc->PrinterSettings->IsValid) {

return;

}

printDoc->PrintPage += gcnew PrintPageEventHandler(this, &Print:: PrintPage);

printDoc->Print();

return;

}


void Print::Run()

{

LocalReport^ report = gcnew LocalReport();

DataSet^ ds = gcnew DataSet();

LoadData(ds);

report->ReportPath = "c:\bmi\bulrpt\Report1.rdlc";

ReportDataSource^ RDS = gcnew ReportDataSource();

RDS->Name = "DataSet1_Subject";

RDS->Value = ds->Tables["Subject"];

report->DataSources->Add(RDS);

Export(report);

PrintRpt();

return;

}

DataTable^ Print:: LoadData(DataSet^ ds)

{

System:: String ^ConnStr = "SELECT * FROM Subject";

SqlConnection^ conn = gcnew SqlConnection("Data Source=JOE-PC\BMIMSDESERVER; Initial Catalog=stx52013;Integrated Security = TRUE");

SqlCommand^ command = gcnew SqlCommand(ConnStr, conn);

SqlDataAdapter^ adapt = gcnew SqlDataAdapter(command);

adapt->TableMappings->Add("Table", "Subject");

conn->Open();

adapt->Fill(ds);

return ds->Tables["Subject"];

}

View 2 Replies View Related

ReportViewer Not Printing Under Terminal Services

Aug 16, 2007

I have written an application with VB.Net. It display a report written using Reporting Rervices (rdl) in the ReportViewer Contol. When I run the application locally under windows, I can print the report just fine. When I run it under Terminal Services, sometimes it takes 2 or 3 times to print. Sometimes it never does. It looks like it prints the pages because the popup displays and it shows it is printing but it never does.

If I bring up the queue for the printer to watch when I print, then click the Print button on the the ReportView contol, I see the print enter the queue on the printer and then it is deleted but nothing prints. If I do it all again, the same thing happens but it may or may not print.

The applicatoin is written in VB.Net under Visual Studio Professional SP1.

Any and all assistance is greatly appreciated!!

View 4 Replies View Related

Transact SQL :: Printing Report - Capture Actual Pages In A Duplex Printing Job

Aug 10, 2015

So I have been asked by our sustainability person to create report from our printing data that actually shows the number of pieces of paper used. This is easy enough for single-sided printing, but when printing in duplex the software does not take into account that 3 printing pages actually equates to 2 pieces of paper. I know this sounds simple, but say I have a print job record that looks like this:

Submitted printed total_pages duplex
8/10/2015 8/10/2015 42 1                       

This is a print jobs that if done correctly is actually 21 pages( duplex printing). If the job is say total_pages =5 I cant just divide by 2 because its actually using 3 pieces of paper ( yes they are wanting this data don't ask why). How can I adjust some sql to accurately depict 5 pages, front and back, as 3 pieces of paper?

View 2 Replies View Related

Landscape Printing From Report Manager Not Printing All Displayed Columns On Each Page

May 3, 2007

I have deployed a report that is configured for landscape printing. It does print in landscape, however, only the first seven columns appear on the first page and the other five columns appear on the next page. Is there a method, like in print preview setup in MS Excel, where we can scale down the print (like to 80%) so all columns appear on each page?

Thanks!

View 3 Replies View Related

Get A Report Directly From Excel

Dec 6, 2007



Hi,

Is possible to get a report directly from excel or I must develop an tools for that?

Fredo

View 4 Replies View Related

How To Display Report In Pdf Format Directly

May 5, 2008



Hi all
I am using local reports.(.rdlc files)
My requirement is when the user selects some options in the form and click on Submit buttion,He should get report in PDF format directly.Is it possible?if possible give me some example code.No need to preview in general format.
Help me.
Regards.

View 3 Replies View Related

HOW TO: Print A Report Directly To A Printer

Oct 18, 2006

The code below is a class file done in vb.net. The original idea came from reading this forum and some blogs.



To use the code below, you can create a windows application or service.

then create a class file and drop this code in it.

Remeber to reference the 2005 report execution service and also in the program settings include the path to your server.

IE: ReportExecutionService = http://localhost/ReportServer/ReportExecution2005.asmx or whatever your server URL is at.

Setup the public properties for printername (sharenames work fine), Number of copies and Report name.

That is all there is to it. This code is REALLY expandable to add more options.

Please remember to let me kow if you like this.

Imports System

Imports System.Drawing

Imports System.Drawing.Imaging

Imports System.Drawing.Printing

Imports System.IO

Imports System.Web.Services.Protocols

Imports PrintReport.ReportExecution

Imports System.Runtime.InteropServices ' For Marshal.Copy

Namespace PrintReport

Friend Class app

Private m_sPrinterName As String

Private m_sReportName As String

Private m_sNumCopies As Integer

<STAThread()> _

Public Sub Main(ByVal args As String())

Dim pe As PrintMain = New PrintMain()

pe.PrintReport(m_sPrinterName, m_sReportName, m_sNumCopies)

End Sub

Public Property pPrinterName()

Get

Return m_sPrinterName

End Get

Set(ByVal value)

m_sPrinterName = value

End Set

End Property

Public Property pReportName()

Get

Return m_sReportName

End Get

Set(ByVal value)

m_sReportName = value

End Set

End Property

Public Property pNumCopies()

Get

Return m_sNumCopies

End Get

Set(ByVal value)

m_sNumCopies = value

End Set

End Property

End Class

Friend Class PrintMain

Private rs As New ReportExecutionService()

Private m_renderedReport As Byte()()

Private m_delegate As Graphics.EnumerateMetafileProc = Nothing

Private m_currentPageStream As MemoryStream

Private m_metafile As Metafile = Nothing

Private m_numberOfPages As Integer

Private m_currentPrintingPage As Integer

Private m_lastPrintingPage As Integer

Public Sub New()

' Create proxy object and authenticate

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

rs.Url = My.Settings.ReportExecutionService '"http://localhost/ReportServer/ReportExecution2005.asmx"

End Sub

Public Function RenderReport(ByVal reportPath As String) As Byte()()

' Private variables for rendering

Dim deviceInfo As String

Dim format As String = "IMAGE"

Dim firstPage As Byte() = Nothing

Dim encoding As String = ""

Dim mimeType As String = ""

Dim warnings As Warning() = Nothing

Dim reportHistoryParameters As ParameterValue() = Nothing

Dim streamIDs As String() = Nothing

Dim pages As Byte()() = Nothing

Dim historyID As String = Nothing

Dim showHideToggle As String = Nothing

Dim execInfo As New ExecutionInfo

Dim execHeader As New ExecutionHeader()

Dim SessionId As String

Dim extension As String = ""

rs.ExecutionHeaderValue = execHeader

execInfo = rs.LoadReport(reportPath, historyID)

'rs.SetExecutionParameters(parameters, "en-us")

SessionId = rs.ExecutionHeaderValue.ExecutionID

' Build device info based on the start page

deviceInfo = String.Format("<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>", "emf")

'Exectute the report and get page count.

Try

' Renders the first page of the report and returns streamIDs for

' subsequent pages

firstPage = rs.Render(format, deviceInfo, extension, encoding, mimeType, warnings, streamIDs)

' The total number of pages of the report is 1 + the streamIDs

m_numberOfPages = streamIDs.Length + 1

pages = New Byte(m_numberOfPages - 1)() {}

' The first page was already rendered

pages(0) = firstPage

Dim pageIndex As Integer = 1

Do While pageIndex < m_numberOfPages

' Build device info based on start page

deviceInfo = String.Format("<DeviceInfo><OutputFormat>{0}</OutputFormat><StartPage>{1}</StartPage></DeviceInfo>", "emf", pageIndex + 1)

pages(pageIndex) = rs.Render(format, deviceInfo, extension, encoding, mimeType, warnings, streamIDs)

pageIndex += 1

Loop

Catch ex As SoapException

'Console.WriteLine(ex.Detail.InnerXml)

Catch ex As Exception

'Console.WriteLine(ex.Message)

Finally

'Console.WriteLine("Number of pages: {0}", pages.Length)

End Try

Return pages

End Function

Public Function PrintReport(ByVal printerName As String, ByVal ReportName As String, Optional ByVal NumCopies As Integer = 0) As Boolean

Me.RenderedReport = Me.RenderReport(ReportName)

Try

' Wait for the report to completely render.

If m_numberOfPages < 1 Then

Return False

End If

Dim printerSettings As PrinterSettings = New PrinterSettings()

printerSettings.MaximumPage = m_numberOfPages

printerSettings.MinimumPage = 1

printerSettings.PrintRange = PrintRange.SomePages

printerSettings.FromPage = 1

printerSettings.ToPage = m_numberOfPages

printerSettings.Copies = NumCopies

printerSettings.PrinterName = printerName

Dim pd As PrintDocument = New PrintDocument()

m_currentPrintingPage = 1

m_lastPrintingPage = m_numberOfPages

pd.PrinterSettings = printerSettings

' Print report

'Console.WriteLine("Printing report...")

AddHandler pd.PrintPage, AddressOf pd_PrintPage

pd.Print()

Catch ex As Exception

'Console.WriteLine(ex.Message)

Finally

' Clean up goes here.

End Try

Return True

End Function

Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)

ev.HasMorePages = False

If m_currentPrintingPage <= m_lastPrintingPage AndAlso MoveToPage(m_currentPrintingPage) Then

' Draw the page

ReportDrawPage(ev.Graphics)

' If the next page is less than or equal to the last page,

' print another page.

If m_currentPrintingPage <= m_lastPrintingPage Then

m_currentPrintingPage += 1

ev.HasMorePages = True

End If

End If

End Sub

' Method to draw the current emf memory stream

Private Sub ReportDrawPage(ByVal g As Graphics)

If Nothing Is m_currentPageStream OrElse 0 = m_currentPageStream.Length OrElse Nothing Is m_metafile Then

Return

End If

SyncLock Me

' Set the metafile delegate.

Dim width As Integer = m_metafile.Width

Dim height As Integer = m_metafile.Height

m_delegate = New Graphics.EnumerateMetafileProc(AddressOf MetafileCallback)

' Draw in the rectangle

Dim destPoint As Point = New Point(0, 0)

g.EnumerateMetafile(m_metafile, destPoint, m_delegate)

' Clean up

m_delegate = Nothing

End SyncLock

End Sub

Private Function MoveToPage(ByVal page As Int32) As Boolean

' Check to make sure that the current page exists in

' the array list

If Nothing Is Me.RenderedReport(m_currentPrintingPage - 1) Then

Return False

End If

' Set current page stream equal to the rendered page

m_currentPageStream = New MemoryStream(Me.RenderedReport(m_currentPrintingPage - 1))

' Set its postion to start.

m_currentPageStream.Position = 0

' Initialize the metafile

If Not Nothing Is m_metafile Then

m_metafile.Dispose()

m_metafile = Nothing

End If

' Load the metafile image for this page

m_metafile = New Metafile(CType(m_currentPageStream, Stream))

Return True

End Function

Private Function MetafileCallback(ByVal recordType As EmfPlusRecordType, ByVal flags As Integer, ByVal dataSize As Integer, ByVal data As IntPtr, ByVal callbackData As PlayRecordCallback) As Boolean

Dim dataArray As Byte() = Nothing

' Dance around unmanaged code.

If data <> IntPtr.Zero Then

' Copy the unmanaged record to a managed byte buffer

' that can be used by PlayRecord.

dataArray = New Byte(dataSize - 1) {}

Marshal.Copy(data, dataArray, 0, dataSize)

End If

' play the record.

m_metafile.PlayRecord(recordType, flags, dataSize, dataArray)

Return True

End Function

Public Property RenderedReport() As Byte()()

Get

Return m_renderedReport

End Get

Set(ByVal value As Byte()())

m_renderedReport = value

End Set

End Property



End Class

end namespace









View 27 Replies View Related

Printing Remote Ssrs Report From Report View Does Not Work

Oct 9, 2007

Hi,

It appears to work fine on my end however on my clients end, whenever they try to print a report that displays perfectly within the report viewer to their printer by selecting the printer button in the report it never ends up printing.., however if they go into printer setup and change the page range to print from all pages to just maybe one page and then select the print button it seems to print fine..

The printer seems to receive the information as the light flashes but no page kick out when all pages is selected to print..

Any help would be greatly appreciated..

View 1 Replies View Related

Export In Csv Format Directly From The Link Of The Report

Apr 5, 2007

I have a requirement to export certain data directly in csv format from the link thats in the report interface.



Though i am able to open new window report from the link by passing the needed parameter is there any way that we can directly open the excel from the link in data table in report..

View 1 Replies View Related

Rendering Subscribed Report Directly Into Outlook

Feb 27, 2008



i have a report that is on a subscription to my team members that i want to be rendered in the actual email that they open up. i do not want them to have to click on the pdf or excel attachment to open it up, i just want the content of the report to be in the email itself in outlook.

is this possible in SSRS 05?

View 3 Replies View Related

URL Access Directly To Subscription Page Of A Perticular Report.

Dec 18, 2007



Hi,

I have a .net application in this application I want to call directly subscription page of a perticular Report through URL.
And i want to hide the header section too.Is it possible
If not how can i provide this feature of subscription in my application

Regards

View 1 Replies View Related

How To Use The Render Method To Save A Report Directly To Disk ?

May 2, 2007

Hi there,



Is there a way to programmatically save a RS results into Excel format using the render method ?

I had read about that capability but I can't seem to find any sample code on how to do it. Is this a parameter that you have to set in the render method ?

Any suggestion or tips are much appreciated !

Thanks !

View 5 Replies View Related

Report Viewer Is Printing A Cached Report

Mar 6, 2007

Hi All

I have a reporting viewer in a windows form that behaves very strange. When I open the form and run the report it shows up nicely in the report viewer. If I print the report it only prints one page. When i print the report a second time the whole report is printed. Next I'll change the report parameters and run the report, then it shows up nicely in the viewer, but when I print the report the first report is printed.

Does anyone know what to do with this problem?

Thanks in advance

View 9 Replies View Related

Automatic Extract Data From Database, Then Generate A Report &&amp; Print It Directly

May 7, 2008

hi lads,


what i need to do for my project are as following:

a mobile user send data via GPRS to SQL server Database. then i need to have a method to detect while a particular table is being inserted. and then extract data from table construct a report dynamiclly. what should i do to achieve this goal? e.g. window application, store procedure or trigger ?

PS : client side is a mobile application developed using MCL. i don't in which way he will send all data to SQL server Database, so what i need to do is to monitor new data inserting.



2) how to auto generate and print report directly after record been inserted into the table ? Do i need to import report web service API ? if yes, which one? or i can use other methods e.g. predefine report control view in my window application, turn off pop-up menu while printing a report(I guess)

thanks

View 2 Replies View Related

Generating A Pdf Report From Reporting Services Directly From Sql Server Stored Procedure

Dec 12, 2007

Hi

I was wondering if it was possible to call reporting server web service directly from my sql server stored procedure. The call that I need to make to reporting web service needs to generate the report in a PDF format.

View 1 Replies View Related

ReportViewer Not Correctly Rendering Report

Aug 20, 2007

Hi,

I have a report viewer control within a web user control which i am using to display the report. The report has been designed within a Visual Studio Report Server project and it looks fine when previewed here but when i deploy the report to the reporting server the table rows within my report become stretched and there are other formatting issues, the formatting issues occur when the report is viewed from both reporting services server and my webpage. When the report is exported to a pdf from my website it looks fine why is the report not rendering correctly.

Has anyone else had this issue?

NOTE: I am using IE7

View 3 Replies View Related

Probleam With ReportViewer Jumping To Report

Jan 10, 2007

Hi,

We have an ASP.NET application using a ReportViewer to show reports. I have two reports (both with logo - image - in yours headers):

- Report A: with action to jump to Report B.

- Report B: with action to jump to Report A.

This work fine into BID and into Report Manager, but into our application, when I click in first link into Report A, show me the Report B, but our logo isn't visible. If I try to return to Report B (clicking in action), show me this error:

The path of the item "(null)" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath)

May I need to configure something into my web.config to work fine too?

Thanks.

View 14 Replies View Related

Fields Of Form In The ReportViewer Report

Jun 19, 2007

Hi,



I have a report (rdlc) in my WinForm project that the data are filtered in accordance with two dates: Initial and End. These two dates, the user inform in a Form of the project. Well, what I need I am to inform in the report these two dates. How that I make to pass these two dates of form for the report?



Thank you!

View 4 Replies View Related

Change Query Of Report In Reportviewer

May 8, 2007

Hi,



I have a reporting services report that i show in an asp.net page by a reportviewer control.

Is there a property that i can set in my asp.net page, to change the query for changing the data in my report.

The number and names of the columns will be the same.



I should work with parameters, but the query changes more than just a few where-clauses. So i think working with parameters looks impossible.





Thanks,

Dennis











View 3 Replies View Related

Report Printing Issue

Apr 5, 2007

Hi,
I am having problems printing a new table we added to an existing report. When I preview the report in Visual Studio everything looks good. But when I click the print layout view button the "header" portion of the report shows on one page and the detail shows up on another. Has anyone seen this happen before?

Thanks,
Jon Edwards

View 2 Replies View Related

Printing Report In One Page

Sep 26, 2007

hello there,

i have created a report now i want to have the report print on one page instead of two pages which is doing now.how can i do that.i am using SSRS 2005.
please help

cheers
zolf

View 1 Replies View Related

#Error When Printing Report

Feb 3, 2007

I have a field on a Group Footer which is a Sum field based of an IIF statement.

Here it is.

=Sum(IIF(Fields!EXPR1.Value=2 and Fields!Type.Value=1,Fields!Quantity.Value,0))

If I do not use the AND, by by only checking on one field it works fine and it returns a result, however if I use the AND Operator I get the #Error when previewing the report.

Does anyone have any idea why this is happening. Any suggestion would help/


THanks

View 3 Replies View Related

Printing Report In One Page

Sep 26, 2007

hello there,

i have created a report now i want to have the report print on one page instead of two pages which is doing now.how can i do that.i am using SSRS 2005.
please help

cheers
zolf

View 3 Replies View Related

Printing Report.... Issue

Jan 15, 2008

Hi,

I have developed report(SSRS 2005) using Matrix control and Chart, on web in works good, but when user prints the report
it cuts matrix and prints it on separate pages.

my requirement is to print every thing in a single page, no matter how much data i has.
i tried landscape print (by changing width 11 and height to 8.5) but no result,
does any one know the solution....?

thank you...

View 8 Replies View Related

Processing A New Report Before Printing

Sep 12, 2007

I am running SSRS 2005, rendering reports locally using a report viewer. Rather than direct the viewer to an .rdlc file, I use an XMLDocument. A few of my reports have a large image in the background that needs to be invisible when the report prints. This was straightforward - I just use a report parameter and set the visible state of the image to the value of the parameter. The hard part is getting the report to print without an error.

Initially, I render the report with the following code:

Private Sub ShowReport()

Try

With Me.ReportViewer1
.Reset()
.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
.LocalReport.LoadReportDefinition(New System.IO.StringReader(_Doc.OuterXml))
.LocalReport.DataSources.Add(_Item1)
.LocalReport.DataSources.Add(_Item2)
.LocalReport.SetParameters(_Param)

.RefreshReport()

End With

Catch ex As Exception
MsgBox(ex.ToString)
End Try

End Sub
This code works fine. I have hidden the print button on the report viewer, and to print, the user must press my button which runs the following code.
Private Sub PrintReport()

Try
_Param(0) = New Microsoft.Reporting.WinForms.ReportParameter("ImageVisible", "False")
ShowReport()

ReportViewer1.PrintDialog()

Catch ex As Exception
MsgBox(ex.ToString)
End Try

End Sub
Resetting the parameter and re-displaying the report works fine on its own. The PrintDialog method works fine on its own. When combined in the same Sub like this, I get the following error:
"Operation is not valid due to the current state of the object".
Does anyone know how I could get it to print without an error? I would be very grateful for any help.

View 1 Replies View Related

Problem When Printing Report From IIS

May 16, 2007

Hi,

I am rendering the report from remote server and I am displaying it. when I try to print the report from my application it is printin properly. but when I try to print it from IIS it is showing an error message that "No printers are Installed ". I did not specify any printer name in my application. How can I resolve this problem.



Thanks

rahul

View 1 Replies View Related

Printing Graph Report

Feb 28, 2007

Hello

I have a report with pie and bar graphs, I have the paper size 16.54 x 11.69 for landsacpe, there are twelve graphs ,two placed side by side , and in the report manager, the appearence is perfect ,spread over six pages. I have Pagebreakatend True for all the graphs. The problem is with printing, on printing , the are tottaly misaligned,any tips are welcome



Thanks

Inder

View 4 Replies View Related

Open Reporting Services Report Using ReportViewer

Aug 27, 2007

I tried to open a SQL Server 2005 Reporting Service report in ASP.Net 2.0 using ReportViewer. The following is my code.


Dim param(2) As Microsoft.Reporting.WebForms.ReportParameter
param(0) = New Microsoft.Reporting.WebForms.ReportParameter("ProjectID", Me.cboProject.SelectedValue)
param(1) = New Microsoft.Reporting.WebForms.ReportParameter("RunBy", Session("strEmployeeName"))
Me.ReportViewer1.ServerReport.SetParameters(param)

Me.ReportViewer1.ServerReport.ReportServerCredentials = New _
clsReportServerCredential(System.Configuration.ConfigurationManager.AppSettings("strReportViewUser"), _
System.Configuration.ConfigurationManager.AppSettings("strReportViewPassword")

Me.ReportViewer1.ServerReport.ReportServerUrl = New Uri(http://SQL2005/ReportServer/)
Me.ReportViewer1.ServerReport.ReportPath = "/nsPortalReports/rptIssuesByRole"
Me.ReportViewer1.ServerReport.Refresh()


I need help with passing multiple parameters. I got an erron on the second parameter (parm(1)). The error was

"Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(name As String, values() As String)': Argument matching parameter 'values' narrows from 'Object' to '1-dimensional array of String'.
'Public sub New(name As String, value As String)': Argument matching parameter 'value' narrow from 'Object' to 'String' "


How can I pass the parameters?

Thanks.
DanYeung

View 3 Replies View Related

Help! Jump To Report: Error With Web Reportviewer Control

Jan 14, 2008

Hello everyone,
I have a report that has a "Jump to report:" link in it and in the report it jumps to there is another "Jump to report:" link. When I click on this link I get the following error.

The path of the item '(null)' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath)


I have tried moving the link from the header to the body of the report with the same results.

This is only happening in the web reportviewer control as our windows app works flawlessly.

We are running SQL SERVER 2005 SP2.


Does anyone have a fix, workaround or idea how to resolve this issue?

Thanks in advance

-JW

View 13 Replies View Related

ReportViewer Does Not Show Report In Aspx Page

Jul 13, 2007

I created a report with a parameter. The parameter was created using a dataset in the report designer. This works fine. I deployed the report (webhost4life) and the report runs fine in the report manager. I am able to select my casenumber click on the default view report button and it works.

Problem: I embedd the report into an aspx page frmReports1.aspx. I call this page from another page (form). the frmReports.aspx page comes up and displays the default drop down list box with the casenumbers (fine). I select the casenumber and click on the view report button and NOTHING. I here the postbacks taking place but all that happens is the default value appears in the drop down list box and the toolbar shows. I checked permissions and everything is fine. I searched the forum and thought i found the solution with the inLine HTML and Async (still nothing) I can only think that something is not going right with the parameter. Here is my html, and code behind code. any help would be greatly apprcieated.



Zachary



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frmReports1.aspx.vb" Inherits="frmReports1" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>



<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>





<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

<style>html,body,form {height:100%}</style>

</head>

<body>

<form id="form1" runat="server">

<div>

<rsweb:ReportViewer ID="rvTest" runat="server" Width="600px" ProcessingMode="Remote" AsyncRendering="false" Height="75%" >

<ServerReport

DisplayName="Billable Hours"

ReportPath="/sddmtech/SnowandIce/rptHoursWorked"

ReportServerUrl="http://sqlreport01.mysite4now.com/Reportserver" />

</rsweb:ReportViewer>

&nbsp;



</div>

</form>

</body>

</html>



aspx code behind

Imports System.Net

Imports System.Security.Principal

Imports Microsoft.Reporting.WebForms

Partial Class frmReports1

Inherits System.Web.UI.Page

Protected Sub rvTest_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles rvTest.Init

End Sub

<Serializable()> _

Public NotInheritable Class MyReportServerCredentials

Implements IReportServerCredentials



Public ReadOnly Property ImpersonationUser() As WindowsIdentity _

Implements IReportServerCredentials.ImpersonationUser

Get

Return Nothing

End Get

End Property

Public ReadOnly Property NetworkCredentials() As ICredentials _

Implements IReportServerCredentials.NetworkCredentials

Get

' Put your login and password here this works fine

Dim userName As String = ""

Dim password As String = ""

Dim domain As String = ""

Return New NetworkCredential(userName, password, domain)

'********************************************************************************

End Get

End Property

Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie, ByRef userName As String, ByRef password As String, ByRef authority As String) As Boolean Implements Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentials

End Function

End Class

Public Function GetFormsCredentials(ByRef authCookie As Cookie, _

ByRef userName As String, _

ByRef password As String, _

ByRef authority As String) _

As Boolean

authCookie = Nothing

userName = Nothing

password = Nothing

authority = Nothing

'Not using form credentials

Return False

End Function



Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()

'rvTest.ServerReport.Refresh()

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

rvTest.ServerReport.ReportServerCredentials = New MyReportServerCredentials()

End Sub

End Class

View 6 Replies View Related

Local Report - How To Display Parameter In ReportViewer

Mar 6, 2008



Hi All,
I have configured the ReportParameter as following, but it is not visible on RunTime ? Any idea why ?



LocalReport oLocalReport = ReportViewer.LocalReport;

List<ReportParameter> oParmList = new List<ReportParameter>();

String sResidentID = "";

sResidentID = "RES100";

ReportParameter oReportParameter = new ReportParameter("ResidentID",sResidentID, true);

oParmList.Add(oReportParameter);

oLocalReport.SetParameters(oParmList);

Appreciate any help,

View 1 Replies View Related

Printing A Linked Report In Landscape

Aug 30, 2006

I have a report that is setup to print landscape.

I deploy to Report Manager, print it, and everything works great.

If I create a linked report from the deployed report, the linked report prints portrait.

Does anyone know of a workaround or am I just doing something wrong?

Thanks!!

BobP

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved