Re: Crystal Reports Cascading parameters don't get preserved between postbacks

From: LP (lp_at_a.com)
Date: 02/24/05


Date: Thu, 24 Feb 2005 11:34:24 -0500


> Are you saying that you don't get the Open/Save dialog box or you do get
it?

I do NOT get it. When I click export icon it opens a popup window with
Excel, or Word embedded in the window, but no toolbars no nothing and
certainly NO "Save as" dialog box. If you could come up with a way to
provide users with ability to "save as" what's embedded inside a popup, I
would greatly appreciate it.

Thanks

"Brian Bischof" <Brian@NoSpamBischofSystems.com> wrote in message
news:%23vaVMUjGFHA.1096@tk2msftngp13.phx.gbl...
> 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:%23GkSYeiGFHA.2620@tk2msftngp13.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" <Brian@NoSpamBischofSystems.com> wrote in message
> > news:%23rZC84fGFHA.2524@TK2MSFTNGP15.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" <Brian@NoSpamBischofSystems.com> wrote in message
> > > news:%236jPVYfGFHA.3472@TK2MSFTNGP09.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:%23VXeKbeGFHA.4088@TK2MSFTNGP09.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" <Brian@NoSpamBischofSystems.com> wrote in message
> > > > > news:%230b8BKdGFHA.2976@TK2MSFTNGP09.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$1FzVGFHA.3612@TK2MSFTNGP09.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:ezCf58UGFHA.1456@TK2MSFTNGP09.phx.gbl...
> > > > > > > > Brian, I am not using ReportDocument object, I am setting
> > viewers
> > > > > > > > ReportSource to a report file directly:
> > > > > > > >
> > > > > > > > crViewer.ReportSource = Server.MapPath("Reports/" &
> reportName)
> > > > > > > >
> > > > > > > > What should I do in this case?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > >
> > > > > > > > "Brian Bischof" <Brian@NoSpamBischofSystems.com> wrote in
> > message
> > > > > > > > news:eQZxtDUGFHA.548@TK2MSFTNGP14.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:OgS0FtTGFHA.2876@TK2MSFTNGP12.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 ReuseParameterValuesOnRefresh="True" in
a
> > > > viewer,
> > > > > > but
> > > > > > > > it
> > > > > > > > > > still doesn't work. Did anyone run into this problem.
> What's
> > > the
> > > > > > > > solution?
> > > > > > > > > > Please help.
> > > > > > > > > >
> > > > > > > > > > Thank you
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>


Quantcast