Hi all,
This is actually not an issue of mine, but one a friend of mine told me about
that I was able to confirm.
Let's say you want a highly customizable report, so you want to be able to do
things like specify the ControlSource properties of TextBox controls on the
report when it is run. The only time this works is in the Open event handler,
but that works great. So, no problem, right?
Now, say the report is called rptFoo, and you want to open multiple instances
of the report for preview, so now, instead of using DoCmd.OpenRepor t, you use
something like Set mrptKeepOpen1 = New Report_rptFoo. This looks like it
should work, but now the code in the report Open event handler says "You can't
set the Control Source property in print preview or after printing has
started."
As a possible work-around, I tried making a master report that embeds the
custom report as a sub-report, and opening that using the New keyword, but the
same error appears.
Does anyone know any work-arounds? 4 2006
Steve, there are many problems with trying to implement multiple instances
of reports.
Is it possible that the Open event is firing twice, and that the timing
problem is with the 2nd occurance? Haven't tested: just a possibility.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Steve Jorgensen" <no****@nospam. nospam> wrote in message
news:cu******** *************** *********@4ax.c om... Hi all,
This is actually not an issue of mine, but one a friend of mine told me
about that I was able to confirm.
Let's say you want a highly customizable report, so you want to be able to
do things like specify the ControlSource properties of TextBox controls on
the report when it is run. The only time this works is in the Open event
handler, but that works great. So, no problem, right?
Now, say the report is called rptFoo, and you want to open multiple
instances of the report for preview, so now, instead of using DoCmd.OpenRepor t, you
use something like Set mrptKeepOpen1 = New Report_rptFoo. This looks like it should work, but now the code in the report Open event handler says "You
can't set the Control Source property in print preview or after printing has started."
As a possible work-around, I tried making a master report that embeds the custom report as a sub-report, and opening that using the New keyword, but
the same error appears.
Does anyone know any work-arounds?
Steve Jorgensen <no****@nospam. nospam> wrote in
news:cu******** *************** *********@4ax.c om: Hi all,
This is actually not an issue of mine, but one a friend of mine told me about that I was able to confirm.
Let's say you want a highly customizable report, so you want to be able to do things like specify the ControlSource properties of TextBox controls on the report when it is run. The only time this works is in the Open event handler, but that works great. So, no problem, right?
Now, say the report is called rptFoo, and you want to open multiple instances of the report for preview, so now, instead of using DoCmd.OpenRepor t, you use something like Set mrptKeepOpen1 = New Report_rptFoo. This looks like it should work, but now the code in the report Open event handler says "You can't set the Control Source property in print preview or after printing has started."
As a possible work-around, I tried making a master report that embeds the custom report as a sub-report, and opening that using the New keyword, but the same error appears.
Does anyone know any work-arounds?
I've encountered this myself in the past.
The only workaround I found was to use a separate object variable
for each instance.
Perhaps you could do this with an array of type Report so you
wouldn't have to hard-code the number of openable reports?
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
On Mon, 02 Feb 2004 16:59:53 GMT, "David W. Fenton"
<dX********@bwa y.net.invalid> wrote: Steve Jorgensen <no****@nospam. nospam> wrote in news:cu******* *************** **********@4ax. com:
Hi all,
This is actually not an issue of mine, but one a friend of mine told me about that I was able to confirm.
Let's say you want a highly customizable report, so you want to be able to do things like specify the ControlSource properties of TextBox controls on the report when it is run. The only time this works is in the Open event handler, but that works great. So, no problem, right?
Now, say the report is called rptFoo, and you want to open multiple instances of the report for preview, so now, instead of using DoCmd.OpenRepor t, you use something like Set mrptKeepOpen1 = New Report_rptFoo. This looks like it should work, but now the code in the report Open event handler says "You can't set the Control Source property in print preview or after printing has started."
As a possible work-around, I tried making a master report that embeds the custom report as a sub-report, and opening that using the New keyword, but the same error appears.
Does anyone know any work-arounds?
I've encountered this myself in the past.
The only workaround I found was to use a separate object variable for each instance.
Perhaps you could do this with an array of type Report so you wouldn't have to hard-code the number of openable reports?
No, that's not the problem. I just used the single variable as an example for
brevity. The problem occurs the first time we try to create the first
instance of the report using New. How many instances, and where each
instances is stored seem to have no effect on the error.
On Mon, 2 Feb 2004 14:40:19 +0800, "Allen Browne" <Al*********@Se eSig.Invalid>
wrote: Steve, there are many problems with trying to implement multiple instances of reports.
Is it possible that the Open event is firing twice, and that the timing problem is with the 2nd occurance? Haven't tested: just a possibility.
I checked that just now, and Open only fires once, so that's not it. I would
try using Initialize instead of Open, but report modules don't have that event
type. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike |
last post by:
Looking to find any information on how to properly configure multiple
instances of DB2. This is on Win2k db2 ver 7.2. I am basically looking
for information on how the multiple instance settings should
configured to work, how memory is shared or not, etc. I can not seem
to find any good links to this information.
Thanks,
Mike
|
by: (Pete Cresswell) |
last post by:
I know I can open many instances of a given form, but I've never done it.
Now I'm analyzing an application where that seems like just the ticket: Many
investment funds, *lots* of data points for each fund, and a desire by the users
to see several funds presented side-by-side.
Is opening, say, five instances of the same form real-world-doable?
--
PeteCresswell
|
by: Johan |
last post by:
If a user happens to open multiple instances of her frontend, what kind of
problems can occur?
For example, one user reported that she was able to, once or twice, bypass
the evaluation procedures that check a new record before it's allowed into
the database. She said that this happened on a day when her computer
behaved strangely in general. We have not been able to repeat/reconstruct
the error, and I wonder if the explanation can be...
|
by: NickName |
last post by:
Say, I have a report called saleRpt in Access 97, naturally it has a
header and body (some query), then, it has a footer like
Sum(saleTotal) -- saleTotal has been referenced in the body query.
Now, how do I get the content of the rept footer for this rept
programmatically? I understand the Reports collection has a property
called PageFooter, but that's not what I'm after. Shed some light,
Access guru?
TIA.
|
by: Shuaib |
last post by:
I wonder if anybody could shed some light on a problem I am
encountering.
I have written a program in C that runs on Solaris 2.8. At busy times
of the day there may be multiple instances of it running (5-10), each
process taking approx. 3 seconds to complete.
Each instance of the program basically fetches data from a Oracle
database (using Remedy ARS API routines) and stores it in a user
defined structure that I have defined as a...
| |
by: GGerard |
last post by:
Hello
I have a program where the user can open as many instances of a form as the
user wants.
The only limit to how many instances can be opened is determined by the
limit of the computer itself (the amount of RAM - I think). When enough
instances of this form are opened and the limit of the computer is reached
|
by: Michel |
last post by:
Hi, I wrote an app in .Net and I whant only 1 instance of this app open for
the user; the user open my app, do some works and try to open another
instance of my app, I whant to show a message to user to inform him that only
one instance is permit and then close the second instance after that.
I am able to do this when the user run the application on his PC whit this :
Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName)
...
|
by: Olie |
last post by:
This post is realy to get some opinions on the best way of getting fast
comunication between multiple applications. I have scowered the web for
imformation on this subject and have just found conflicting views and
far from ideal solutions.
My application has to send small amounts of data about 50bytes to
multiple client applications. The catch is that this has to happen
about 1000 times a second.
My first attempt was .net remotting...
|
by: Neil |
last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message
news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com...
Question for you. I'm doing something similar, only, instead of opening the
forms all at once, I'm opening them as needed. I have a main form with
multiple records; and then I have a pop-up form that the user opens with
button. The pop-up form contains one record relating to the current record
in the main form (but...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |