473,700 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Reports Cascading parameters don't get preserved between postbacks

LP
I am using (trying to) CR version XI, cascading parameters feature works it
asks user to enter params. But if page is resubmitted. It prompts for params
again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer, but it
still doesn't work. Did anyone run into this problem. What's the solution?
Please help.

Thank you
Nov 19 '05 #1
19 3874
You have to cache the report object. Save the report object to the Session()
collection and then restore it upon page refresh (be sure to explicity cast
it as a ReportDocument) . ASP.NET reports do all kinds of funny things if you
don't save them between page refreshes.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:Og******** ******@TK2MSFTN GP12.phx.gbl...
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer, but it
still doesn't work. Did anyone run into this problem. What's the solution?
Please help.

Thank you

Nov 19 '05 #2
LP
Brian, I am not using ReportDocument object, I am setting viewers
ReportSource to a report file directly:

crViewer.Report Source = Server.MapPath( "Reports/" & reportName)

What should I do in this case?

Thanks
"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
You have to cache the report object. Save the report object to the Session() collection and then restore it upon page refresh (be sure to explicity cast it as a ReportDocument) . ASP.NET reports do all kinds of funny things if you don't save them between page refreshes.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:Og******** ******@TK2MSFTN GP12.phx.gbl...
I am using (trying to) CR version XI, cascading parameters feature works

it
asks user to enter params. But if page is resubmitted. It prompts for

params
again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer, but it still doesn't work. Did anyone run into this problem. What's the solution? Please help.

Thank you


Nov 19 '05 #3
LP
Ok, I did change it to ReportDocument , and that worked for me even without
saving it to Session Variable. But now I am having another problem with
exporting. I have another button that export report to excel and sends a
file to a client, so now one parameterized report doesn't work. I tried
saving reportDoc and it ParameterFields to session and retrieving, but
nothing works.
I think CR is a very good product, very sharp looking reports (when you get
them to work), very slick designer especially version XI. But their API and
object hierarchy is terribly confusing and inconsistent with what one would
expect from .NET friendly product, I haven't seen any good documentation on
their APIs.
"LP" <lp@a.com> wrote in message
news:ez******** ******@TK2MSFTN GP09.phx.gbl...
Brian, I am not using ReportDocument object, I am setting viewers
ReportSource to a report file directly:

crViewer.Report Source = Server.MapPath( "Reports/" & reportName)

What should I do in this case?

Thanks
"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
You have to cache the report object. Save the report object to the

Session()
collection and then restore it upon page refresh (be sure to explicity

cast
it as a ReportDocument) . ASP.NET reports do all kinds of funny things if

you
don't save them between page refreshes.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:Og******** ******@TK2MSFTN GP12.phx.gbl...
I am using (trying to) CR version XI, cascading parameters feature
works
it
asks user to enter params. But if page is resubmitted. It prompts for

params
again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer, but

it still doesn't work. Did anyone run into this problem. What's the solution? Please help.

Thank you



