Hi,
I have the images in a folder and the path is stored in a table for each record. Each record in the table is associated with a different image. I'm able to load the images dynamically in the crystal report. But when i create a Package using the Package & Deployment wizard, the images are not being displayed. Instaed the name of the images is displayed in that area.
Actually I use the OLE object to dispaly the image. and below is the code I have written
I'm using VB 6 and Crystal Reports 8.5
Private Sub Section6_Format(ByVal pFormattingInfo As Object)
If Field5.Value <> "" Then Picture1.SetOleLocation Field5.Value
End Sub
where field5 is the Path field placed in the report.
Please help. Its very very very urgent.
Thanks & Regards,
Venkatesh.Rplz tell how did u manage to change the image dynamicaly with cr 8.5....its really very urgent|||Attached is a zip file containing a sample project. Hope this will help you.
Regards,
Venkatesh.R|||Attached is a Sample project as a zip file. Hope this will help you.|||thanx a lot for ur help....i'll give it a try...bye for now..
Showing posts with label path. Show all posts
Showing posts with label path. Show all posts
Monday, March 19, 2012
Sunday, March 11, 2012
Crystal Report parameter dialog box...please help!
Hi,
This is what i am doing:-
ReportDocument rdReport = new ReportDocument();
rdReport.Load("ReportLocation"); //ReportLocation is the file path.
rdReport.SetDataSource(dtsReportData); //dtsReportData is a DataSet that is populated at runtime.
crv.ReportSource = rdReport; //crv is a CrystalReportViewer on the win form.
I developed my app in VS 2003 and it was all running very smoothly. I recently migrated it to VS2005 and then I started getting this problem.
Although I dont think this is a VS 2005 issue; but something with CR
itself.
I'll try to explain my problem in detail.
I am using Crystal Reports XI; VS 2005; SQL Server 2000;
For all my reports, the reports' datasource is a Stored Procedure. And
in most cases than not, these are paramaterised SP's.
In my application, I have a listbox with a list of available reports.
The user then selects to view one report. This then loads up a
dynamically generated form with a tabpage for each of the parameters
that the Stored Procedure needs. The user then enters values for each
of the parameters. I then create a SQL statement( something like
...execute MyStoredProc value1 value2) where value1 etc are the values
the user entered for the parameters on the dynamyically generated form.
The resultant recordset is then stored into a DataSet object.
I then load the report into a ReportDocument object ie
rdReport.Load("ReportLocation"); assign the DataSet as the
ReportDocuments' Datasource ie rdReport.SetDataSource(dtsReportData);
and finally assign the ReportDocument to the CrystalReportViewer.
As i mentioned earlier, this was all working smoothly untill now...I am
getting the default CR "Enter Parameters" dialog and I havent got a
clue as to what has triggered this behaviour.
It is not possible for me to know how many parameters a stored
procedure for a report will contain and what those parameters will be
for reports designed in the future for the client.
I am pretty new to the world of reporting so excuse my
explanation...if you need any further information to understand my
problem, please let me know. I will really appreciate any help that you
can provide.
Thanks,
Mounil.You need to supply the parameters in front end application and set EnablePopup menu property to false
This is what i am doing:-
ReportDocument rdReport = new ReportDocument();
rdReport.Load("ReportLocation"); //ReportLocation is the file path.
rdReport.SetDataSource(dtsReportData); //dtsReportData is a DataSet that is populated at runtime.
crv.ReportSource = rdReport; //crv is a CrystalReportViewer on the win form.
I developed my app in VS 2003 and it was all running very smoothly. I recently migrated it to VS2005 and then I started getting this problem.
Although I dont think this is a VS 2005 issue; but something with CR
itself.
I'll try to explain my problem in detail.
I am using Crystal Reports XI; VS 2005; SQL Server 2000;
For all my reports, the reports' datasource is a Stored Procedure. And
in most cases than not, these are paramaterised SP's.
In my application, I have a listbox with a list of available reports.
The user then selects to view one report. This then loads up a
dynamically generated form with a tabpage for each of the parameters
that the Stored Procedure needs. The user then enters values for each
of the parameters. I then create a SQL statement( something like
...execute MyStoredProc value1 value2) where value1 etc are the values
the user entered for the parameters on the dynamyically generated form.
The resultant recordset is then stored into a DataSet object.
I then load the report into a ReportDocument object ie
rdReport.Load("ReportLocation"); assign the DataSet as the
ReportDocuments' Datasource ie rdReport.SetDataSource(dtsReportData);
and finally assign the ReportDocument to the CrystalReportViewer.
As i mentioned earlier, this was all working smoothly untill now...I am
getting the default CR "Enter Parameters" dialog and I havent got a
clue as to what has triggered this behaviour.
It is not possible for me to know how many parameters a stored
procedure for a report will contain and what those parameters will be
for reports designed in the future for the client.
I am pretty new to the world of reporting so excuse my
explanation...if you need any further information to understand my
problem, please let me know. I will really appreciate any help that you
can provide.
Thanks,
Mounil.You need to supply the parameters in front end application and set EnablePopup menu property to false
Thursday, March 8, 2012
Crystal Report Error
Hi,
After putting the crystalreportviewer into a form in visual studio .Net, I have choosen the DataBindings properties and type the path of the report source inside. The display in the design window of visual studio can see the report output but when I press F5 to run the debug, the browser came out the following error messge. Does anyone help to solve it?
Thank you.
Server Error in '/WebApplication2' Application.
------------------------
Load report failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load report failed.
Source Error:
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <form id="Form1" method="post" runat="server">
Line 14: <CR:CrystalReportViewer id=CrystalReportViewer1 style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 8px" runat="server" Width="936px" Height="1044px" ReportSource='<%# "C:\Program Files\Microsoft Visual Studio .NET 2003\Crystal Reports\Samples\Reports\General Business\World Sales Report.rpt" %>' SelectionFormula="{Customer.h~~Z}>0">
Line 15: </CR:CrystalReportViewer>
Line 16: </form>
Source File: c:\inetpub\wwwroot\WebApplication2\WebForm1.aspx Line: 14
Stack Trace:
[LoadSaveReportException: Load report failed.]
CrystalDecisions.Web.ReportAgent.h()
CrystalDecisions.Web.ReportAgentBase.set_ReportSource(Object value)
CrystalDecisions.Web.ReportAgent.set_ReportSource(Object value)
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSource(Object value)
ASP.WebForm1_aspx.__DataBindCrystalReportViewer1(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication2\WebForm1.aspx:14
System.Web.UI.Control.OnDataBinding(EventArgs e)
System.Web.UI.Control.DataBind()
System.Web.UI.Control.DataBind()
System.Web.UI.Control.DataBind()
WebApplication2.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication2\WebForm1.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032If your application is on Windows Server 2003, then try giving 'Read & Execute' authority to the "Network Service" account on your 'Windows\Temp' folder.
If you are using Windows 2000/Xp, then browse to your Documents and Settings folder. There you will find a folder by the name same as your machine name. Go into that folder and assign 'Read & Execute' authority to the 'ASPNET\Local Settings\Temp' folder.
If this doesnt work then try assigning full authority to the above specified folders.
Remeber that this solution will work if your rpts build action is 'Embedded Resource'. I am not sure about the other build actions.
Hope this helps!
Regards!|||i have the same problem
i allready try to change the security permission but it didn't effect
After putting the crystalreportviewer into a form in visual studio .Net, I have choosen the DataBindings properties and type the path of the report source inside. The display in the design window of visual studio can see the report output but when I press F5 to run the debug, the browser came out the following error messge. Does anyone help to solve it?
Thank you.
Server Error in '/WebApplication2' Application.
------------------------
Load report failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Load report failed.
Source Error:
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <form id="Form1" method="post" runat="server">
Line 14: <CR:CrystalReportViewer id=CrystalReportViewer1 style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 8px" runat="server" Width="936px" Height="1044px" ReportSource='<%# "C:\Program Files\Microsoft Visual Studio .NET 2003\Crystal Reports\Samples\Reports\General Business\World Sales Report.rpt" %>' SelectionFormula="{Customer.h~~Z}>0">
Line 15: </CR:CrystalReportViewer>
Line 16: </form>
Source File: c:\inetpub\wwwroot\WebApplication2\WebForm1.aspx Line: 14
Stack Trace:
[LoadSaveReportException: Load report failed.]
CrystalDecisions.Web.ReportAgent.h()
CrystalDecisions.Web.ReportAgentBase.set_ReportSource(Object value)
CrystalDecisions.Web.ReportAgent.set_ReportSource(Object value)
CrystalDecisions.Web.CrystalReportViewerBase.set_ReportSource(Object value)
ASP.WebForm1_aspx.__DataBindCrystalReportViewer1(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication2\WebForm1.aspx:14
System.Web.UI.Control.OnDataBinding(EventArgs e)
System.Web.UI.Control.DataBind()
System.Web.UI.Control.DataBind()
System.Web.UI.Control.DataBind()
WebApplication2.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication2\WebForm1.aspx.vb:26
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032If your application is on Windows Server 2003, then try giving 'Read & Execute' authority to the "Network Service" account on your 'Windows\Temp' folder.
If you are using Windows 2000/Xp, then browse to your Documents and Settings folder. There you will find a folder by the name same as your machine name. Go into that folder and assign 'Read & Execute' authority to the 'ASPNET\Local Settings\Temp' folder.
If this doesnt work then try assigning full authority to the above specified folders.
Remeber that this solution will work if your rpts build action is 'Embedded Resource'. I am not sure about the other build actions.
Hope this helps!
Regards!|||i have the same problem
i allready try to change the security permission but it didn't effect
Crystal Report Database Path question
VB 6 Enterprise Edition; Crystal Report XI Developer Edition
I don't understand, did I phrase my previous question wrong?
Let me restate it:
From a VB 6 application, how do you code to tell Crystal Reports where the database tables are located?
This is the code I use to get the report(s)
Set craxreport = craxapp.OpenReport(App.Path & "\" & ReportName)
craxreport.DiscardSavedData
CrystalActiveXReportViewer1.Refresh
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
SamProblem Resolved:
Here is the code in case anyone needs it:
Dim dbTable As CRAXDDRT.DatabaseTable
Set dbTable = craxreport.Database.Tables(1)
craxreport.DiscardSavedData
dbTable.Location = App.Path & "\BOM.mdb"
CrystalActiveXReportViewer1.Refresh
Call CrystalActiveXReportViewer1_RefreshButtonClicked(True)
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
I don't understand, did I phrase my previous question wrong?
Let me restate it:
From a VB 6 application, how do you code to tell Crystal Reports where the database tables are located?
This is the code I use to get the report(s)
Set craxreport = craxapp.OpenReport(App.Path & "\" & ReportName)
craxreport.DiscardSavedData
CrystalActiveXReportViewer1.Refresh
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
SamProblem Resolved:
Here is the code in case anyone needs it:
Dim dbTable As CRAXDDRT.DatabaseTable
Set dbTable = craxreport.Database.Tables(1)
craxreport.DiscardSavedData
dbTable.Location = App.Path & "\BOM.mdb"
CrystalActiveXReportViewer1.Refresh
Call CrystalActiveXReportViewer1_RefreshButtonClicked(True)
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
Wednesday, March 7, 2012
Crystal Report
I am using VB 6 with MS Access as Back End. I saved a path name of a text file in a field of Access MDB. I am using Crystal report 8 for creating reports. Will anybody help me to print the contents of the file stored in the field in the crystal report? (For eg the field contains the value "c:\project\test.txt" How to print the contents in the "detail" portion of the crystal report. When I select the field, the file name comes not the contents). Pl. help me.
Meenakshi.RMeenakshi,
I dont think there is a way to do exactly you want. But you can use heperlink option. Right Click on any field; Goto Format Field and Select HyperLink and File and Select the text file. When running the report, if you click that Field, then the text file will be opened.|||Madhi,
Each record has a different text file. With your suggestion, I have to make a permanent link to that text file. How to get different text file links? pl. guide.
Meenakshi.R|||Meenakshi,
If each record has to show different file, then you can use formula.
Do the same procedure that I told you except that instead of selecting the file, there is button labelled x-2 near text box. Click that and if the field it self represents the file name, then write this
{FieldName}|||Madhi,
I tried with your option. But when the report is run, the value stored in the field (ie) the file name comes without any hyperlink. No provision for clicking. Kindly guide me.
Meenakshi.R|||Which version of Crystal Report are you using?|||Sir,
The version of the crystal report is 8.0
Meenakshi.R|||Meenakshi,
I dont know where it goes wrong
Refer this (http://support.businessobjects.com/library/kbase/articles/c2006151.asp)|||Madhi,
Referred the article. Done as per the instructions. But still I am getting the field value only without the hyperlink. Any other solution?
Meenakshi.R|||I have a report where each record brings back a field with the path of a different image file. Each record in the details section prints out the word "Image" as a link, which I have set up as follows:
1. Created a formula which has nothing more in it than the word "Image". Placed into details section of report.
2. Click Format Field on this formula, go to Hyperlink tab. Choose 'A Website on the Internet', then open the formula box for Website Address.
3. In here, place the field from the database.
My images are available via a http server, but you may choose to use one of the other options there instead (eg 'A File' instead of 'A Website on the Internet'.|||Hai,
Created a formula. Placed in the detail section. Using format option, I have made a hyperlink by choosing the option Hyperlink from a file. With the formula button (hyperlink screen), I specified the field value. During run time, the formula name comes (but without hyperlink option). What to do?|||Should work, try debugging. I'd suggest copying the formula you are using to create the hyperlink into a regular formula and seeing what comes out, ie what it is trying to use to create this hyperlink. You might find that it has an invalid path, or is coming back blank, etc...|||Tried tried. I saved the report with field in the detail section by choosing "a file" from the hyperlink option, run the report, the field value stored in the field comes without hyperlink option. When viewing the report in design view, the hyperlink option shows 'a website on the internet'. I don't know why? pl. explain in detail.
Meenakshi.R|||My suggestion is that your file path is invalid. Test to see what CR thinks is in that field, for starters.
Ie, if you have a url stored in your database field and http:// already exists, you could end up with something like http://http://google.com
In my report, I can click on the field to open a file, provided that file path is correct. I typed C:\temp\test.txt into the File Name box. However, changing it to C:\temp\test1.txt simply does nothing as this file does not exist.
Also note that the field may be a hyperlink but will appear to be just a regular field until you mouse over. (ie, if you want it to appear as a hyperlink should then you will have to underline and colour it yourself).|||Sir,
I have created a fresh report and do all the things. When I click the preview button in Crystal report screen, I am able to click the hyperlink, and the corresponding file stored in the field gets opened. When this report is accessed via a VB program coding, simply the file name is displayed and I could not click the hyperlink. Pl. help me.
Meenakshi.R
Meenakshi.RMeenakshi,
I dont think there is a way to do exactly you want. But you can use heperlink option. Right Click on any field; Goto Format Field and Select HyperLink and File and Select the text file. When running the report, if you click that Field, then the text file will be opened.|||Madhi,
Each record has a different text file. With your suggestion, I have to make a permanent link to that text file. How to get different text file links? pl. guide.
Meenakshi.R|||Meenakshi,
If each record has to show different file, then you can use formula.
Do the same procedure that I told you except that instead of selecting the file, there is button labelled x-2 near text box. Click that and if the field it self represents the file name, then write this
{FieldName}|||Madhi,
I tried with your option. But when the report is run, the value stored in the field (ie) the file name comes without any hyperlink. No provision for clicking. Kindly guide me.
Meenakshi.R|||Which version of Crystal Report are you using?|||Sir,
The version of the crystal report is 8.0
Meenakshi.R|||Meenakshi,
I dont know where it goes wrong
Refer this (http://support.businessobjects.com/library/kbase/articles/c2006151.asp)|||Madhi,
Referred the article. Done as per the instructions. But still I am getting the field value only without the hyperlink. Any other solution?
Meenakshi.R|||I have a report where each record brings back a field with the path of a different image file. Each record in the details section prints out the word "Image" as a link, which I have set up as follows:
1. Created a formula which has nothing more in it than the word "Image". Placed into details section of report.
2. Click Format Field on this formula, go to Hyperlink tab. Choose 'A Website on the Internet', then open the formula box for Website Address.
3. In here, place the field from the database.
My images are available via a http server, but you may choose to use one of the other options there instead (eg 'A File' instead of 'A Website on the Internet'.|||Hai,
Created a formula. Placed in the detail section. Using format option, I have made a hyperlink by choosing the option Hyperlink from a file. With the formula button (hyperlink screen), I specified the field value. During run time, the formula name comes (but without hyperlink option). What to do?|||Should work, try debugging. I'd suggest copying the formula you are using to create the hyperlink into a regular formula and seeing what comes out, ie what it is trying to use to create this hyperlink. You might find that it has an invalid path, or is coming back blank, etc...|||Tried tried. I saved the report with field in the detail section by choosing "a file" from the hyperlink option, run the report, the field value stored in the field comes without hyperlink option. When viewing the report in design view, the hyperlink option shows 'a website on the internet'. I don't know why? pl. explain in detail.
Meenakshi.R|||My suggestion is that your file path is invalid. Test to see what CR thinks is in that field, for starters.
Ie, if you have a url stored in your database field and http:// already exists, you could end up with something like http://http://google.com
In my report, I can click on the field to open a file, provided that file path is correct. I typed C:\temp\test.txt into the File Name box. However, changing it to C:\temp\test1.txt simply does nothing as this file does not exist.
Also note that the field may be a hyperlink but will appear to be just a regular field until you mouse over. (ie, if you want it to appear as a hyperlink should then you will have to underline and colour it yourself).|||Sir,
I have created a fresh report and do all the things. When I click the preview button in Crystal report screen, I am able to click the hyperlink, and the corresponding file stored in the field gets opened. When this report is accessed via a VB program coding, simply the file name is displayed and I could not click the hyperlink. Pl. help me.
Meenakshi.R
Crystal 8.5 Cant Change Database Path in Code
Hi everyone,
I have used Crystal for about 7 years, and have never had this problem before. I am using Crystal 8.5 Developer, on WinXP Pro, with Delphi4 and using an Advatage database, I am trying to change the data location in code
eg: frmMain.crpe.Tables[inTbNo].Path := stDBPath; // this has worked for years.
I have also tried hard coding just to test it:
frmMain.crpe.Tables[0].Path := '\\Server\Server\Gigasoft\dbStockOrderBeta';
frmMain.crpe.Tables.Propagate := True;
// this still does not work
I have formatted the machine and reloaded only the bare minimum of software just incase there was some conflict, still no luck.
I have permanent tables in 1 folder and temp tables in another, the reports only use 1 or the other not both.
The reports that use the permanent tables are the ones causing the problem.
The reports using the temp tables seem to work OK, as they are constantly changing location to the temp locations depending on the user who is logged in.
I hope someome has had this problem and solved it before.
Thanks in Advance for any help
Daryl...What is the error you get?
Check the path is shared and accessible|||There is no error msg, it just doesn't change the database path at all. The path is accessible by crystal because data for the temp table reports are in a folder 1 below the main folder and most of the time they seem to work.
Thanks
Daryl...
I have used Crystal for about 7 years, and have never had this problem before. I am using Crystal 8.5 Developer, on WinXP Pro, with Delphi4 and using an Advatage database, I am trying to change the data location in code
eg: frmMain.crpe.Tables[inTbNo].Path := stDBPath; // this has worked for years.
I have also tried hard coding just to test it:
frmMain.crpe.Tables[0].Path := '\\Server\Server\Gigasoft\dbStockOrderBeta';
frmMain.crpe.Tables.Propagate := True;
// this still does not work
I have formatted the machine and reloaded only the bare minimum of software just incase there was some conflict, still no luck.
I have permanent tables in 1 folder and temp tables in another, the reports only use 1 or the other not both.
The reports that use the permanent tables are the ones causing the problem.
The reports using the temp tables seem to work OK, as they are constantly changing location to the temp locations depending on the user who is logged in.
I hope someome has had this problem and solved it before.
Thanks in Advance for any help
Daryl...What is the error you get?
Check the path is shared and accessible|||There is no error msg, it just doesn't change the database path at all. The path is accessible by crystal because data for the temp table reports are in a folder 1 below the main folder and most of the time they seem to work.
Thanks
Daryl...
Subscribe to:
Posts (Atom)