on 05-05-2006 12:09 PM
Good morning
In my Add-Ons I use the Crystal Reports 9 and It works good.
Now I have the necessity to bring up to date for the Crystal Reports XI.
I have already modified the DLL'S and the references and now my add-on already opens reports, but the button to print does not open the box of selection of the printers.
All the other buttons works,but not the button print.
I have SB1 2004A (6.70.193) SP:00 PL:43 and the Add-On is elaborated in the Visual Studio 2003.
Somebody can help me in this issue?
Thank you in advance
Sérgio Sousa
hi
Still in my problem.
if to substitute the code line:
crxReport.SetDialogParentWindow(a.ToInt32)
for the following one:
crxReport.PrinterSetup(a.ToInt32)
crxReport.PrintOut(False)
the dialog box of the printer selection open before te report Viewer, but the printer button continues not work.
Sérgio Sousa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my add-on I don't use the print button on the actual viewer, instead invoke the print dialog from the business one print button on the b1 toolbar.
You can easily remove the print button from the viewer form using:
objViewer.EnablePrintButton = False
You could then use your working code (printersetup/printout) and tie these to the B1 menu events for the print / print preview as appropriate. I took this approach to begin with as it offers a much more integrated feel to the application.
John.
Hi, I migrated to the Crystal 10 to Crystal XI, but I can not see the SAP toolbar in Crystal XI, do you know why this happen?
The infoview for BOXI Portal works ok.
Lulu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi john
thanks for your help.
so it was worried about the button of viewer that I did not remember the button of sap.
it is to work perfectly.
Sérgio Sousa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have implemented the same solution using C#. But in my case printing is still not working.
-- Code fragment --
if (menupressed == sbo.sapPrintPage)
{
CRAXDRT.Report rdReport = (CRAXDRT.Report)
crView.ReportSource;
// rdReport.PrinterSetup(winHandle);
rdReport.PrintOut(true, 1, true, 1, 1000);
// crView.PrintReport(); // Initialized ActiveX viewer
}
-- end fragment --
The rdReport.PrinterSetup(winHandle) method is working but the .printOut and the .PrintReport() are not. When I feed wrong parameters into the .PrintOut method a COMException appears, so the COMObject is invoked I think.
Did I miss something?
I welcome any help,
TIA,
Frank.
good morning
I continue with this problem.
Somebody can help me in this issue?
already not to know that to make.
Thank you in advance
Sérgio Sousa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi john
i have this function for open te SAP form with CRview for view the report.
Private Function LoadCrViewer(ByVal crxReport As CRAXDRT.Report) As Boolean
Dim SBOFormCreationParams As SAPbouiCOM.FormCreationParams
Dim SBOCRViewer As SAPbouiCOM.ActiveX
Dim SBOForm As SAPbouiCOM.Form
Dim SBOItem As SAPbouiCOM.Item
Dim strFormCount As String
SBOFormCreationParams = SBOApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
SBOFormCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
SBOFormCreationParams.FormType = "XX_INCRPT01"
strFormCount = SBOApplication.Forms.Count.ToString
SBOFormCreationParams.UniqueID = "XX_INCRPT01" & strFormCount.PadLeft(3, "0")
'Add new form
SBOForm = SBOApplication.Forms.AddEx(SBOFormCreationParams)
SBOForm.Left = 0
SBOForm.Top = 0
SBOForm.Width = SBOApplication.Desktop.Width
SBOForm.Height = SBOApplication.Desktop.Height
SBOForm.Title = "inCentea - Mapas"
'Add CRViewer item
SBOItem = SBOForm.Items.Add("XX_CR01", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
SBOItem.Left = 0
SBOItem.Top = 0
SBOItem.Width = SBOForm.ClientWidth
SBOItem.Height = SBOForm.ClientHeight
' Create the new activeX control
SBOCRViewer = SBOItem.Specific
SBOCRViewer.ClassID = "CrystalReports11.ActiveXReportViewer.1"
SBOCRViewerOBJ = SBOCRViewer.Object
Dim MyProcs() As Process
Dim i, ID As Integer
Dim a As System.IntPtr
'Try Send the handle of SAP window
SBOApplication.Desktop.Title = "SBO under " + SBOApplication.Company.UserName
MyProcs = Process.GetProcessesByName("SAP Business One")
For i = 0 To MyProcs.Length - 1
If MyProcs(i).MainWindowTitle = SBOApplication.Desktop.Title Then
ID = MyProcs(i).Id()
a = MyProcs(i).MainWindowHandle
crxReport.SetDialogParentWindow(a.ToInt32)
End If
Next
SBOCRViewerOBJ.ViewReport()
SBOForm.Visible = True
Return True
End Function
where is the error? the print button dont work!! Dont open the dialog box for select the printer.
i tried the post of john, bat this dont work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John
how i get de handle of the main Business One application?
He is possivel to send me an example?
Sory, but still I am new in this
Sérgio Sousa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I encountered the same issue when upgrading to XI recently. I am using the Crystal RDC and got round the problem my calling <b>SetDialogParentWindow</b> on my <b>CRAXDRT.Report</b> object and passing it the window handle of the main Business One application.
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.