473,395 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to export a report with parameters to PDF?

In a nutshell, when I click the PDF export button, from the print preview screen, I am prompted to enter the parameters again.

I assume I have skipped a step somewhere that saves the parameter data. OR, I should not be closing the form that collects the parameters until after the export is done.

Long version (in case these details matter):
I created a form to collect the parameters. End user inputs start/end dates into text boxes, then selects a category from the drop down menu.

Command boxes allow the user to pull a report, pull a graph, or close the form. These are driven by the "On Click" event and simply opens the report in preview, then closes the form that collected the parameters.

Report and Graph both display on the screen correctly. However, if I try to export to PDF, I get the parameter prompts again, plus, it doesn't display the parameters on the report/graph the way it does on the screen.

Any help is appreciated.
Nov 19 '10 #1
2 5317
Update: Removing the close form part of the code, from the "On Click" event works like a charm.

Out of curiosity though, is there any way to preserve both functions? While having the form close automatically isn't critical, it sure is handy.
Nov 19 '10 #2
dsatino
393 256MB
I've never actually 'exported' to a pdf, but if that's the correct terminology for what you're doing then then issue is probably because a report is basically painted picture and you can't really 'export' that picture to a pdf so Access requeries the results. Since you've closed the form, your parameters are no longer available which is why it asks again.

That said, you may want to 'Print' your report to PDF. I do that all the time and never get re-prompted for any parameters. PDF is basically a digital printer.

Alternately, you could create Public date variables that capture the inputs, create public date funtions that return these values and set your parameters to these funtions. These variables will persist after the form is closed, so even if the PDF export/print requires them, they won't need to be re-entered.
Nov 23 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hideyuki | last post by:
Hi, I am using asp.net, and I am having a problem exporting datagrid to excel. One column contains numbers such as 123456875468. When this goes to excel, it is displayed as 1.23456E + 11 which I...
0
by: naveen | last post by:
I am facing problem to export crystal report to PDF which contains some item's images. All images change with first item image. the application developed in Visual Basic 6.0 and MS access. The...
8
by: Mark Flippin | last post by:
This is for a reporting problem using: Access 2000 SQL Server 2000 Both at SP3 I've a stored procedure in SQL Server 2000 which builds a result set from a disparate set of tables, utilizing...
5
by: mik18 | last post by:
I'm having trouble with exporting reports to Word in the rtf format and I'm hoping someone has a solution. The reports are losing their formats. Not all the formating is lost but some is and of...
2
by: Chris | last post by:
Hi, I'm new to ASP.Net and Crystal but I've been playing with some samples and have run into a problem. If I put all my code into the Page_Init sub of a single form and run that form, the...
6
by: jpatchak | last post by:
Hi, I have kind of a strange problem. I have a report that I need to export to excel. The report opens fine in Access and when I export it or click on "Analyze It with Microsoft Office Excel," I...
3
by: jennwilson | last post by:
Access 2000 - I have developed a database that houses patient information. The patient information must be sent in an excel file to another company department. I know how to export my data to Excel...
9
by: QCLee | last post by:
Sir can you help me to transfer my Access Query to MS excel? i have a command button on the form to export the parameter query named "HVACWindwardQuery" to excel spreadsheet and i got the codes...
11
patjones
by: patjones | last post by:
Hi, It feels strange to be the one doing the asking after so much answering, but this one is driving me crazy. I have a simple database with a table, a form, and a report based on the table....
1
by: liimra | last post by:
I have created reports with calculated fields & added three buttons on each report (export to excel, rtf, pdf, html). Everything seemed to work very fine but unfortunately I am facing very weird...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.