Nov 19 '05 #4
I agree about the confusing API. Have you seen my existing book, "Crystal
Reports .NET Programming"? It teaches you how to use the .NET object model
and has many tips and tricks for getting it to work. Anyway, it only touches
on the RAS and RDC programming a bit (I don't know if using that or not).
I'm going to do another book which is hardcore RAS programming because RAS
is extremely complicated to learn and program with.. But that won't be till
after I finish the CR XI book I'm working on now.

Anyway, to answer your question, the mistake most people make is that they
mix up the viewer object model with the report object model. They set some
properties using one object and set other properties using the other object
model. Then they get consfused when some of the properties get dropped. You
can only use ONE object model at a time. The best practice is to use the
ReportDocument object model (unless working with WebServices). Try that and
post the results here.

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:eS******** ******@TK2MSFTN GP09.phx.gbl...
Ok, I did change it to ReportDocument , and that worked for me even without saving it to Session Variable. But now I am having another problem with
exporting. I have another button that export report to excel and sends a
file to a client, so now one parameterized report doesn't work. I tried
saving reportDoc and it ParameterFields to session and retrieving, but
nothing works.
I think CR is a very good product, very sharp looking reports (when you get them to work), very slick designer especially version XI. But their API and object hierarchy is terribly confusing and inconsistent with what one would expect from .NET friendly product, I haven't seen any good documentation on their APIs.
"LP" <lp@a.com> wrote in message
news:ez******** ******@TK2MSFTN GP09.phx.gbl...
Brian, I am not using ReportDocument object, I am setting viewers
ReportSource to a report file directly:

crViewer.Report Source = Server.MapPath( "Reports/" & reportName)

What should I do in this case?

Thanks
"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
You have to cache the report object. Save the report object to the

Session()
collection and then restore it upon page refresh (be sure to explicity

cast
it as a ReportDocument) . ASP.NET reports do all kinds of funny things if
you
don't save them between page refreshes.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:Og******** ******@TK2MSFTN GP12.phx.gbl...
> I am using (trying to) CR version XI, cascading parameters feature works it
> asks user to enter params. But if page is resubmitted. It prompts
for params
> again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer,

but it
> still doesn't work. Did anyone run into this problem. What's the

solution?
> Please help.
>
> Thank you
>
>



Nov 19 '05 #5
LP
>The best practice is to use the
ReportDocument object model (unless working with WebServices). Try that and post the results here.
ReportDocument did work for me for postback problems. But I also have a
button that exports report to excel and then sends this file to a client
through HTTP. I could not get that to work with one parameterized report.
Parameters don't seem to get cached with reportdocument. I tried my
different things, like caching actuall ParamFields object, etc. but nothing
seems to work.
I need this button because export in Crystal webviewer opens a popup window
with no toolbars, so users can't save it to a file. If I could find
workaround that, there would not be a need for this custom export button. My
biggest problem with Crystal right now is very simple but yet important
things take so much time effort to do that it becomes questionanle if it's
all worth it. And default behavior of Crystal is just bizarre like opening a
popup with no toolbars when exporting to another format, so file can't be
"save as"

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. I agree about the confusing API. Have you seen my existing book, "Crystal
Reports .NET Programming"? It teaches you how to use the .NET object model
and has many tips and tricks for getting it to work. Anyway, it only touches on the RAS and RDC programming a bit (I don't know if using that or not).
I'm going to do another book which is hardcore RAS programming because RAS
is extremely complicated to learn and program with.. But that won't be till after I finish the CR XI book I'm working on now.

Anyway, to answer your question, the mistake most people make is that they
mix up the viewer object model with the report object model. They set some
properties using one object and set other properties using the other object model. Then they get consfused when some of the properties get dropped. You can only use ONE object model at a time. The best practice is to use the
ReportDocument object model (unless working with WebServices). Try that and post the results here.

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:eS******** ******@TK2MSFTN GP09.phx.gbl...
Ok, I did change it to ReportDocument , and that worked for me even without
saving it to Session Variable. But now I am having another problem with
exporting. I have another button that export report to excel and sends a
file to a client, so now one parameterized report doesn't work. I tried
saving reportDoc and it ParameterFields to session and retrieving, but
nothing works.
I think CR is a very good product, very sharp looking reports (when you

get
them to work), very slick designer especially version XI. But their API

and
object hierarchy is terribly confusing and inconsistent with what one

would
expect from .NET friendly product, I haven't seen any good documentation

on
their APIs.
"LP" <lp@a.com> wrote in message
news:ez******** ******@TK2MSFTN GP09.phx.gbl...
Brian, I am not using ReportDocument object, I am setting viewers
ReportSource to a report file directly:

crViewer.Report Source = Server.MapPath( "Reports/" & reportName)

What should I do in this case?

Thanks
"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
> You have to cache the report object. Save the report object to the
Session()
> collection and then restore it upon page refresh (be sure to explicity cast
> it as a ReportDocument) . ASP.NET reports do all kinds of funny
things if you
> don't save them between page refreshes.
>
> HTH,
>
> Brian Bischof
> www.CrystalReportsBook.com
>
>
>
> "LP" <lp@a.com> wrote in message
> news:Og******** ******@TK2MSFTN GP12.phx.gbl...
> > I am using (trying to) CR version XI, cascading parameters feature

works
> it
> > asks user to enter params. But if page is resubmitted. It prompts for > params
> > again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer, but it
> > still doesn't work. Did anyone run into this problem. What's the
solution?
> > Please help.
> >
> > Thank you
> >
> >
>
>



Nov 19 '05 #6
Those are good points. Let me look into the export problem of not saving to
disk and see if I can get you an answer.

Brian
"LP" <lp@a.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
The best practice is to use the
ReportDocument object model (unless working with WebServices). Try that and
post the results here.


ReportDocument did work for me for postback problems. But I also have a
button that exports report to excel and then sends this file to a client
through HTTP. I could not get that to work with one parameterized report.
Parameters don't seem to get cached with reportdocument. I tried my
different things, like caching actuall ParamFields object, etc. but

nothing seems to work.
I need this button because export in Crystal webviewer opens a popup window with no toolbars, so users can't save it to a file. If I could find
workaround that, there would not be a need for this custom export button. My biggest problem with Crystal right now is very simple but yet important
things take so much time effort to do that it becomes questionanle if it's
all worth it. And default behavior of Crystal is just bizarre like opening a popup with no toolbars when exporting to another format, so file can't be
"save as"

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I agree about the confusing API. Have you seen my existing book, "Crystal
Reports .NET Programming"? It teaches you how to use the .NET object model and has many tips and tricks for getting it to work. Anyway, it only

touches
on the RAS and RDC programming a bit (I don't know if using that or not). I'm going to do another book which is hardcore RAS programming because RAS is extremely complicated to learn and program with.. But that won't be

till
after I finish the CR XI book I'm working on now.

Anyway, to answer your question, the mistake most people make is that they mix up the viewer object model with the report object model. They set some properties using one object and set other properties using the other

object
model. Then they get consfused when some of the properties get dropped.

You
can only use ONE object model at a time. The best practice is to use the
ReportDocument object model (unless working with WebServices). Try that

and
post the results here.

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:eS******** ******@TK2MSFTN GP09.phx.gbl...
Ok, I did change it to ReportDocument , and that worked for me even

without
saving it to Session Variable. But now I am having another problem with exporting. I have another button that export report to excel and sends a file to a client, so now one parameterized report doesn't work. I tried saving reportDoc and it ParameterFields to session and retrieving, but
nothing works.
I think CR is a very good product, very sharp looking reports (when you
get
them to work), very slick designer especially version XI. But their
API and
object hierarchy is terribly confusing and inconsistent with what one

would
expect from .NET friendly product, I haven't seen any good
documentation on
their APIs.
"LP" <lp@a.com> wrote in message
news:ez******** ******@TK2MSFTN GP09.phx.gbl...
> Brian, I am not using ReportDocument object, I am setting viewers
> ReportSource to a report file directly:
>
> crViewer.Report Source = Server.MapPath( "Reports/" & reportName)
>
> What should I do in this case?
>
>
>
> Thanks
>
>
> "Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
> news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
> > You have to cache the report object. Save the report object to the
> Session()
> > collection and then restore it upon page refresh (be sure to

explicity > cast
> > it as a ReportDocument) . ASP.NET reports do all kinds of funny

things
if
> you
> > don't save them between page refreshes.
> >
> > HTH,
> >
> > Brian Bischof
> > www.CrystalReportsBook.com
> >
> >
> >
> > "LP" <lp@a.com> wrote in message
> > news:Og******** ******@TK2MSFTN GP12.phx.gbl...
> > > I am using (trying to) CR version XI, cascading parameters feature works
> > it
> > > asks user to enter params. But if page is resubmitted. It

prompts for
> > params
> > > again. I did set ReuseParameterV aluesOnRefresh= "True" in a
viewer, but
> it
> > > still doesn't work. Did anyone run into this problem. What's the
> solution?
> > > Please help.
> > >
> > > Thank you
> > >
> > >
> >
> >
>
>



Nov 19 '05 #7
Hmmm. I'm looking over all your posts. The first post you had last week said
that you couldn't get the Save As dialog box to open. Instead, it always
spawned a new window. Now it seems that when you are in the new window it
won't allow saving the data. I assume this is a direct result of not being
able to solve the first problem. So here are my comments.

First is that if the export button doesn't open the Save/Open dialog box,
then I think it's a browser issue. For example, at the bottom of the dialog
box is a checkbox telling whether it should prompt you with this or not. I
played around with it for Excel and Word but this had no effect. I did find
out that I can change this with Adobe inside the Adobe Internet preferences.
After fixing that I got the Open/Save box for PDFs again. I looked in
preferences for Excel/Word and couldn't find such an option. Thus, the PDF
option makes me think that the browser is controlling this and not CR XI.
Overall, I have the Open/Save dialog popping up for all file types in my
brower and you should be able to get them too.

Re the Excel and Word browsers not letting you save data, this is happening
with my computer as well. However, again I have to question if this is a
browser issue or a CR XI issue since XI is just sending the XLS file to the
browser. I'll continue to play with it b/c I don't know the answer to this
one yet. But I think your best bet is to look at the first issue and get the
Open/Save dialog box to pop up by tweaking the IE settings.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Those are good points. Let me look into the export problem of not saving to disk and see if I can get you an answer.

Brian
"LP" <lp@a.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
The best practice is to use the
ReportDocument object model (unless working with WebServices). Try that
and
post the results here.
ReportDocument did work for me for postback problems. But I also have a
button that exports report to excel and then sends this file to a client
through HTTP. I could not get that to work with one parameterized report.
Parameters don't seem to get cached with reportdocument. I tried my
different things, like caching actuall ParamFields object, etc. but

nothing
seems to work.
I need this button because export in Crystal webviewer opens a popup

window
with no toolbars, so users can't save it to a file. If I could find
workaround that, there would not be a need for this custom export button. My
biggest problem with Crystal right now is very simple but yet important
things take so much time effort to do that it becomes questionanle if
it's all worth it. And default behavior of Crystal is just bizarre like opening a
popup with no toolbars when exporting to another format, so file can't
be "save as"

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I agree about the confusing API. Have you seen my existing book, "Crystal Reports .NET Programming"? It teaches you how to use the .NET object model and has many tips and tricks for getting it to work. Anyway, it only

touches
on the RAS and RDC programming a bit (I don't know if using that or not). I'm going to do another book which is hardcore RAS programming because RAS is extremely complicated to learn and program with.. But that won't be

till
after I finish the CR XI book I'm working on now.

Anyway, to answer your question, the mistake most people make is that they mix up the viewer object model with the report object model. They set some properties using one object and set other properties using the other

object
model. Then they get consfused when some of the properties get
dropped. You
can only use ONE object model at a time. The best practice is to use
the ReportDocument object model (unless working with WebServices). Try that and
post the results here.

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:eS******** ******@TK2MSFTN GP09.phx.gbl...
> Ok, I did change it to ReportDocument , and that worked for me even
without
> saving it to Session Variable. But now I am having another problem

with > exporting. I have another button that export report to excel and
sends a > file to a client, so now one parameterized report doesn't work. I tried > saving reportDoc and it ParameterFields to session and retrieving,
but > nothing works.
> I think CR is a very good product, very sharp looking reports (when
you get
> them to work), very slick designer especially version XI. But their API and
> object hierarchy is terribly confusing and inconsistent with what one would
> expect from .NET friendly product, I haven't seen any good documentation on
> their APIs.
>
>
> "LP" <lp@a.com> wrote in message
> news:ez******** ******@TK2MSFTN GP09.phx.gbl...
> > Brian, I am not using ReportDocument object, I am setting viewers
> > ReportSource to a report file directly:
> >
> > crViewer.Report Source = Server.MapPath( "Reports/" & reportName)
> >
> > What should I do in this case?
> >
> >
> >
> > Thanks
> >
> >
> > "Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
> > news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
> > > You have to cache the report object. Save the report object to the
> > Session()
> > > collection and then restore it upon page refresh (be sure to

explicity
> > cast
> > > it as a ReportDocument) . ASP.NET reports do all kinds of funny

things
if
> > you
> > > don't save them between page refreshes.
> > >
> > > HTH,
> > >
> > > Brian Bischof
> > > www.CrystalReportsBook.com
> > >
> > >
> > >
> > > "LP" <lp@a.com> wrote in message
> > > news:Og******** ******@TK2MSFTN GP12.phx.gbl...
> > > > I am using (trying to) CR version XI, cascading parameters feature > works
> > > it
> > > > asks user to enter params. But if page is resubmitted. It prompts for
> > > params
> > > > again. I did set ReuseParameterV aluesOnRefresh= "True" in a viewer, but
> > it
> > > > still doesn't work. Did anyone run into this problem. What's

the > > solution?
> > > > Please help.
> > > >
> > > > Thank you
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 19 '05 #8
LP
Brian, Thanks for looking into this for me.
I think you understand my problem. But just to be clear:
When I click export button of a webviewer, it does open a popup window and
loads excel, word, etc. into the window. But there's no obvious way to save
it to a local drive as a file (other than copy and paste) And, yes, you are
right PDF is the only format with a toolbar that has "save as" icon. But I
think it's part of PDF object embedded within a browser. I also looked in
browser settings to make it open "save as" dialog box, but could not find
anything.
But I begin to doubt that it is a browser issue like you suggesting. I think
this behavior is controlled by HTTP header tags. I know that there's a
header tag content-type (or something like that) where you can specify
ms-excel, ms-word, etc. And there's also "attachment ; filename=" tag where
you can give file name and browser then will prompt you to save or open that
file. So, I do think it's the way CR not providing the right HTTP header
tags for the popup is a root of the problem. So, I am thinking of
intercepting CR rendered HTML and modifying it, but I haven't had any time
to do anything serious like that, after all I am just building a demo app.
Let me know if you find anything else, or if I am on the right track.

Thank you again for your input.
"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Hmmm. I'm looking over all your posts. The first post you had last week said that you couldn't get the Save As dialog box to open. Instead, it always
spawned a new window. Now it seems that when you are in the new window it
won't allow saving the data. I assume this is a direct result of not being
able to solve the first problem. So here are my comments.

First is that if the export button doesn't open the Save/Open dialog box,
then I think it's a browser issue. For example, at the bottom of the dialog box is a checkbox telling whether it should prompt you with this or not. I
played around with it for Excel and Word but this had no effect. I did find out that I can change this with Adobe inside the Adobe Internet preferences. After fixing that I got the Open/Save box for PDFs again. I looked in
preferences for Excel/Word and couldn't find such an option. Thus, the PDF
option makes me think that the browser is controlling this and not CR XI.
Overall, I have the Open/Save dialog popping up for all file types in my
brower and you should be able to get them too.

Re the Excel and Word browsers not letting you save data, this is happening with my computer as well. However, again I have to question if this is a
browser issue or a CR XI issue since XI is just sending the XLS file to the browser. I'll continue to play with it b/c I don't know the answer to this
one yet. But I think your best bet is to look at the first issue and get the Open/Save dialog box to pop up by tweaking the IE settings.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Those are good points. Let me look into the export problem of not saving

to
disk and see if I can get you an answer.

Brian
"LP" <lp@a.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
>The best practice is to use the
> ReportDocument object model (unless working with WebServices). Try that and
> post the results here.

ReportDocument did work for me for postback problems. But I also have a button that exports report to excel and then sends this file to a client through HTTP. I could not get that to work with one parameterized report. Parameters don't seem to get cached with reportdocument. I tried my
different things, like caching actuall ParamFields object, etc. but

nothing
seems to work.
I need this button because export in Crystal webviewer opens a popup

window
with no toolbars, so users can't save it to a file. If I could find
workaround that, there would not be a need for this custom export button.
My
biggest problem with Crystal right now is very simple but yet important things take so much time effort to do that it becomes questionanle if it's all worth it. And default behavior of Crystal is just bizarre like opening
a
popup with no toolbars when exporting to another format, so file can't

be "save as"

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> I agree about the confusing API. Have you seen my existing book,

"Crystal
> Reports .NET Programming"? It teaches you how to use the .NET object

model
> and has many tips and tricks for getting it to work. Anyway, it only
touches
> on the RAS and RDC programming a bit (I don't know if using that or

not).
> I'm going to do another book which is hardcore RAS programming because RAS
> is extremely complicated to learn and program with.. But that won't
be till
> after I finish the CR XI book I'm working on now.
>
> Anyway, to answer your question, the mistake most people make is that
they
> mix up the viewer object model with the report object model. They
set some
> properties using one object and set other properties using the other
object
> model. Then they get consfused when some of the properties get dropped. You
> can only use ONE object model at a time. The best practice is to use the > ReportDocument object model (unless working with WebServices). Try that and
> post the results here.
>
> Brian Bischof
> www.CrystalReportsBook.com
>
>
>
> "LP" <lp@a.com> wrote in message
> news:eS******** ******@TK2MSFTN GP09.phx.gbl...
> > Ok, I did change it to ReportDocument , and that worked for me
even > without
> > saving it to Session Variable. But now I am having another problem

with
> > exporting. I have another button that export report to excel and

sends
a
> > file to a client, so now one parameterized report doesn't work. I

tried
> > saving reportDoc and it ParameterFields to session and retrieving,

but > > nothing works.
> > I think CR is a very good product, very sharp looking reports (when you
> get
> > them to work), very slick designer especially version XI. But
their
API
> and
> > object hierarchy is terribly confusing and inconsistent with what

one > would
> > expect from .NET friendly product, I haven't seen any good

documentation
> on
> > their APIs.
> >
> >
> > "LP" <lp@a.com> wrote in message
> > news:ez******** ******@TK2MSFTN GP09.phx.gbl...
> > > Brian, I am not using ReportDocument object, I am setting
viewers > > > ReportSource to a report file directly:
> > >
> > > crViewer.Report Source = Server.MapPath( "Reports/" & reportName)
> > >
> > > What should I do in this case?
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > > "Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message > > > news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
> > > > You have to cache the report object. Save the report object to

the
> > > Session()
> > > > collection and then restore it upon page refresh (be sure to
explicity
> > > cast
> > > > it as a ReportDocument) . ASP.NET reports do all kinds of funny
things
> if
> > > you
> > > > don't save them between page refreshes.
> > > >
> > > > HTH,
> > > >
> > > > Brian Bischof
> > > > www.CrystalReportsBook.com
> > > >
> > > >
> > > >
> > > > "LP" <lp@a.com> wrote in message
> > > > news:Og******** ******@TK2MSFTN GP12.phx.gbl...
> > > > > I am using (trying to) CR version XI, cascading parameters

feature
> > works
> > > > it
> > > > > asks user to enter params. But if page is resubmitted. It

prompts
> for
> > > > params
> > > > > again. I did set ReuseParameterV aluesOnRefresh= "True" in a

viewer,
> but
> > > it
> > > > > still doesn't work. Did anyone run into this problem. What's

the > > > solution?
> > > > > Please help.
> > > > >
> > > > > Thank you
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>




Nov 19 '05 #9
Are you saying that you don't get the Open/Save dialog box or you do get it?
It seems that you don't get it at all. I get it on my computer and I think
this is a browser issue. As I said earlier, I was able to turn
enable/disable it using a PDF option. The second issue of the toolbar not
having the Save buttons could be a header issue. I'm not knowledgeable about
HTML headers but it does make sense that the header tags can control this. I
will have to research that tomorrow.

Brian Bischof
www.CrystalReportsBook.com

"LP" <lp@a.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Brian, Thanks for looking into this for me.
I think you understand my problem. But just to be clear:
When I click export button of a webviewer, it does open a popup window and
loads excel, word, etc. into the window. But there's no obvious way to save it to a local drive as a file (other than copy and paste) And, yes, you are right PDF is the only format with a toolbar that has "save as" icon. But I
think it's part of PDF object embedded within a browser. I also looked in
browser settings to make it open "save as" dialog box, but could not find
anything.
But I begin to doubt that it is a browser issue like you suggesting. I think this behavior is controlled by HTTP header tags. I know that there's a
header tag content-type (or something like that) where you can specify
ms-excel, ms-word, etc. And there's also "attachment ; filename=" tag where
you can give file name and browser then will prompt you to save or open that file. So, I do think it's the way CR not providing the right HTTP header
tags for the popup is a root of the problem. So, I am thinking of
intercepting CR rendered HTML and modifying it, but I haven't had any time
to do anything serious like that, after all I am just building a demo app.
Let me know if you find anything else, or if I am on the right track.

Thank you again for your input.
"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Hmmm. I'm looking over all your posts. The first post you had last week said
that you couldn't get the Save As dialog box to open. Instead, it always
spawned a new window. Now it seems that when you are in the new window it
won't allow saving the data. I assume this is a direct result of not being able to solve the first problem. So here are my comments.

First is that if the export button doesn't open the Save/Open dialog box, then I think it's a browser issue. For example, at the bottom of the

dialog
box is a checkbox telling whether it should prompt you with this or not. I played around with it for Excel and Word but this had no effect. I did

find
out that I can change this with Adobe inside the Adobe Internet

preferences.
After fixing that I got the Open/Save box for PDFs again. I looked in
preferences for Excel/Word and couldn't find such an option. Thus, the PDF option makes me think that the browser is controlling this and not CR XI. Overall, I have the Open/Save dialog popping up for all file types in my
brower and you should be able to get them too.

Re the Excel and Word browsers not letting you save data, this is

happening
with my computer as well. However, again I have to question if this is a
browser issue or a CR XI issue since XI is just sending the XLS file to

the
browser. I'll continue to play with it b/c I don't know the answer to this one yet. But I think your best bet is to look at the first issue and get

the
Open/Save dialog box to pop up by tweaking the IE settings.

HTH,

Brian Bischof
www.CrystalReportsBook.com

"Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Those are good points. Let me look into the export problem of not saving
to
disk and see if I can get you an answer.

Brian
"LP" <lp@a.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> >The best practice is to use the
> > ReportDocument object model (unless working with WebServices). Try

that
> and
> > post the results here.
>
> ReportDocument did work for me for postback problems. But I also
have a > button that exports report to excel and then sends this file to a client > through HTTP. I could not get that to work with one parameterized report.
> Parameters don't seem to get cached with reportdocument. I tried my
> different things, like caching actuall ParamFields object, etc. but
nothing
> seems to work.
> I need this button because export in Crystal webviewer opens a popup
window
> with no toolbars, so users can't save it to a file. If I could find
> workaround that, there would not be a need for this custom export

button.
My
> biggest problem with Crystal right now is very simple but yet important > things take so much time effort to do that it becomes questionanle
if it's
> all worth it. And default behavior of Crystal is just bizarre like

opening
a
> popup with no toolbars when exporting to another format, so file
can't be
> "save as"
>
>
>
> "Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in message
> news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> > I agree about the confusing API. Have you seen my existing book,
"Crystal
> > Reports .NET Programming"? It teaches you how to use the .NET
object model
> > and has many tips and tricks for getting it to work. Anyway, it only > touches
> > on the RAS and RDC programming a bit (I don't know if using that or not).
> > I'm going to do another book which is hardcore RAS programming

because RAS
> > is extremely complicated to learn and program with.. But that won't be
> till
> > after I finish the CR XI book I'm working on now.
> >
> > Anyway, to answer your question, the mistake most people make is that they
> > mix up the viewer object model with the report object model. They set some
> > properties using one object and set other properties using the
other > object
> > model. Then they get consfused when some of the properties get

dropped.
> You
> > can only use ONE object model at a time. The best practice is to use the
> > ReportDocument object model (unless working with WebServices). Try

that
> and
> > post the results here.
> >
> > Brian Bischof
> > www.CrystalReportsBook.com
> >
> >
> >
> > "LP" <lp@a.com> wrote in message
> > news:eS******** ******@TK2MSFTN GP09.phx.gbl...
> > > Ok, I did change it to ReportDocument , and that worked for me even > > without
> > > saving it to Session Variable. But now I am having another
problem with
> > > exporting. I have another button that export report to excel and

sends
a
> > > file to a client, so now one parameterized report doesn't work. I tried
> > > saving reportDoc and it ParameterFields to session and retrieving, but
> > > nothing works.
> > > I think CR is a very good product, very sharp looking reports (when you
> > get
> > > them to work), very slick designer especially version XI. But their API
> > and
> > > object hierarchy is terribly confusing and inconsistent with
what one
> > would
> > > expect from .NET friendly product, I haven't seen any good
documentation
> > on
> > > their APIs.
> > >
> > >
> > > "LP" <lp@a.com> wrote in message
> > > news:ez******** ******@TK2MSFTN GP09.phx.gbl...
> > > > Brian, I am not using ReportDocument object, I am setting viewers > > > > ReportSource to a report file directly:
> > > >
> > > > crViewer.Report Source = Server.MapPath( "Reports/" &
reportName) > > > >
> > > > What should I do in this case?
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > >
> > > > "Brian Bischof" <Br***@NoSpamBi schofSystems.co m> wrote in

message > > > > news:eQ******** *****@TK2MSFTNG P14.phx.gbl...
> > > > > You have to cache the report object. Save the report object to the

> > > > Session()
> > > > > collection and then restore it upon page refresh (be sure to
> explicity
> > > > cast
> > > > > it as a ReportDocument) . ASP.NET reports do all kinds of
funny > things
> > if
> > > > you
> > > > > don't save them between page refreshes.
> > > > >
> > > > > HTH,
> > > > >
> > > > > Brian Bischof
> > > > > www.CrystalReportsBook.com
> > > > >
> > > > >
> > > > >
> > > > > "LP" <lp@a.com> wrote in message
> > > > > news:Og******** ******@TK2MSFTN GP12.phx.gbl...
> > > > > > I am using (trying to) CR version XI, cascading parameters
feature
> > > works
> > > > > it
> > > > > > asks user to enter params. But if page is resubmitted. It
prompts
> > for
> > > > > params
> > > > > > again. I did set ReuseParameterV aluesOnRefresh= "True" in a
viewer,
> > but
> > > > it
> > > > > > still doesn't work. Did anyone run into this problem.

What's the
> > > > solution?
> > > > > > Please help.
> > > > > >
> > > > > > Thank you
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4594
by: DLT | last post by:
I have written a VB.NET application that contains several crystal reports. I have created the reports with parameters and am passing them fine into the report the first time. But, if I change the values of the parameters and try to generate the reports again, I am getting prompted by Crystal reports to enter the discrete values. Here's part of my code... It is executed when the user selects the report and clicks a button. I don't...
1
19174
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal Report at runtime? Example: private void button1_Click(object sender,
0
2068
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the data into a comboBox. One thing I noticed, however, is that this method shows me both the parameters used by the main report and parameters used by the sub-report(s).
0
5764
by: John Smith | last post by:
Hello, I have 7 different crystal reports that need to be collated. Since I want to end up with a page of each (which all together make a single report), I created a blank main report and then added the 7 as subreports so they can print one after the other. I'm supposed to be printing them from a VB.Net 2003 application and I will be passing 2 parameters (start and end dates). These reports are huge (over 1000+ pages each). My original...
7
6710
by: Jlo | last post by:
Hi, I have a c# winforms application. When I call the report file, it shows me all the records in the table. How can I make it to call only a particular range. i have the following code Viewer1.ReportSource = Application.StartupPath + "//Label.rpt"; How can I assign it a dataset which have the data of a particular range.
0
1036
by: Raymond Luxury-Yacht | last post by:
I have a Crystal 11 Report which use the a dynamic cascading parameter. The report looks at a view I have within SQL Server 2000, however whichever field I have at the top of the parameter list seems to have some values missing. E.g. The Dynamic cascading parameter is Class >> Type >Category and instead of getting the 4 options of Class which I know are in the view, I only get 2. And if I swap it around so its Type >Class >Category then...
1
1597
by: tedmanowar | last post by:
Hello, I am trying to add some reporting features to a quite large asp.net web application. I have created a webform that contains a few fields for filtering data to be displayed in a Crystal Report. I have created a sample report that has a few parameters but I cannot get any data returned to me if those parameters don't have values. Is there a way for Crystal Reports to ignore parameters that don't have a value specified? Or...
1
8144
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings file and itself into the exe. You would probably want a tool for this bit which could be in the zip too. So the app isnt single exe when running but when not running, it is. Just an idea for you to think about. Another option would possibly be to...
0
2101
by: mwcapps | last post by:
I have many, many reports in crystal 8.5 that I need to integrate into my new VB.net application. I have no code and no idea how to pass parameters and/or open different reports in .net. The user goes through a 'wizard' that I created to choose whatever parameters that particular report (picked from a drop down menu containing all reports) requires. However, I don't know how to passed the selected parameters to my crystal report viewer control...
0
9217
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, 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...
0
9076
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 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...
0
8926
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 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...
1
6563
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5903
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();...
0
4404
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4659
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2030
bsmnconsultancy
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...

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.