Link to home
Start Free TrialLog in
Avatar of anu1977
anu1977

asked on

Creating Dynamic reports with segate crystal report 8.5

Hi all,

My application has reporting feature and i have been showing predefined reports using crystal report 8.5. Now we want to give the user the option to create his own custom defined reports, dynamically and see them . I'm entirely new to dynamic reports.

Please guide me how to start and create the dynamic reports. Do i need any license or something like that.

Thanks

anamika
Avatar of bobbit31
bobbit31
Flag of United States of America image

yes, you will need a license:

Licensing

Your Crystal Reports Developer Edition contains new features which provide a great deal more flexibility and power for developers to embed reporting in their applications. The most significant of these is the addition of Report Creation APIs to the Crystal Reports Runtime. These allow the developer to create and save new reports, edit and layout reports and more, all at runtime. In effect, developers can now create a custom report writer based on the power of Crystal Reports.

These runtime report creation features may only be used and distributed if the appropriate licensing is obtained by paying the required royalty fees.  Please contact Seagate Software or visit www.seagatesoftware.com/products/crystalreports  for more details on report creation royalties.   Below is a specific list of files and API calls that are covered by this restriction.

You should also refer to the license agreement for other restrictions regarding this redistribution of files including competitive products, server-based software and report distribution systems.

For existing users of Crystal Reports Professional (any version earlier than Version 8) please note that your range of rights for report design as well as for runtime distribution of client applications have not changed, so upgrading client applications will still be royalty free. Only when you take advantage of the new report creation features below will a royalty be required.

Runtime files:

CRAXDRT.DLL
CRYSTALWIZARD.DLL

check out <crystal root>\Developer Files\Help\Royalty Required Runtime.hlp and click on
"Runtime file use restrictions"
Avatar of anu1977
anu1977

ASKER

can you please give me some more info about where to search for this. The related links to the dynamic report generation requirement in segatesoftware site??
Avatar of anu1977

ASKER

Can you please let me know from where i can get help fpr the RC API calls and how to start , do anyone has any sample for this
Avatar of anu1977

ASKER

I could generate a dynamic report from the Crystal report wizard but if i want to give the facility of puttings fields and text boxes at run time in the report viewer , how do i go about it??
myRpt.Sections("whatever section").AddTextObject (<Field>, <left> as long, <top> as long)

myRpt.Sections("whatever section").AddFieldObject (<ptext> As string, <left> as long, <top> as long, [formatText])

again, this will require additional licensing fees.

also, i'd suggest getting the crystal RDC Browser, which shows all the objects and methods available to you in the CRAXDRT library.
Avatar of anu1977

ASKER

Hi bobbit, i'm new to dynamic reports and just starting . What i ahve seen in applications giving dynamic report facility, the user sees the viewer and drags and drops the controls that he wants to be visible in the report and then he can save it as a template. So that in future he can use that. Is it possible to provide this functionality?? The code you have written above shows that u first take the input from user in a form and then programmatically generate the report. But can i give the user this facility to drag and drop the controls into the viewer while viewing an existing report.

What API calls do i need for this . Do i need RC API calls?? Do i need to give any specific dll in my project referrence to use those API calls. I have installed the Segate Crystal report 8.5 on my Machine but didn't find any help on these API calls. Please guide me

Thanks
anamika
i've never done this... but i'm think you should be able to do something like:

Dim myApp As CRAXDRT.Application
Dim myRpt As CRAXDRT.Report

Private Sub Form_Load()

Set myApp = New CRAXDRT.Application
Set myRpt = myApp.OpenReport("C:\my documents\rptTest.rpt")
CRViewer1.ReportSource = myRpt
CRViewer1.ViewReport

End Sub

Private Sub CRViewer1_DragDrop(Source As Control, x As Single, y As Single)

    myRpt.Sections(1).AddTextObject Source.Caption, 10, 10

End Sub

Private Sub Form_Unload(Cancel As Integer)

Set myRpt = Nothing
Set myApp = Nothing

End Sub

for example, place a label on your form, and set it's drag mode to automatic... then drag it on the report.

obviously this is just an example, there will probably be a TON of code to make what you are trying to do as robust as you need it to be.

anyway, good luck!
ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anu1977

ASKER

Hi bobbit,

i actually wanted an interface where user can create his own custom reports like giving a report designer facily , and now i came across the embeded crystal report designer adn it solved my purpose.

I would like to get one help in this embeded designer. This designer has its own toolbar showing a option to save the report that user creates and cliecking on that it opens the file open dialog box. But i want to create my own save button and restrict the user to save new reports only in my application folder where the database exists. So what i did i was hiding the toolbar but user can do a right click and get this .I was implementing my own save button as
If Len(Trim(fileName)) > 0 Then
        CRDesignerCtrl1.SaveReport fileName
End If

how can i trap the save feature of embeded report or is there anyway i can hide this from the toolbar but show rest all features in the toolbar.

Thanks
anamika
is the embedded designer new in 8.5? i use crystal 8.0 and i don't see the embedded report designer control in my vb components.
Avatar of anu1977

ASKER

no i don't think so, just go to the help section and chk. for embeded reports , i think this should be available in Crystal report 8.0
Avatar of DanRollins
Hi anu1977,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept bobbit31's comment(s) as an answer.

anu1977, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer

Computer101
E-E Admin