printing rdlc reports programmatically

Hi,

I need to print a series of reports programmatically from a windows forms 
application using vb.net 2008.

I attempted the walthrough "Printing a Local Report without Preview" 
(http://msdn.microsoft.com/en-us/library/ms252091.aspx)  but was 
unsuccessful.

I get the error: "A generic error occurred in GDI+."

 I added a call to the Print procedure to the Run procedure, on the line 
after Export (report), but I get an error: "A generic error occurred in 
GDI+."   This error occurs on the PrintPage event handler, on the line: "Dim 
PageImage as new metafile(..."

I am admin on this computer.

Does anybody know how to fix this?
Thanks
Bill


0
BillE
3/11/2010 3:37:42 PM
dotnet.languages.vb 830 articles. 0 followers. Follow

2 Replies
4007 Views

Similar Articles

[PageSpeed] 5

Seems the stream is not correct. Or you perhaps forgot to reset the position 
to 0 ?

--
Patrice

"BillE" <belgie@datamti.com> a �crit dans le message de groupe de discussion 
: eJGoLDTwKHA.3408@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I need to print a series of reports programmatically from a windows forms 
> application using vb.net 2008.
>
> I attempted the walthrough "Printing a Local Report without Preview" 
> (http://msdn.microsoft.com/en-us/library/ms252091.aspx)  but was 
> unsuccessful.
>
> I get the error: "A generic error occurred in GDI+."
>
> I added a call to the Print procedure to the Run procedure, on the line 
> after Export (report), but I get an error: "A generic error occurred in 
> GDI+."   This error occurs on the PrintPage event handler, on the line: 
> "Dim PageImage as new metafile(..."
>
> I am admin on this computer.
>
> Does anybody know how to fix this?
> Thanks
> Bill
>
> 

0
Patrice
3/11/2010 5:50:46 PM
Merci beaucoup



"Patrice" <http://www.chez.com/scribe/> wrote in message 
news:O9CbiNUwKHA.5812@TK2MSFTNGP02.phx.gbl...
> Seems the stream is not correct. Or you perhaps forgot to reset the 
> position to 0 ?
>
> --
> Patrice
>
> "BillE" <belgie@datamti.com> a �crit dans le message de groupe de 
> discussion : eJGoLDTwKHA.3408@TK2MSFTNGP06.phx.gbl...
>> Hi,
>>
>> I need to print a series of reports programmatically from a windows forms 
>> application using vb.net 2008.
>>
>> I attempted the walthrough "Printing a Local Report without Preview" 
>> (http://msdn.microsoft.com/en-us/library/ms252091.aspx)  but was 
>> unsuccessful.
>>
>> I get the error: "A generic error occurred in GDI+."
>>
>> I added a call to the Print procedure to the Run procedure, on the line 
>> after Export (report), but I get an error: "A generic error occurred in 
>> GDI+."   This error occurs on the PrintPage event handler, on the line: 
>> "Dim PageImage as new metafile(..."
>>
>> I am admin on this computer.
>>
>> Does anybody know how to fix this?
>> Thanks
>> Bill
>>
>>
> 


0
BillE
3/11/2010 6:54:26 PM
Reply:

Similar Artilces:

custom size too large to print, can't remove extra blank space
Scanned framed text was added to Word which forced page to custom size. After I formatted text there is a considerable amount of blank space I can't remove. There is NOTHING in the space as I have selected view all formatting marks and nothing is there, yet I can't remove. The spacing "resizer" at the top of page does not affect it either. Any suggestions?? Perhaps the text was scanned as a picture? If so, you will need OCR to render it editable. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org &qu...

Every Day Total Report Print Schedule
Hi again ... Can anyone help me in case I need my dayly sales reports to be printed every day automaticaly for example at 11.00 pm ? Is there any rule in RMS or other tool to do that ? -- Best Regards Ashot Bayatyan Hi Ashot What version of SQL are you using? This can be done with SQL reporting Services, and it can be done using this. Very easily Stephen Zwarts IMMIX Solutions "Ashot" <abayatian@yahoo.com> wrote in message news:C65CBD1F-EAC9-492E-9B38-87615ED456D1@microsoft.com... > Hi again ... > Can anyone help me in case I need my dayly sales reports to be ...

Print preview in Publisher 2003 changes doc from landscape to portrait
A friend of mine is attempting to print out an 11x17 double-sided flyer in landscape mode on her XP Pro system. The 2-year-old template she uses prints correctly in landscape form, but if she changes the text and attempts to print or do a print preview, the orientation of the page immediately changes to portrait and will print out in that form. The fact that the original Publisher 2003 versions printed correctly but the newly edit version does not sounds like there is a page formatting problem occurring, but regrettably I'm not a publisher expert. Anyone have any insights what mi...

Modifying Report Filter
How do I modify the report filter such that I can include a user defined field from the Customer Field of the Configuration GUI? I would like to be able to generate reports by filtering on a Numeric Field. Any assistance in this matter would be deeply appreciated. Eric, If you want to use Crystal Reports under the Utilities menu select the Customer.def "Eric Fiore" <EricFiore@discussions.microsoft.com> wrote in message news:11AA6EEE-9046-4B0C-82F2-CC491D1142FC@microsoft.com... > How do I modify the report filter such that I can include a user defined > field from the...

Kerberos Double Hop problem for viewing reports
I'm assuming I'm having a double hop problem. I can log into crm, I can log into reporting services, I CANNOT log into crm and click on reports without getting a 401.1 unauthorized error. I downloaded and ran the CRMDiagnosticsTool for detecting double hop issues to help troubleshoot...I pasted the output below(I scrubbed my org name out of it sub-ing in generic dept.ad.campus) I have a CRM Server, a 2005 Reporting Server(uses the remote db box as well), a SQL 2005 box(hosts both CRM and RS dbs) all on separate boxes. I tried to follow the article "Addition Setup Tasks wh...

Network Printing Problem IE7 and Vista
When trying to print a web page, like www.hp.com to a network printer from Internet Explorer 7 on Vista SP2 32-bit, a windows pops up titled Internet Explorer Script Error and it won't print. The error window details are as follows: Line: 1839 Char: 1 Error: Unspecified error. Code: 0 URL: res://ieframe.dll/preview.dlg Also if I try to print this same web page from IE8 on Windows 7 32-bit, a script error window pops up and it also won't print. The details of it's error message are as follows: Line: 2042 Char: 1 Error: Unspecified error. Code: 0 URL: res...

Probl�me to start reporting with CRM 3.0
Hello We have the CRM 3.0. In fact I made a report with visual studio 2005 with SQL Server 2005. The report has a hidden parameter. When I The visualized with visual studio, it works well. But when I includes the Level of CRM and try to start my error: "Reporting Services Error" "For more information about this error navigate to the report on the server Local server machine, or enable remote errors " "SQL Server Reporting Services Think you for your assistance Are you using a shared data source in your report? If you run the report directly from the CRM server, it...

Rules based attachment printing
Is there any way we can specify to print the attchments also with the email while setting up a rule for autoprint? ...

Group Objects on a Report
Hello, Is there a way to group objects (fields, lines, boxes, etc.) so it is simplier to code visibility and movement? Currently I have a report with many subreports within it that are visible/invisible depending on the circumstance. Although this works, there are times when the spacing does become and issue since you have to leave some gap between each subreport no matter how horizontally narrow you make them. It would be nice if I could group together all objects in a particular section, make them visible/invisible simulataneously and the move them up the page when other sections are...

Programmatically convert lead to account
Hi, How do I programmatically convert a lead to an account? Thanks! In the SDK search on SetStateLead. This will at least allow you to set the state to qualified however I do not think it will create an account and contact so you will need to write code to create these records from your lead data. You can then use these classes to relate your lead to a contact and account TargetRelatedLeadToAccount TargetRelatedLeadToContact ============================== John O'Donnell Microsoft CRM MVP http://www.crowechizek.com/microsoft "Jeff Foster" <JeffFoster@discussions.mic...

Report Manager access: localhost vs 127.0.0.1
Hi, What is the difference between accessing Report Manager via localhost and 127.0.0.1? a) http://localhost/Reports_MyInstance b) http://127.0.0.1/Reports_MyInstance I have installed SQL Server 2008 Express with Advanced Services on Windows 7. After installation I tried to access Report Manager using the urls as specified by a and b. In case a, the Report Manager interface loaded showing a Contents and Properties tab. In case b, first a dialog box popped up asking for credentials. I entered the credentials for the current user that was logged on. Then the Report Manager lo...

Printing Headers #2
How do I print the headers of each column at the top w/o printing the row numbers on the left hand side and the ABCs at the top? I take it you want to print your headings, such as maybe Date, Qty, Price etc. If this is the case, click on File|Page Setup and then on Sheet. You can select the row or rows you want to repat on each page. "jrobinp@hotmail.com" wrote: > How do I print the headers of each column at the top w/o printing the row > numbers on the left hand side and the ABCs at the top? File>Page Setup>Sheet. Uncheck "row and column headings" and ...

print button greyed in OE
The print button is greyed in Outlook Express. How do I enable it. I do have a printer and it is default Mike Triber <anonymous@discussions.microsoft.com> wrote: > The print button is greyed in Outlook Express. How do I > enable it. I do have a printer and it is default Ask in an Outlook Express newsgroup. -- Brian Tillman ...

Office 10.1.5 update won't print
Since installing the 10.1.5 update, no MS Office doc will print via EtherNet to the school printer. Appleworks, Safari, etc, still work, but Office Docs seem to hang - they won't even go through to the print center app. Any ideas. In article <45e39df.0309081621.10c1b9aa@posting.google.com>, pdavies@cobweb.com.au (Paul Davies) wrote: > Since installing the 10.1.5 update, no MS Office doc will print via > EtherNet to the school printer. Appleworks, Safari, etc, still work, > but Office Docs seem to hang - they won't even go through to the print > center app. > &...

Excel: Can't save changes to print number of copies setting
I inherited an Excel workbook that has the number of copies to print set to 10. I change it to 1, then save the file, but it always reverts back to ten. ...

By Passing Reports with no data
I have a series of query driven reports that are run from the on click command of a button on a form. These reports are not opened or printed but saved in a folder on a network share. Once the reports have been created an email is send to specific people letting them know that new reports have been created. Below is the code I am using so far. This code works fine other than it creates a blank report if there's no data to be displayed. I am looking for a way to run the reports but ONLY save reports if they actually have data. ==CODE ============================= Private Sub Command38_...

Making height of box in report dependent of content
Hi all, There are a few memo fields in my report, with variable amounts of possible content. How can I make the height of the box dependent of the content inside it? I already tried to figure out the information on http://www.mvps.org/access/reports/rpt0010.htm, but it was quite complicated. Is there an easier way to solve my problem? I hope someone is willing and able to help me; it would make me very happy. Bye! Sietske -- Set the can grow property of the controls for the memo fields to YES -- Set the can grow property of the section containing those controls to YES -- Make sure...

Create a PDF file from any program that will print
Anyone can create a PDF file from any program that will print. You define any (virtual) Post Script (PS) printer on your system. I have an Apple and an IBM PS printers defined. You print to a file, obviously, since you don't really need to have an attached PS printer. The file type will be .prn on Win machines. Next you go to www.ps2pdf.com and use the Convert wizard which will upload your file and send it back as a PDF file. The site doesn't save uploaded files so it is relatively secure and has been providing this service for quite some time. Lastly, you simply save the PDF fil...

Print Preview...where is it?
In Excel, if I click File I get a drop down list..one of the items then listed was "Print Preview". That's not now shown. Where could it have gone? How to get it back? Thanks. Try: Tools|customize|toolbars tab select the worksheet menu bar and click reset. This will remove any customized changes you've made to that toolbar (if you've made changes). peejaa wrote: > > In Excel, if I click File I get a drop down list..one of the items then > listed was "Print Preview". > That's not now shown. Where could it have gone? How to get it back? &g...

Reports dictionary problem
Have a workstation that gets a message the the reports.dic is out of date and needs to be updated using Utilities. The workstation is pointing to the exact dictionary (via dynamics.set) that all others are pointing to and no other workstation has this message. When we turn on her security to see amended reports, she gets an error message and can not print any report. When we turn it off, she gets the reports.dic message when she boots and then things are fine. Any ideas or pointers to any tech #'s? Thanks Is the workstation in question on the same level of service packs as the oth...

printing final saved docs
I have invoices saved marked as final , and when I try to print with original date created, it changes date to the day it is opened...? Don't use NOW() or Today() fields, as they update to current time. amandarox wrote: > I have invoices saved marked as final , and when I try to print with original > date created, it changes date to the day it is opened...? Hi amandarox, Assuming your invoices are Word files, select the 'date' and press Shift-F9. This will expose the field code, which will look something like { DATE }. Simply change 'DATE' to '...

CRM crystal report error
I installed CRM server on machine and Database server on another machine, CRM Server machine hard disk was crashed so i reinstalled it on another machine. but now when i run the report i got the following error. Any idea if i need to install any thing extra???? In the same time, if i upgrade CRM 1.2 to CRM 3.0 beta version, will that work???? CrystalReportViewer File frs://Input/a_170/000/000/170/3bc3b75dad749f6.rpt not found on File Repository Server. File frs://Input/a_170/000/000/170/3bc3b75dad749f6.rpt not found on File Reposi...

Crystal Reports 9 Enhanced Edition Install Failure
I downloaded all CRM CD's from MSDN and installed it, with the MSDN_Subscriber license. Then I started the installation of CR9 Enhanced Edition from the seperate CD called int_crm_1.2_crystal_reports_enhancement.iso. The installation failed with a message that I first must install 9.2.2 instead of 9.2.0 What do I have to do to install the CR Enhanced edition? Tnx, Erik Problem solved after the installation of CR prof 9.2.2 "Erik" <none> wrote in message news:OcVlEKhoEHA.3592@TK2MSFTNGP14.phx.gbl... > > I downloaded all CRM CD's from MSDN and installed ...

Report chart based on parameter query
Hi I have a query (qry_CourseEvalutaionByTeam) that shows ratings (1-10) that training courses have been given by different teams. I have a form frm_CourseList that has a combo box that lets me choose the course that i want to see the rating for by team, this combo box is the parameter for the query. The query works fine. What i'm trying to do is have a very basic bar chart in a report that shows the course along the bottom and x bars for the teams showing the rating. But when i create a chart using the wizard and run a command button from the form to open the report i get the mes...

SRS Reports
We were certainly hoping that executives could access the reports on the SRS server without having to have a license to CRM. What we are discovering is that a user has to have a license just to view the reports. Is that the case? I can't justify spending $1000 a user just so they can view the reports of the data within the system. You have a couple of options here. Since the reports in CRM uses the impersonated user they will need to be users in CRM. 1. Develop custom reports using a proxy CRM user. 2. You can create the same report in SRS but using a different data source....