hi,
I am facing a problem of dynimically changing he size of a crystal report.
Let me define it like this : I have designed a report for a A3 page and now they want me design the same report to be printed in A3 and A4 . Is there any way that we can pass aurguments and change the size of data dynimicallyCant you use Printer collection property of Printers?
You need to do this in the Front End Applicationsql
Showing posts with label crystal. Show all posts
Showing posts with label crystal. Show all posts
Thursday, March 22, 2012
Wednesday, March 21, 2012
Dynamic Linking - Crystal XI - Image doesnt change
Im using desktop Crystal XI - connecting to a SQL database via ODBC connection.
Here is the problem: I would like to display a different excel file with each record in the report using dynamic linking.
Each record has a related document (xls) that is stored on a different server than the database. I have access to the folder on the server that contains all of the documents (I connect to this server by mapping a drive via windows explorer). I can manually add a document from the folder but the document doesnt change for each record, it just repeats the document that was added manually.
Ive created a formula field (based on records in the SQL db) to generate the link/document location:
"E:\LCM-" + cstr({mwebDocument.Doc_Ent_ID}, 0, "") + "\" + ({mwebDocument.Doc_File_Name}) + "_" + cstr({mwebDocument.Doc_ID}, 0, "") + "_1.xls"
(example return: E:\LCM-289\KC 2554 Testing Backup NOPAs_9609_1.xls)
I then reference the formula field in the graphic location.
So I know I can access the server/files since I can manually add a file.
I know that the file does display because the manually added file displays for each record (even though it doesnt change).
I know that the link is changing for each record because Ive made it a separate field and can verify its correctness.
Can anyone think of a reason why the object/file is not changing for each record?
Appreciate the help.Why don't u use the formula directly in detail section as a hyperlink..|||Thanks for the response - The major reason for not using a hyperlink is that we would like to distribute this report to people outside of our company (who wouldn't have access to the server/files). This was the initial reason to display the file in the report.
Here is the problem: I would like to display a different excel file with each record in the report using dynamic linking.
Each record has a related document (xls) that is stored on a different server than the database. I have access to the folder on the server that contains all of the documents (I connect to this server by mapping a drive via windows explorer). I can manually add a document from the folder but the document doesnt change for each record, it just repeats the document that was added manually.
Ive created a formula field (based on records in the SQL db) to generate the link/document location:
"E:\LCM-" + cstr({mwebDocument.Doc_Ent_ID}, 0, "") + "\" + ({mwebDocument.Doc_File_Name}) + "_" + cstr({mwebDocument.Doc_ID}, 0, "") + "_1.xls"
(example return: E:\LCM-289\KC 2554 Testing Backup NOPAs_9609_1.xls)
I then reference the formula field in the graphic location.
So I know I can access the server/files since I can manually add a file.
I know that the file does display because the manually added file displays for each record (even though it doesnt change).
I know that the link is changing for each record because Ive made it a separate field and can verify its correctness.
Can anyone think of a reason why the object/file is not changing for each record?
Appreciate the help.Why don't u use the formula directly in detail section as a hyperlink..|||Thanks for the response - The major reason for not using a hyperlink is that we would like to distribute this report to people outside of our company (who wouldn't have access to the server/files). This was the initial reason to display the file in the report.
Monday, March 19, 2012
Dynamic Group Sorting in Crystal Report
i am using crystal report application in visual studio .net. Now, I make one crystal report, has 5 groups. Now, I want to change their order from VB .net application. What to do for that?? I'm new in crystal report.... I guess you need to organize your dynamic grouping in your report. You can use a parameter(s) for that, it will let you/user to select/change a group. Then create a formula based on the parameter response.
For example:
I would create a parameter to allow you/user to select 'SDate' Shipping Date or 'CustID' - Customer ID.
Then I would write a formula for my 1st group @.Group1:
If {?Group1}='SDate' then {table.shipping_date} else {table.CustomerID}
For my 2nd group, I would write a formula @.Group2:
If {?Group1}='SDate' {table.CustomerID} else {table.shipping_date}
After that, I would grouped my records on @.Group1 and on @.Grop2.
----
Or you can create one parameter per group and then a formula based on that parameter (1 per group as well):
For your 1st group I would create a parameter {?Group1} which allows me to select 'SDate' for shipping date, 'CustID' for CustomerID, 'Country' for country code etc.
Then create a formula @.Group1:
If {?Group1}='SDate' then {table.shipping_gdate} else
If {?Group1}='CustID' then {table.CustomerID} else
If {?Group1}='Country' then {table.CountryCode} else
For my 2nd group I would create a parameter {?Group2} and then a formula @.Group2:
If {?Group2}='Source' then {table.origination_number} else
If {?Group2}='DestCity' then {table.destination_city} else
If {?Grop2}='Carrier' then {tabme.CarrierID} else
.
.
.
You can create as many group options as you need.
I hope this will be helpful
For example:
I would create a parameter to allow you/user to select 'SDate' Shipping Date or 'CustID' - Customer ID.
Then I would write a formula for my 1st group @.Group1:
If {?Group1}='SDate' then {table.shipping_date} else {table.CustomerID}
For my 2nd group, I would write a formula @.Group2:
If {?Group1}='SDate' {table.CustomerID} else {table.shipping_date}
After that, I would grouped my records on @.Group1 and on @.Grop2.
----
Or you can create one parameter per group and then a formula based on that parameter (1 per group as well):
For your 1st group I would create a parameter {?Group1} which allows me to select 'SDate' for shipping date, 'CustID' for CustomerID, 'Country' for country code etc.
Then create a formula @.Group1:
If {?Group1}='SDate' then {table.shipping_gdate} else
If {?Group1}='CustID' then {table.CustomerID} else
If {?Group1}='Country' then {table.CountryCode} else
For my 2nd group I would create a parameter {?Group2} and then a formula @.Group2:
If {?Group2}='Source' then {table.origination_number} else
If {?Group2}='DestCity' then {table.destination_city} else
If {?Grop2}='Carrier' then {tabme.CarrierID} else
.
.
.
You can create as many group options as you need.
I hope this will be helpful
Sunday, March 11, 2012
Dynamic Font In Crystal Report
Hi!
I have created a report and now i want that when user takes the printout, he can select the font style and size ...........Is it possible and if yes then pls let me know..........
ThanksI dont think it is possible
You need to design the report with the font client wants
I have created a report and now i want that when user takes the printout, he can select the font style and size ...........Is it possible and if yes then pls let me know..........
ThanksI dont think it is possible
You need to design the report with the font client wants
Wednesday, March 7, 2012
Dynamic database in Web Service
I have a question about changing the database source dynamically in a Web Service. I have created a Web Service for a Crystal Report using VS .NET 2003. I use Crystal Reports Web Viewer to display the report in an ASP.NET page. My database is an Access database and I have a copy of the report source database for each unique user to the Web page. I read the post on changing the database dynamically but it seems to be changed on the Crystal Reports viewer and not in the Crystal report which would be done in the Web Service. I have tried setting debug stops in the code behind module in the Web Service but the debugger does not seem to reach the breakpoints. Can you offer any advice on modifying the database connections dynamically in the Web Service?I have a similar problem. I can set the viewer db properties when i declare a web service but i cant use report engine object model. Can you tell me how you have accomplished that|||I found it fairly easy to bind to a single database. I merely opened the Crystal Report in Visual Studio .NET. In the Report Design view, I right click on the Database Fields in the Field Explorer and Select "Set Location". I defined an ODBC connection to the database and bind the report to that. Turning the report into a Web Services was easy as well. I added the report to a project that I was using to define Web Services. Then right click on the project and select Publish the report as a Web Service. Visual Studio does all the rest. Unforunately all of this is a design/build time and I haven't figured out how to change the database during runtime.
Hope this helps you.|||thanks for the reply. However that is not my problem. I want to be able to export these reports as well. Exporting code only works from report engine object model and you cant use it from client application if your reports are published as web service. That is my complication. I can set parameters, db changes at runtime when i do web services. Still thanks for the reply|||I'm sorry. I guess I did not understand the question about the the report engine object model. I also am not sure what you are referring to on exporting the reports. I haven't done anything beyond the defaults that you get when Visual Studio creates the Web Service except to connect it to the Crystal Reports Web Viewer in the ASPX pages. What did you mean when you said you can set parameters, db changes at runtime through web services? My main question is how to specify a different database file(Access database) at runtime.|||This is how u do it with web services and a strored procedure as your data source. If you use tables as data source. loop through all the tables and set the propetries of the tables(uid,pwd,dbname, servername)
Hope this helps.
Exporting questions is i have to export the reports in crystal to excel, pdf, word format.That can rbe done using viewer object model and i have to do it in web services but i dont know how to modify the engine in the web service code. I have the same problem you have. U cant debug any code in web services
Dim mytablelogoninfos As New CrystalDecisions.Shared.TableLogOnInfos
Dim mytablelogoninfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim myconnectioninfo As New CrystalDecisions.Shared.ConnectionInfo
With myconnectioninfo
.UserID = "uid"
.ServerName = "servername"
.Password = "pwd"
.DatabaseName = "dbname"
End With
mytablelogoninfo.TableName = "cspAppointmentsReport;1"
With mytablelogoninfo.ConnectionInfo
.UserID = "uid"
.Password = "pwd"
End With
mytablelogoninfo.ConnectionInfo = myconnectioninfo
mytablelogoninfos.Add(mytablelogoninfo)
CrystalReportViewer1.LogOnInfo = mytablelogoninfos
CrystalReportViewer1.ReportSource = New localhost.AppointmentSubReportService|||Now I understand what you mean by exporting and no I haven't tried anything like that yet. Sorry I don't think I can help you.
Thanks for the sample code. I will see if I can make it work for what I'm trying to do. I appreciate the help.
Good luck solving your problem.
Hope this helps you.|||thanks for the reply. However that is not my problem. I want to be able to export these reports as well. Exporting code only works from report engine object model and you cant use it from client application if your reports are published as web service. That is my complication. I can set parameters, db changes at runtime when i do web services. Still thanks for the reply|||I'm sorry. I guess I did not understand the question about the the report engine object model. I also am not sure what you are referring to on exporting the reports. I haven't done anything beyond the defaults that you get when Visual Studio creates the Web Service except to connect it to the Crystal Reports Web Viewer in the ASPX pages. What did you mean when you said you can set parameters, db changes at runtime through web services? My main question is how to specify a different database file(Access database) at runtime.|||This is how u do it with web services and a strored procedure as your data source. If you use tables as data source. loop through all the tables and set the propetries of the tables(uid,pwd,dbname, servername)
Hope this helps.
Exporting questions is i have to export the reports in crystal to excel, pdf, word format.That can rbe done using viewer object model and i have to do it in web services but i dont know how to modify the engine in the web service code. I have the same problem you have. U cant debug any code in web services
Dim mytablelogoninfos As New CrystalDecisions.Shared.TableLogOnInfos
Dim mytablelogoninfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim myconnectioninfo As New CrystalDecisions.Shared.ConnectionInfo
With myconnectioninfo
.UserID = "uid"
.ServerName = "servername"
.Password = "pwd"
.DatabaseName = "dbname"
End With
mytablelogoninfo.TableName = "cspAppointmentsReport;1"
With mytablelogoninfo.ConnectionInfo
.UserID = "uid"
.Password = "pwd"
End With
mytablelogoninfo.ConnectionInfo = myconnectioninfo
mytablelogoninfos.Add(mytablelogoninfo)
CrystalReportViewer1.LogOnInfo = mytablelogoninfos
CrystalReportViewer1.ReportSource = New localhost.AppointmentSubReportService|||Now I understand what you mean by exporting and no I haven't tried anything like that yet. Sorry I don't think I can help you.
Thanks for the sample code. I will see if I can make it work for what I'm trying to do. I appreciate the help.
Good luck solving your problem.
Dynamic Database Connection
Hi,
I done some Crystal reports(10.0) in asp .net using SQL server 2000(DB). While creating the reports, OLE DB Connection Information is must. Now i want to change the Source and Database for all the Reports. I want to do it Dynamically. Could I ?. I want to create reports without giving these(Source and Database) all. That is for each reports I dont want to give Source,Database,User Id and Password.
Pls help me in this regard.almost same problem with mine..
but mine is in report environment in vb6.
i'm not sure, but in vb6 (it think its not quite different :) )
u can do such this ..
firstly u must make a reference to the crystal report.
next...
--create a new Crystal Report object ...
it may looks like this
dim cr as new crystal report object
i think there must be a method of that CR object that could add a new report
hope this gonna help at least give a clue.. since i'm not that expert in .NET tech ..
good luck|||Hi szpilman,
The Problem is while creating the reports we have to give the Source and Database, But we should not do in this method. While creating the reports we should point one thing( It may be DSN).For this , All the reports should point out one (DSN(applies for VB .NET)). Here I want to point out all the reports to one( like DSN). Whenever I want to Change i should change in this Pointed one( like DSN ). Like DSN "i want one", where i can change the Source and Database dynamically.
Thank U
I done some Crystal reports(10.0) in asp .net using SQL server 2000(DB). While creating the reports, OLE DB Connection Information is must. Now i want to change the Source and Database for all the Reports. I want to do it Dynamically. Could I ?. I want to create reports without giving these(Source and Database) all. That is for each reports I dont want to give Source,Database,User Id and Password.
Pls help me in this regard.almost same problem with mine..
but mine is in report environment in vb6.
i'm not sure, but in vb6 (it think its not quite different :) )
u can do such this ..
firstly u must make a reference to the crystal report.
next...
--create a new Crystal Report object ...
it may looks like this
dim cr as new crystal report object
i think there must be a method of that CR object that could add a new report
hope this gonna help at least give a clue.. since i'm not that expert in .NET tech ..
good luck|||Hi szpilman,
The Problem is while creating the reports we have to give the Source and Database, But we should not do in this method. While creating the reports we should point one thing( It may be DSN).For this , All the reports should point out one (DSN(applies for VB .NET)). Here I want to point out all the reports to one( like DSN). Whenever I want to Change i should change in this Pointed one( like DSN ). Like DSN "i want one", where i can change the Source and Database dynamically.
Thank U
Sunday, February 26, 2012
Dynamic Crystal Reports w/ .NET
I am trying to replicate the following screen in a Crystal Reports for .NET.
http://bellsouthpwp.net/w/i/wilburton/Schedule.JPG
I am having problems. You cannot create a formula for the position/width of a box or textbox. Also, there doesn't appear to be a way to write code to format the template as each row is processed. Change the width/left of the boxes only changes the template before the data is processed and the report is created.
I talked to Crystal Reports technical support and there only decent suggestion was to use a bar chart. This almost works but due to the flexibility of the charting components I don't think I will be able to get anything reasonably close to this format.
Any ideas?Maybe a chart would work?
http://bellsouthpwp.net/w/i/wilburton/Schedule.JPG
I am having problems. You cannot create a formula for the position/width of a box or textbox. Also, there doesn't appear to be a way to write code to format the template as each row is processed. Change the width/left of the boxes only changes the template before the data is processed and the report is created.
I talked to Crystal Reports technical support and there only decent suggestion was to use a bar chart. This almost works but due to the flexibility of the charting components I don't think I will be able to get anything reasonably close to this format.
Any ideas?Maybe a chart would work?
Wednesday, February 15, 2012
Dyanamically change database path in crystal reports ver 10. Urgent Need.
hai,
I am developing my application using VB6, Crystal report10, Msaccess.
My problem was i am unable set database path in the crystal report 10 dynamically.
Prev. in crystal report 8.5 i use the connection property SetLogonInfo. But in crystal report 10 the property does't exist. what is the equilvalent property to that.Please reply this message very urgent.
I am developing my application using VB6, Crystal report10, Msaccess.
My problem was i am unable set database path in the crystal report 10 dynamically.
Prev. in crystal report 8.5 i use the connection property SetLogonInfo. But in crystal report 10 the property does't exist. what is the equilvalent property to that.Please reply this message very urgent.
Subscribe to:
Posts (Atom)