English 中文(简体)
在直接设定数据源时,如何防止Crystal Reports在直接设定数据源时要求证书/参数?
原标题:How to prevent Crystal Reports from requesting credentials/parameters when setting the datasource directly?

我曾经用反射来提取水晶报告所使用的 sql 查询。 然后,我用这个提取的 sql (非常小心) 来填充数据集, 然后通过 SetData 源代码方法将该数据集与我的 ReportDocument 对象绑在一起。 所有这一切都很顺利, 但每当我试图查看或导出我的报告时, 它要求我提供我的证书/参数值, 这违背了人工查询/ 约束我数据的目的 。

当我的报告数据被挤进报告时(即我能否让报告不直接从数据库中刷新空格? )我曾经尝试设置“保存数据”值,但似乎没有帮助。

最佳回答

能否帮助:

ReportDocument cryReportDocument = .......;
cryReportDocument.SetDatabaseLogon("userName", "password");
cryReportDocument.SetParameterValue("parameterName", value);
CrystalReportViewer1.ReportSource = cryReportDocument;    
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签