[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

challenge to cr ppl....TRY to solve this..

Posted on 2005-04-20
15
Medium Priority
?
478 Views
Last Modified: 2012-08-14
My objective is to change the oleobjects source in run time..i am so close that i can browse thru the sections and find the oleobject..but the selolelocation threw me off...i cannot get that piece to work...

function setImage()
{

crSections = crRpt.Sections;
crOleObj = crRpt.oleObject;


for(var xx = 1;xx<crSections.Count;xx++)
{
crSection = crSections.Item(xx);
crReportObjs = crSection.ReportObjects;

for(var yy=1;yy<=crReportObjs.Count;yy++)
{

if(crReportObjs.Item(yy).Kind == 6)
{


crOleObj = crReportObjs.Item(yy)
crOleObj.setolelocation("a.bmp");

}

}

}
}

but  i get the permission denied .

i read that the selolelocation can be done using hte section format event..

My situation is different..i am embedding the crviewer on the web page so that i dont have access to the withevents & stuff like that in VB...I have a reference to the crystal application send back to my client..so i can access most of the properties..
but i dont know if there is a replacement for the "withevents"  or how to find out if the report is formatting the detail....



Is there any other way to do what i am trying to do(without using VB)...

0
Comment
Question by:crystalguy2000
  • 6
  • 4
  • 4
14 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 750 total points
ID: 13825641
Until CR XI the only way to do it is through VB or the Format event.

mlmcc
0
 

Author Comment

by:crystalguy2000
ID: 13826000
hi mimcc..
how do u trap the format event from within the htm page where i have embedded it
i can trap the downloadfinished,donwloadstarted events etc

Can i trap the format event from within my web client..
0
 
LVL 19

Expert Comment

by:GJParker
ID: 13826064
Section_format is a method of the report object and not thje viewer. It is only available if the report is imported into the VB project as a desgn object.

HTH

Gary
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 

Author Comment

by:crystalguy2000
ID: 13826460

 var reportClient = new ActiveXObject(""); create the object

calls the object (below)
Inside VB
    Set oApp = CreateObject("CrystalRuntime.Application")
    Set Report = oApp.OpenReport(write contents )
send it back to the client

since i have a handle to the report Object
is there any way to trap the format event?

0
 

Author Comment

by:crystalguy2000
ID: 13826506
I can go thru the objects in the reports..i have went as far as getting the reference to the oleobject on the report.
but my problem is with the setolelocation..which gives the permission denied error

crysatl decisions: if you have hte setoleloation other then the format section then i would get the error

to find out out when i have to call the setolelocation ....i need to know when the format is....i hope it is more clear now...?
0
 

Author Comment

by:crystalguy2000
ID: 13828097
I went thru all the postings in EE and all the other sites
i think it is extremely unlikely that we can accomplish this by using oleobjects....

AN alternative would be passing the locations to the report

I can pass in the locations of the images from the database (if i stored those strings in the table)

How do i set the string to be the location of the image?
0
 
LVL 19

Expert Comment

by:GJParker
ID: 13831534
0
 

Author Comment

by:crystalguy2000
ID: 13834813
GJParker ::::
GJParker ::::

Is there a way to kick off Section_format from outside or to find out when Section_format starts?

or is there any way to know what starts the section_format or any other event in the report object
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 13839420
Only by putting code in the event handler.

SectionFormat is kicked off when the section is built and formatting is done.  It depends on which section.  Report Header occurs once.  Details occurs for each record.

mlmcc
0
 

Author Comment

by:crystalguy2000
ID: 13843173
mimcc::
mimcc::

can u elaborate.
do u have a sample for error handler event handling...
how do u initialise..stuff like that

.i tried raising events ...that didnt work...so probably some example would help


0
 
LVL 19

Assisted Solution

by:GJParker
GJParker earned 750 total points
ID: 13843860
[quote]
Is there a way to kick off Section_format from outside or to find out when Section_format starts
[/quote]

No there isn't

Gary
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 13847573
I haven't done it.  I believe you select the viewer on the VB form then add code for the available events.

mlmcc
0
 
LVL 19

Expert Comment

by:GJParker
ID: 14008696
I believe the answers given were could have solved this problem if followed by the questioner. - suggest split GJParker mlmcc.

Gary
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 14020642
Glad i could help

mlmcc
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question