Crystal Reports Viewer reprompts for parameters after several page

K

Karen Grube

Hi!

Sorry, but I can't seem to get any help with this on the Crystal Reports
web site, so I'm hoping someone here can help.

I have a Web Page which gathers parameters for a Crystal Report, stores
them in the web session, and then does a redirect to a page that has on it
two objects only: a Crystal Report (not an embedded report, but an external
stored report) and a Crystal Viewer control.

I'm setting the parameters in the Page Init, as opposed to the Page Load,
and the report runts well, with one exception. I'm using the activex printer
control, so when users hit the viewer control's print button, it brings up
the standard printer dialogue and lets them choose the printer. When they
print the entire report, everything works well, However, occasionally when
they choose to print one or two pages in the middle of the report, they are
repropmted for the report's parameters! Also, sometimes, when they 'go to'
specific pages, rather than just paging forward and back, they are reprompted
for parameters.

There's a whole discussion about page persistence in the Crystal Reports
10 'Additional' SDK, but it's WAAAYY over my head. Is that what I'm missing
here? All I want to do is stop the viewer from reprompting for values and
have it just display or print the correct information for that page! What do
I have to code in order to get this to work correctly, and why should I have
to code anything at all? How dumb is it that the viewer is so flawed that it
won't really work the way it's supposed to?

Any help or guidance would be greatly appreciated.

Thanks!
Karen Grube
(e-mail address removed)
 
S

Scott Mitchell [MVP]

Karen, my experience with CR is *very* limited, but might the problem be
that the Session is expiring? Does this problem only happen if it's
been quite a while since the user selected the Crystal Report (like 20
minutes)?

I have a page on one of my apps that does a similar thing, but it
doesn't use the ActiveX part. Rather than storing the parameters in
Session, I requery the report on each page load to get the report's
parameter list.

hth

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPMessageboard.com
http://www.ASPFAQs.com

* When you think ASP, think 4GuysFromRolla.com!
 
K

Karen Grube

Hi Scott!

Thanks! I'm not sure what you mean by requery the report. Are you
saying that I need to reset the parameters not only in the page init, but
also in the page load? Honestly, I'm not sure that will help because this
seems to have something to do with how the viewer control itself keeps track
of where it is. I can certainly try that, though, if you think it might help.

Just to clarify a bit, I'm only using the session to store the values for
the parameters between the nice little asp.net page I created that lets them
enter/select the values they want for the report - and the page that contains
only the report and the viewer. On that page, all I'm doing is taking the
values from that small set of session variables and using them to populate
the parameters for the report. I'm never actually storing the parameter
object(s) themselves in session.

But I think I may have discovered something that may help. I turned
custom error messages 'off' in WebConfig. Now I actually see an error
message that might mean something:

"Get page number for group failed"

Unfortunately, I can't find anything on this error in Crystal's KB. This
happens when I'm choosing to display a particular page. What I did was run
the report, use the group tree to move to a particular group, and then
changed my mind and typed in a page number in the 'go to' box in the crystal
viewer. If I don't follow the page sequence and interrupt it at all by
selecting a group from the group tree or a page number, after a time or two
of doing that (usually the third or fourth attempt) that error appears.

The interesting thing is that this doesn't happen on my local machine
where I'm doing the development, so it may have something to do with how IIS
is configured on the server. I'm running Sharepoint on the same server, and
had to make some special changes to the webconfig file in order to enable
session state when asp.net is running on the same server as sharepoint.

All I'm getting at is that this may have something to do with the web
config file or how IIS is configured rather than anything I'm doing or not
doing with persisting the pages, but I'm not sure.

Any suggestions or ideas would be greatly appreciated.

Thanks!
Karen
(e-mail address removed)
 
S

Scott Mitchell [MVP]

Karen, don't know if I can be of much more help, sorry. My CR
experience, as aforemention, is next to nil. I would just be certain to
double-check that your session hasn't expired before assigning the
values to the parameters, I still think that that might be the problem...

hth

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPMessageboard.com
http://www.ASPFAQs.com

* When you think ASP, think 4GuysFromRolla.com!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top