on 02-10-2019 6:30 AM
Hi SAP workers, is a pleasure to join at this community.
This is my first question and I want to explain the situation.
I use Crystal reports (version CRforVS_13_0_21) in Visual Studio 2017 in 64 bits.
Then, I have a report that functions very well in my PC, but when I try to export to PDF in the publish web site (in IIS) throws me the next error:
I don´t understand why is show me that line.
My connection is ODBC (RDO) type (I use a dataset to load the report).
The code for load the report is:
//First use this instruction to load the report and save in a session variable.
PDFOC rpt1 = new PDFOC();
if (txtNOC.Text.Length > 0)
{
string repaxu = txtNOC.Text;
repaxu = repaxu.Replace("OC", "");
rpt1.SetParameterValue("id Compra", Int32.Parse(repaxu));
}
else
{
rpt1.SetParameterValue("id Compra", Int32.Parse("0"));
}
crvoc.ReportSource = rpt1;
Session["reporte"] = rpt1;
//Next, after button click, I load the session and export to pdf
PDFOC rpt1 = (PDFOC)Session["reporte"];
rpt1.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, true, "Orden de Compra");
Please help me, I don´t understand where is the error.
Thank you so much, have a nice weekend.
Sounds like the app can't find the 64 bit database driver your report uses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So it works with saved data but you can't connect when refreshing so it's likely a DB client problem.
Your app depends on the runtime and client it needs, so if IIS is running in 64 bit mode you need to 64 bit Client installed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for help me. I continue with the problem. But now, I discover other detail:
The datasource and the DataTable are working good. Therefore, I search more and I saw a detail:
When I initialize the instance of mi report and I want to set the datasource, always is nul, never changes even though I verify the dataset is loading information for the database.
Then...can you guide me about what error may be?
Thank you so much.
If you just preview the report and use the Viewers Export feature does that work?
Use Fiddler to see what it says, likely need to add a share on the viewer folder with full read/write and add permissions to the \Temp folder as well.
Is IIS running in 32 or 64 bit mode?
Did you install the same MSI package?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I finally get the error. When I do the report and I pass the parameter in the file, the export only functions with the same value typed in the visual studio (in the localhost and the publish works), but when I put a diferent value at the parameter in the .rpt, then the connection fails and the error appears.
The conecction to DataBase is for a remot server (i dont have installed the mysql, because I connect to a server) but the connector is already installed.
I think the IIS run in 64 bits. After searching, I can find why the report have that behavior.
Remove the code to set parameter value, it should prompt for log on info and the parameter prompt should pop up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you are setting the parameter before opening the report.
Try opening the report and then setting the parameter values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.