I'm tring to select the papersource of a printer to the user selection and give it to the program to print the report to the selected tray of the printer.
I bring up the CPrintDialog and let the user select the printer and the tray and assign it to a CrystalReport object to print it.
What I'm...
Hi,
From the report object you have to get the subreport and do the SetTablePrivateData 0, 3, rs with the subreport object.
Refer to thread766-399956. It has the code both in VB and VC++. There since it is using native SQL server driver, there is a call to SetLogonInfo and SetLocation. You...
Hi,
You can use the CR API Verify() to do this.
oReport.Database.Tables.Item(1).SetDatasource yourRecordset
oReport.Database.Verify
This should do it.
cheers,
Techi
Hi Krishna,
Yes CR requires a Clientside cursor. I found this out while working on my appn. There is no documentation in CR help regarding this.
just look at the following thread
thread766-403227
Hi,
Are you printing it from the CRViewer after previewing your report or are you directly printing it using the CR API? If you are directly printing it, can you preview it in the CRViewer and can you view all the 50 pages. What database driver are you using for dataaccess? Can you explain it a...
Hi,
So you are using the ADO driver. Since it seems to stop pulling pages fro the subreport, make sure you are opening the subreport and setting it datasource to the recordset you are passing.I do not know if you are doing this.
From the Report object, get the Section object, iterate through...
Hi Denis,
What is exact error text?
From what I infer from your question, I think your problem is when you connect to the database.
You have to use
Report.Database.Tables.Item(1).SetLogonInfo(Server,Databse, userid, password)
Then call
Report.Database.Tables.Item(1).Location =...
Hi,
Are you sure your report has 69 pages? IS the problem when you print\preview from your app? If so try to Preview it from CR itself with the exact same query and find out if it brings back 69 pages.
Also what database are you using, what driver are you using for data acces. If you can be...
Hi Munny,
Could you elaborate on this. Does your stored procedure have any parameters? How are you setting the datasource to the report?
4200 is an ODBC error code which means [b]Syntax error or Access violation[\b]. Search for ODBC error codes in MSDN.
Hope this will help you.
Cheers,
Techi
Hi Susanne,
Are you setting the parameter to the subreports? I mean. are you getting the subreport from the main report, opening the subreport. Then accessing the IParameterDefinition object and setting the values to it?
From the main Report object, you have to get a handle to each of the...
Hi Krisha kumar,
You can base your datasource to be ADO recordset. You will just have to create the .rpt file to use the ADO driver(Crdb_ado.dll).
Execute the stored procedure and send the recordset to CR, this is more reliable than passing the stored procedure to CR, because CR has to execute...
Hi,
Are you talking about the Crystal designer window. Then you will need the CRDesignerCtrl(CRDesignerCtrl.dll) instead of the CRViewer.
Then you need to call
m_CRDesignerCtrl1.ReportObject = CrystalReport
Cheers.
Hi all,
When you use ADO Recordsets as your datasourse, CR requires it to be a clientside cursor, or else you will not get all the rows back.
So use AdoConnection.CursorLocation = adUseClient;
I didn't find any documentation in this regard, just found out while working on my app here. This will...
I have CR9 installed on my primary machine. I searched my complete harddrive for crsource.tlb, but could not find it.
However I have a secondary pc on which I have CR8.5 installed, I found the crsource.tlb on the 2nd one. So I think, crsource.tlb is not part of CR9, but have not verified it with...
I haven't used this CRDataSource object in CR8.5. Which dll is it from. I have CR9 installed on my machine currently. If you tell me which dll the object is part of I can find out for you.
Cheers
Hi,
This is just a suggestion.
Since you are passing a sored procedure and the problem is(what I understand) when the parameters are prompted. Now create a temporary SP and put your actual SP with parametrs in it. I mean
Creat proc TempProc as
Exec ActualSP Param1,Param2
go.
You have to...
Hi Brian,
Since you are using the TAble.SetDatasource method. The best way to send your data is to pass ado recordset as the datasource to the Table.SetDatasource method. In this case you will have to convert the report to use the ADO driver. In this way you are not asking crystal to do any...
Hi,
You can do it the same way as you do it for the report, except that in the case of the subreport, you have to first get the handle to the subreport from the report object. Then write the same code with SubReport instead of Report object.
Cheers,
Techi
Hi Flupke,
Depends.exe is the dependency walker, its a tool that is part of Visual Studio. Open Depends from the "Microsoft Visual Studio6.0 Tools". Then Choose File-Open and select the dll whose dependency you want to check. It will list all the dependency dlls for the dll you have...
Hi CRM,
I'm pasting the same answer I had for almost the same question from Michelle for "PAssing datasource to Subreports". Let me know if this helps.
For a subreport. you have to get all the subreports from your report object, loop through each subreport open it and set the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.