我是Crystal Reports的新手,我使用的是Crystal Reports 11.5版本.
我的要求如下:
目前,我正在使用COM对象使用PHP连接到Crystal Report,并且我能够生成示例静态PDF报告.
我的主要任务是通过从MySQL获取值并将值传递给Crystal Reports并生成PDF来在PHP中进行所有处理.我需要帮助才能完成这项任务.如果有人可以提供示例代码那么它会好得多.
这是我到目前为止:
$my_report = "E:\\xampp\\htdocs\\crystal\\Test1.rpt";
$my_pdf = "E:\\xampp\\htdocs\\crystal\\test.pdf";
$o_CrObjectFactory = new COM('CrystalReports11.ObjectFactory.1');
// Create the Crystal Reports Runtime Application.
$o_CrApplication =$o_CrObjectFactory->CreateObject("CrystalDesignRunTime.Application");
//------ Open your rpt file ------
$creport = $o_CrApplication->OpenReport($my_report, 1);
//------ Connect to DB2 DataBase ------
**this is the hard part where I am not able to complete connection to mysql**
$o_CrApplication->LogOnServer('which library','mlims','root','');
//------ Put the values that you want --------
$creport->RecordSelectionFormula="{parameter.id}='1'";
//------ …Run Code Online (Sandbox Code Playgroud) 在我的项目的消息系统,当你从一个用户的消息,你发送一个电子邮件警告说,其他用户发了一个信息给这里查看邮件点击(即帖子的网址),所以如果用户没有在系统登录他重定向到登录页面,登录后它应该回到referer url.我在核心文件夹中创建了一个basecontoller并扩展了CI_controller,验证代码如下所示.
function authenticate($type = 'user')
{
if($type == 'user')
{
if($this->user_id)
{
// user is logged in. check for permissions now
}
else
{
// user isnt logged in. store the referrer URL in a var.
if(isset($_SERVER['HTTP_REFERER']))
{
$redirect_to = str_replace(base_url(),'',$_SERVER['HTTP_REFERER']);
}
else
{
$redirect_to = $this->uri->uri_string();
}
redirect('user/login?redirect='.$redirect_to);
exit;
}
}
if($type == 'admin')
{
if($this->session->userdata('admin_id') && $this->session->userdata('user_type') ==5)
{
// Admin is logged in
}
else
{
redirect('admin/login');
exit;
}
}
}
Run Code Online (Sandbox Code Playgroud)
引荐网址为"http://example.com/project/pm/view_conversation?id=11"现在的问题是我得到引荐来源网址,直到view_conversation并没有能够得到的ID部分.
有什么建议吗?
谢谢.
我正在使用TinyMCE <textarea>.我的要求是将字符大小限制为2000,并在工具栏下方的某处显示剩余的字符.我以某种方式设法获得了人物编号; 现在我不知道显示剩余的字符并防止超出限制.
这是我的TinyMCE代码
tinyMCE.init({
// General options
mode : "textareas",
theme : "simple",
plugins : "autolink,lists,pagebreak,style,table,save,advhr,advimage,
advlink,emotions,media,noneditable,visualchars,nonbreaking,
xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,
justifyleft,justifycenter,justifyright,
justifyfull,|,styleselect,formatselect,
fontselect,fontsizeselect",
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,
link,unlink,anchor,image,code,|,forecolor,
backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
charLimit : 10, // this is a default value which can get modified later
setup : function(ed) {
//peform this action every time a key is pressed
ed.onKeyUp.add(function(ed, e) {
//define local variables
var …Run Code Online (Sandbox Code Playgroud) 可能重复:
"text-decoration"和":after"伪元素
"text-decoration"和":after"伪元素,重新访问
我正在使用<a>标签制作导航链接以下是html
<div class="nav_container">
<a class="panel" href="demolink">menu1</a>
<a class="panel" href="demolink">menu2</a>
<a class="panel" href="demolink">menu3</a>
</div>
Run Code Online (Sandbox Code Playgroud)
并应用:aftercss属性为分隔符放置管道
.panel:after{
content:"|";
margin-left: 4px;
margin-right: 4px;
}
.panel:last-child:after{
content:"";
}
Run Code Online (Sandbox Code Playgroud)
我想在选择菜单时使用下划线,因为我正在应用一个名为selected的类
.panel.selected {
text-decoratoion:underline;
}
Run Code Online (Sandbox Code Playgroud)
但问题是菜单后面的pipline"|" 也有下划线,我想删除它.我甚至试图改变css .panle:after如下,
.panel:after{
content:"|";
margin-left: 4px;
margin-right: 4px;
text-decoration:none;
}
Run Code Online (Sandbox Code Playgroud)
但仍有下划线.
有任何建议,谢谢.
我正在使用Zurb Css框架,如基础文档中所述.zurb.com/docs/forms.php 我使用了与下面提供的相同的代码
<label for="customDropdown">Dropdown Label</label>
<select style="display:none;" id="customDropdown">
<option SELECTED>This is a dropdown</option>
<option>This is another option</option>
<option>Look, a third option</option>
</select>
<div class="custom dropdown">
<a href="#" class="current">This is a dropdown</a>
<a href="#" class="selector"></a>
<ul>
<li>This is a dropdown</li>
<li>This is another option</li>
<li>Look, a third option</li>
</ul>
</div>
Run Code Online (Sandbox Code Playgroud)
但我看不到任何下拉,上面的代码是从他们的网站上复制粘贴的.
谢谢.
我正在使用multiselect用于不同的主题我想要将select最多限制为2,并且如果用户取消选择,则以相同的方式禁用其他选项.再次,该选项必须对用户可用.
<select multiple="multiple" class="subjects" name="subjects[]" style="float:left;width:205px;" size="5">
<option value='1'>subject1</option>
<option value='2'>subject2</option>
<option value='3'>subject3</option>
<option value='3'>subject3</option>
</select>
Run Code Online (Sandbox Code Playgroud)
到目前为止,我已经实现了取消选择仅在2之后选择的最后一个选项,代码如下
/**
* Make sure the subject's limit is 2
*/
$(".subjects option").click(function(e){
if ($(this).parent().val().length > 2) {
$(this).removeAttr("selected");
}
});
Run Code Online (Sandbox Code Playgroud)
谢谢.
codeigniter ×2
html ×2
javascript ×2
php ×2
css ×1
css3 ×1
http-referer ×1
maxlength ×1
multi-select ×1
mysql ×1
navigation ×1
textarea ×1
tinymce ×1